StackPanel
Services

Minio

S3-compatible object storage for local development

Minio is an S3-compatible object storage server. Stackpanel runs a local Minio instance so you can develop against an S3 API without needing an AWS account or internet connection.

Enable Minio

stackpanel.globalServices = {
  enable = true;
  minio.enable = true;
};

That's it. Stackpanel provisions a local Minio server with a deterministic port computed from your project name. Every team member gets the same port automatically.

Connection Details

Once enabled, the following environment variables are available in your devshell:

VariableDescriptionExample
STACKPANEL_MINIO_PORTMinio API port4260
STACKPANEL_MINIO_CONSOLE_PORTMinio web console port4261

Default Credentials

Minio starts with default development credentials:

FieldValue
Access Keyminioadmin
Secret Keyminioadmin
Endpointhttp://localhost:<STACKPANEL_MINIO_PORT>
Consolehttp://localhost:<STACKPANEL_MINIO_CONSOLE_PORT>

These are local development credentials only. Never use them in production. For real AWS credentials, see Secrets.

Using with AWS SDKs

Most AWS SDKs can be pointed at a local Minio instance by setting the endpoint URL. Here's a typical setup:

JavaScript / TypeScript

import { S3Client } from "@aws-sdk/client-s3";

const s3 = new S3Client({
  endpoint: `http://localhost:${process.env.STACKPANEL_MINIO_PORT}`,
  region: "us-east-1",
  credentials: {
    accessKeyId: "minioadmin",
    secretAccessKey: "minioadmin",
  },
  forcePathStyle: true, // required for Minio
});

Go

cfg, _ := config.LoadDefaultConfig(ctx,
    config.WithEndpointResolverWithOptions(
        aws.EndpointResolverWithOptionsFunc(func(service, region string, options ...interface{}) (aws.Endpoint, error) {
            return aws.Endpoint{
                URL:               fmt.Sprintf("http://localhost:%s", os.Getenv("STACKPANEL_MINIO_PORT")),
                HostnameImmutable: true,
            }, nil
        }),
    ),
    config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider("minioadmin", "minioadmin", "")),
)

client := s3.NewFromConfig(cfg, func(o *s3.Options) {
    o.UsePathStyle = true
})

Setting forcePathStyle: true (or UsePathStyle in Go) is required for Minio. Without it, the SDK tries virtual-hosted-style requests (bucket.localhost), which won't resolve locally.

Web Console

Minio ships with a built-in web console for browsing buckets, uploading files, and managing access policies. Once the service is running, open:

http://localhost:<STACKPANEL_MINIO_CONSOLE_PORT>

Log in with the default credentials (minioadmin / minioadmin).

Data Persistence

Minio stores its data locally in the Stackpanel state directory. Data persists across shell restarts—you won't lose your buckets or objects when you leave the devshell.

To start fresh, stop the service and clear the data directory:

stackpanel services stop minio
rm -rf .stack/state/minio
stackpanel services start minio

Managing the Service

Use the CLI to control the Minio service lifecycle:

# Check status
stackpanel services status

# Start / stop / restart
stackpanel services start minio
stackpanel services stop minio
stackpanel services restart minio

# View logs
stackpanel logs minio

Or use Studio for a visual interface.

Combining with Other Services

Minio works well alongside other Stackpanel services. A common pattern is to use it with PostgreSQL for a full backend development stack:

stackpanel.globalServices = {
  enable = true;
  postgres.enable = true;
  redis.enable = true;
  minio.enable = true;
};

All three services get deterministic ports and are managed together through stackpanel services.

Reference

On this page