Running S3-compatible object storage with MinIO in a homelab
Deploy S3-compatible MinIO object storage with Docker Compose, separate API and console ports, Nginx Proxy Manager WebSockets, and automated backups.
Managing media files, database dumps, and static assets across homelab containers gets messy fast when every service writes to its own bind mount. This guide walks through deploying MinIO with Docker Compose, splitting the S3 API (9000) and web console (9001) behind Nginx Proxy Manager, issuing least-privilege service accounts, and automating local backups.
Update on MinIO Community Edition (2025–2026): MinIO removed the web console admin UI from Community Edition in mid-2025, stopped publishing official
minio/minioDocker images in October 2025, and archived the upstream repository in late 2025 / early 2026. If you’re deploying S3-compatible object storage in a homelab from scratch today, consider a community drop-in fork likepgsty/siloor an actively maintained alternative such as Garage, SeaweedFS, or RustFS.
Why self-host S3-compatible object storage
Once you run more than a handful of containers in a homelab, unstructured data piles up quickly. Blog assets, n8n workflow artifacts, nightly database dumps, photo libraries, and wiki attachments all need a durable home.
Most setups start by bind-mounting host directories or sharing an SMB/NFS mount across containers. That works early on, but three problems show up as the stack grows:
- Tight coupling to local paths: Application configs end up hardcoded to host paths like
/mnt/storage/.... Moving a container to another machine or migrating to the cloud requires rewriting code and mount layouts. - Cloud storage and egress costs: AWS S3 and Google Cloud Storage offer high durability, but storing hundreds of gigabytes—or terabytes—of backups adds up every month, especially once outbound transfer fees kick in.
- Standard API compatibility: Modern self-hosted apps (n8n, Grafana, Nextcloud, Mastodon) and backend frameworks (Spring Boot, Node.js, Python) treat the AWS S3 API as the default interface for object storage.
MinIO fills this gap. Written in Go, it runs light on a single homelab node while implementing the AWS S3 API faithfully. Point aws-cli, rclone, or standard SDKs (software.amazon.awssdk:s3, @aws-sdk/client-s3, boto3) at your homelab endpoint, and the rest of your code stays identical to production cloud setups.
That said, object storage isn’t the right fit for every workload. If you need POSIX file locking, in-place random writes, or low-latency shared files for a desktop OS, stick to NFS or SMB. S3-compatible storage works best for immutable blobs, backups, and web assets accessed over HTTP.
Port separation and reverse proxy architecture
The first architectural detail to get right with MinIO is separating the S3 API port from the Web Console port.
Older MinIO releases served both the REST API and the browser UI on port 9000. Newer versions split them so you can apply different proxy rules and access controls to each surface:
- S3 API port (default
9000): A stateless REST API endpoint consumed by SDKs,aws-cli, and backup jobs. - Web Console port (default
9001): An admin dashboard for creating buckets, inspecting usage metrics, and issuing IAM keys. It opens persistent WebSocket connections to stream live metrics and event logs.
When exposing MinIO through Nginx Proxy Manager (NPM) with a Cloudflare DNS-01 wildcard certificate, route each port to its own subdomain (s3.namju.kim and s3-console.namju.kim).
flowchart TD
subgraph Clients["External Clients and Admin"]
AdminBrowser["Admin Browser<br/>(https://s3-console.namju.kim)"]
S3ClientApp["Apps / AWS CLI / SDK<br/>(https://s3.namju.kim)"]
end
subgraph ReverseProxy["Nginx Proxy Manager (Ingress)"]
NPM_Console["s3-console.namju.kim<br/>(WebSockets ON / Port 9001)"]
NPM_API["s3.namju.kim<br/>(client_max_body_size 0 / Port 9000)"]
end
subgraph Homelab["Homelab Docker Network (npm-network)"]
ConsoleSvc["MinIO Console UI (Port 9001)"]
APISvc["MinIO S3 API Engine (Port 9000)"]
LocalStorage[("Bind-Mounted Storage<br/>(/data persistent volume)")]
end
AdminBrowser -->|"HTTPS 443"| NPM_Console
S3ClientApp -->|"HTTPS 443"| NPM_API
NPM_Console -->|"WebSocket proxy"| ConsoleSvc
NPM_API -->|"REST API proxy"| APISvc
ConsoleSvc --> LocalStorage
APISvc --> LocalStorage
Directory layout and Docker Compose setup
Create a dedicated directory under your homelab folder to keep configuration and object data cleanly separated:
1
2
3
4
5
~/homelab/minio/
├── docker-compose.yml
├── .env.example
├── .env
└── data/ # Persistent volume storing actual S3 objects
Environment variables (.env.example)
Current MinIO releases use MINIO_ROOT_USER and MINIO_ROOT_PASSWORD instead of the deprecated MINIO_ACCESS_KEY and MINIO_SECRET_KEY variables.
1
2
3
4
5
6
7
8
9
10
11
12
13
# ~/homelab/minio/.env.example
# MinIO root admin credentials (use at least 8 characters for the password)
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=your_super_secret_homelab_password!
# Reverse proxy domain settings
# Required so the console and API generate valid redirects and presigned URLs
MINIO_SERVER_URL=https://s3.namju.kim
MINIO_BROWSER_REDIRECT_URL=https://s3-console.namju.kim
# Timezone
TZ=Asia/Seoul
MINIO_ROOT_PASSWORDgrants full admin privileges across every bucket and object. Use a strong password with mixed case, digits, and symbols, and never commit.envto Git.
Complete docker-compose.yml
MinIO publishes official images on Red Hat Quay (quay.io/minio/minio) in addition to Docker Hub. Using Quay avoids Docker Hub pull rate limits during rebuilds.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# ~/homelab/minio/docker-compose.yml
services:
minio:
image: quay.io/minio/minio:RELEASE.2024-10-13T13-34-11Z
container_name: minio
restart: unless-stopped
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
MINIO_SERVER_URL: ${MINIO_SERVER_URL}
MINIO_BROWSER_REDIRECT_URL: ${MINIO_BROWSER_REDIRECT_URL}
TZ: ${TZ:-Asia/Seoul}
volumes:
- ./data:/data
ports:
# Bind to localhost only for local debugging; expose externally via NPM
- "127.0.0.1:9000:9000"
- "127.0.0.1:9001:9001"
networks:
- npm-network
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
deploy:
resources:
limits:
memory: 1536M
networks:
npm-network:
external: true
Three settings here do most of the heavy lifting:
command: server /data --console-address ":9001": Points storage to/dataand pins the web console to port9001. Without--console-address, MinIO picks a random port on every restart and breaks your reverse proxy rule.ports: Binding to127.0.0.1keeps both ports off the host’s external interface so traffic only enters through the reverse proxy.networks: Joining the sharednpm-networklets Nginx Proxy Manager reach the container directly by hostname (minio).
Start the container:
1
docker compose up -d
Nginx Proxy Manager routing and WebSocket setup
Open the Nginx Proxy Manager admin UI (https://npm.namju.kim:81) and create two separate Proxy Hosts.
Console proxy (s3-console.namju.kim)
- Details tab:
- Domain Names:
s3-console.namju.kim - Scheme:
http - Forward Hostname / IP:
minio(container name onnpm-network) - Forward Port:
9001 - Cache Assets: OFF
- Block Common Exploits: ON
- Websockets Support: ON
- Domain Names:
- SSL tab:
- Select your wildcard certificate (
*.namju.kim) issued via Cloudflare DNS-01 challenge - Force SSL: ON
- HTTP/2 Support: ON
- HSTS Enabled: ON
- Select your wildcard certificate (
Do not skip Websockets Support. The MinIO web console is a single-page application that maintains a live WebSocket connection to stream bucket usage, I/O metrics, and upload progress. Leaving WebSockets disabled causes repeated
Connection Closedwarnings and stalled uploads in the UI.
S3 API proxy (s3.namju.kim)
- Details tab:
- Domain Names:
s3.namju.kim - Scheme:
http - Forward Hostname / IP:
minio - Forward Port:
9000 - Block Common Exploits: ON
- Websockets Support: OFF
- Domain Names:
- SSL tab:
- Select the
*.namju.kimwildcard certificate and enable Force SSL.
- Select the
- Advanced tab (large uploads and streaming): Nginx defaults
client_max_body_sizeto1M, which immediately rejects multi-gigabyte backups with413 Request Entity Too Large. Add these custom directives to disable body size limits and request buffering:
1
2
3
4
5
6
7
8
9
10
11
12
13
# Remove upload size cap (0 = unlimited)
client_max_body_size 0;
# Disable buffering to reduce I/O latency on large streams
proxy_http_version 1.1;
proxy_request_buffering off;
proxy_buffering off;
# Prevent premature timeouts during large transfers
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
send_timeout 300;
Creating buckets and least-privilege access keys
Once both proxy hosts are active, open https://s3-console.namju.kim in your browser.
Creating buckets
- Sign in with the
MINIO_ROOT_USERandMINIO_ROOT_PASSWORDvalues from.env. - Go to Administrator ➔ Buckets in the left sidebar and click Create Bucket.
- Create separate buckets per workload:
homelab-backups: n8n workflow exports and database dumpsmedia-assets: images and static files
- Optionally enable Versioning or Object Locking (WORM protection against accidental deletion or ransomware).
Issuing scoped access keys
Never put root credentials into application config files. Create a dedicated service account scoped to a single bucket instead:
- Go to User ➔ Access Keys and click Create access key.
- Save the generated Access Key and Secret Key in a password manager (such as Vaultwarden).
- Toggle Restrict permissions and attach an inline IAM policy JSON that limits access to
homelab-backups:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::homelab-backups"
]
},
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::homelab-backups/*"
]
}
]
}
With this policy in place, the key cannot list, read, or delete objects in media-assets or any other bucket.
Verifying with AWS CLI and Spring Boot
Test the endpoint and scoped credentials from both the terminal and application code to confirm full S3 API compatibility.
Testing with AWS CLI
Standard aws-cli works against MinIO as soon as you pass --endpoint-url:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Export the scoped service account credentials
export AWS_ACCESS_KEY_ID="minio_service_user_key"
export AWS_SECRET_ACCESS_KEY="minio_secret_token_password"
export AWS_DEFAULT_REGION="us-east-1"
# 1. List buckets
aws --endpoint-url https://s3.namju.kim s3 ls
# 2. Upload a test file
echo "MinIO Homelab S3 Integration Test" > test-file.txt
aws --endpoint-url https://s3.namju.kim s3 cp test-file.txt s3://homelab-backups/test-file.txt
# 3. Verify the uploaded object
aws --endpoint-url https://s3.namju.kim s3 ls s3://homelab-backups/
Connecting from Spring Boot (Kotlin)
When using software.amazon.awssdk:s3 in a Spring Boot service, override the endpoint and enable path-style access:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// src/main/kotlin/com/example/homelab/config/S3StorageConfig.kt
package com.example.homelab.config
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider
import software.amazon.awssdk.regions.Region
import software.amazon.awssdk.services.s3.S3Client
import java.net.URI
@Configuration
class S3StorageConfig(
@Value("\${s3.endpoint:https://s3.namju.kim}") private val endpoint: String,
@Value("\${s3.access-key}") private val accessKey: String,
@Value("\${s3.secret-key}") private val secretKey: String,
) {
@Bean
fun s3Client(): S3Client {
return S3Client.builder()
.endpointOverride(URI.create(endpoint))
.region(Region.US_EAST_1)
.credentialsProvider(
StaticCredentialsProvider.create(
AwsBasicCredentials.create(accessKey, secretKey)
)
)
// Required for MinIO without per-bucket wildcard DNS records
.forcePathStyle(true)
.build()
}
}
Why
forcePathStyle(true)matters: AWS S3 defaults to virtual-hosted-style URLs (https://{bucket-name}.s3.namju.kim). Unless you configure nested wildcard DNS and TLS certificates for every bucket subdomain, your client needs path-style requests (https://s3.namju.kim/{bucket-name}) to reach the shared API endpoint.
Data persistence, backup automation, and takeaways
In single-drive standalone mode, MinIO stores buckets and objects directly inside the host bind mount (~/homelab/minio/data) with a transparent layout:
1
2
3
4
5
data/
├── .minio.sys/ # Internal metadata, users, policies, and multipart state
├── homelab-backups/ # Bucket name maps directly to a directory
│ └── test-file.txt # Uploaded object file
└── media-assets/
Because standalone mode keeps regular files rather than opaque erasure-coded blocks, you can still recover raw files straight from the host filesystem if the container ever fails to start.
Automating secondary backups with rsync
To protect against local disk failure, mirror the data directory to an external HDD or remote NAS on a daily schedule:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash
# ~/homelab/minio/scripts/backup-minio.sh
set -euo pipefail
BACKUP_DEST="/mnt/external-hdd/minio-backup-$(date +%Y%m%d)"
mkdir -p "${BACKUP_DEST}"
# Sync the MinIO data directory to external storage
echo "Starting MinIO data directory synchronization..."
rsync -av --delete ~/homelab/minio/data/ "${BACKUP_DEST}/"
# Remove snapshots older than 7 days
find /mnt/external-hdd/ -maxdepth 1 -name "minio-backup-*" -mtime +7 -exec rm -rf {} +
echo "MinIO backup completed successfully."
Schedule it in the host crontab to run at 3:00 AM every day:
1
0 3 * * * /home/user/homelab/minio/scripts/backup-minio.sh >> /var/log/minio-backup.log 2>&1
Quick checklist
- Split API and console ports: Pin
--console-address ":9001"and route9000and9001through separate reverse proxy hosts. - Tune Nginx for both traffic patterns: Enable WebSockets on the console host, and set
client_max_body_size 0with buffering disabled on the S3 API host. - Scope credentials per app: Issue service account keys restricted to specific bucket ARNs instead of sharing root credentials.
- Force path-style access in SDKs: Set
forcePathStyle(true)in AWS SDK clients so requests hithttps://s3.example.com/<bucket>. - Keep secondary backups: Mirror
/dataoff the primary host disk and prune old snapshots automatically.