---
title: Configure local storage
description: Connect a bucket profile to local MinIO with the S3 integration and Docker.
pagination: false
sidebar:
  icon: container
---

Use MinIO when you want S3-compatible file storage on your development machine. You'll need an existing RELKIT application and a running Docker daemon.

1. ## Install the integration

    Run the installation commands from your application directory:

    {/* Generated by apps/docs/scripts/generate.ts. Do not edit. */}

    From this guide's application/package root, install only its selected requirements:

    ```sh
    bun add @relkit/docker@0.7.12 @relkit/s3@0.7.12
    ```

    Keep these owner-specific versions and the lockfile together. Runtime SDKs belong in `dependencies`; build/type tooling belongs in `devDependencies`. Installing an adapter does not supply its optional SDK peers or enable the feature's configuration.

2. ## Add the provider profile

    In `relkit.config.ts`, import `s3` from `@relkit/s3`, `docker` from `@relkit/docker`, and `env as binding` from `@relkit/app/config`. Add this `assets` entry to the `bucket` configuration inside `defineApp()`:

    ```ts title="relkit.config.ts — bucket configuration"
    assets: docker(
      s3({
        endpoint: binding.url("ASSETS_S3_ENDPOINT"),
        bucketName: binding.string("ASSETS_S3_BUCKET"),
        region: binding.string("ASSETS_S3_REGION"),
        credentials: {
          accessKeyId: binding.secret("ASSETS_S3_ACCESS_KEY_ID"),
          secretAccessKey: binding.secret("ASSETS_S3_SECRET_ACCESS_KEY"),
        },
        forcePathStyle: true,
      }),
    ),
    ```

    A **provider profile** is a named connection to the service that stores your files. A bucket with `profile: "assets"` uses this connection.

    In development, `docker(s3(...))` starts the local MinIO recipe when the application needs this profile. It supplies binding-only credentials and loopback ports. Run `bun run check`, then `bun run dev`.

    With `--local=off`, recipes stay disabled and the configured connection values must exist. For connected S3 or Cloudflare R2, follow [provider selection](/docs/modules/storage/define).

3. ## Use the bucket

    Follow [Upload product images](/guides/storage/upload-product-images) to connect the profile to a bucket, function, service, and HTTP endpoint.
