<commit_before>---
layout: single
title:  "Minio"
sidebar:
  nav: setup
---

> :warning: Losing Minio's data will mean losing all your Spinnaker 
> application metadata, and configured pipelines.

[Minio](https://www.minio.io/) is an S3-compatible object store that you can
host yourself. This is the persistent storage solution we recommend when you
don't want to depend on a cloud provider to host your Spinnaker data. 

## Prerequisites

Install Minio following the instructions on the [Minio
homepage](https://www.minio.io/), making sure to have it run on an endpoint
reachable by Spinnaker. Record the following values:

* `ENDPOINT`: The fully-qualifed endpoint Minio is reachable on. If Minio is
  running on the same machine as Spinnaker, this might be
  `http://localhost:9001`.

* `MINIO_ACCESS_KEY`, `MINIO_SECRET_KEY`: The access/secret keypair you've 
  configured Minio with. These env vars need to be visible to the Minio process
  for them to work.

## Editing Your Storage Settings

Run the following commands (notice we are picking S3 as our storage type,
because Minio implements the S3 API):

```bash
echo $MINIO_SECRET_KEY | hal config storage s3 --endpoint $ENDPOINT \
    --access-key-id $MINIO_ACCESS_KEY \
    --secret-access-key # will be read on STDIN to avoid polluting your
                        # ~/.bash_history with a secret

hal config storage edit --type s3 
```
<commit_msg>fix(minio): fix hal command (#426)<commit_after>---
layout: single
title:  "Minio"
sidebar:
  nav: setup
---

> :warning: Losing Minio's data will mean losing all your Spinnaker 
> application metadata, and configured pipelines.

[Minio](https://www.minio.io/) is an S3-compatible object store that you can
host yourself. This is the persistent storage solution we recommend when you
don't want to depend on a cloud provider to host your Spinnaker data. 

## Prerequisites

Install Minio following the instructions on the [Minio
homepage](https://www.minio.io/), making sure to have it run on an endpoint
reachable by Spinnaker. Record the following values:

* `ENDPOINT`: The fully-qualifed endpoint Minio is reachable on. If Minio is
  running on the same machine as Spinnaker, this might be
  `http://localhost:9001`.

* `MINIO_ACCESS_KEY`, `MINIO_SECRET_KEY`: The access/secret keypair you've 
  configured Minio with. These env vars need to be visible to the Minio process
  for them to work.

## Editing Your Storage Settings

Run the following commands (notice we are picking S3 as our storage type,
because Minio implements the S3 API):

```bash
echo $MINIO_SECRET_KEY | hal config storage s3 edit --endpoint $ENDPOINT \
    --access-key-id $MINIO_ACCESS_KEY \
    --secret-access-key # will be read on STDIN to avoid polluting your
                        # ~/.bash_history with a secret

hal config storage edit --type s3 
```

{'fraction_non_alphanumeric': 0.0800561797752809, 'fraction_numerical': 0.007373595505617977, 'mean_word_length': 3.7325581395348837, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1643518', 'n_tokens_mistral': 859, 'n_tokens_neox': 820, 'n_words': 371}