# MinIO (S3) recipe

URL: https://briq.cloud/cookbook/minio

> S3-compatible object storage with a web console.

Tags: storage, s3

## Run it

MCP:

```ts
briq_run({
  recipe: "minio",
  params: {
    "bucket": "app",
    "size": "small",
    "diskGb": 5
  },
  wait: true
})
```

REST:

```bash
curl -X POST https://api.briq.cloud/v1/briqs \
  -H "Authorization: Bearer $BRIQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "recipe": "minio",
    "params": {
      "bucket": "app",
      "size": "small",
      "diskGb": 5
    },
    "wait": true
  }'
# → { "briqs": [{ "id": "bq_…", … }], "outputs": { "S3_ENDPOINT": "…" }, … }

# ... when done, for each briq id
curl -X DELETE https://api.briq.cloud/v1/briqs/<id> \
  -H "Authorization: Bearer $BRIQ_API_KEY"
```

## Parameters

| Name | Type | Options | Default | What it does |
| --- | --- | --- | --- | --- |
| `bucket` | string | — | "app" | — |
| `size` | enum | nano, small, medium, large | "small" | — |
| `diskGb` | number | — | 5 | Volume size, in GB |

## Outputs

Returned by `briq_run` once the stack is healthy. Hosts resolve inside your team network; secrets are generated per run.

| Output | Value |
| --- | --- |
| `S3_ENDPOINT` | `http://minio.<stack>.internal:9000` |
| `S3_ACCESS_KEY_ID` | `minio` |
| `S3_SECRET_ACCESS_KEY` | `<MINIO_ROOT_PASSWORD>` |
| `S3_BUCKET` | `app` |
| `S3_REGION` | `us-east-1` |
| `MINIO_CONSOLE` | `http://minio.<stack>.internal:9001` |

## What it runs

| Briq | Image | Ports | Size | Volume |
| --- | --- | --- | --- | --- |
| minio | `pgsty/minio:RELEASE.2026-08-04T00-00-00Z` | 9000, 9001 | small | 5 GB at /data |

## When to use it

* Your code uploads to S3 and you want a real bucket without AWS credentials.
* Presigned URLs, multipart uploads or bucket policies must behave like S3.

The `bucket` is created at boot. Outputs follow AWS SDK naming.

## Tips

* **Path style**: set `forcePathStyle: true` (AWS SDK v3) or `s3ForcePathStyle` (v2).
* **Region** `us-east-1`, as in the outputs.
* **Console for a human**: `briq_run({ recipe: "minio", expose: "private" })` returns its URL.
* **Presigned URLs** carry the private host. If a browser must use them, expose port 9000 instead
  of the console and sign against that URL: a briq has one URL, and moving it to another port
  restarts the briq.
* **Image**: [`pgsty/minio`](https://hub.docker.com/r/pgsty/minio), the maintained community build,
  since MinIO stopped publishing community images.
* **More storage**: the volume starts small; pass `diskGb`, e.g. `params: { diskGb: 50 }`. Set it
  when the briq is created, and it counts toward your [plan's disk](https://briq.cloud/docs/cost#plans).
