RustFS is an Amazon S3-compatible object storage server written in Rust under the Apache 2.0 license, with a built-in web console. This tutorial deploys RustFS 1.0.7 on an Ubuntu 24.04 VPS using Docker Compose and Caddy 2.11, exposing only the S3 API over HTTPS, keeping the web console bound to 127.0.0.1:9001 for SSH tunnel access, and verifying uploads, downloads, and persistence with rclone.
If you prefer to skip manual installation, Nuvits also offers a Dedicated S3 Storage VPS with RustFS preinstalled under /opt/rustfs, with locally generated credentials in /opt/rustfs/.env and the nuvits-rustfs-https helper. To build and operate the stack yourself on any Linux VPS, follow the steps below.
How much RAM and disk RustFS needs
Because RustFS compiles to a native Rust binary without a heavy JVM or garbage-collected runtime, idle memory usage stays small. During testing on Ubuntu 24.04 (x86_64) with RustFS 1.0.7 and Caddy 2.11 running and serving requests, docker stats --no-stream reported:
NAME MEM USAGE / LIMIT CPU % rustfs-caddy-1 60.67MiB / 7.817GiB 0.04% rustfs-rustfs-1 61.06MiB / 7.817GiB 0.06% Disk capacity and bandwidth matter far more than idle RAM. Use these tiers as a baseline:
| Workload | vCPU | RAM | SSD Disk |
|---|---|---|---|
| Evolution API media, SaaS uploads, and daily n8n backups | 2 | 4 GB | 300–400 GB |
| Multiple apps, backup buckets, and 90-day retention | 4–6 | 8–18 GB | 800 GB–1 TB |
| Central media store and backups across several servers | 8+ | 24+ GB | 1.2–1.4 TB |
A single-VPS S3 server is not a substitute for off-site backups. Everything lives on one virtual disk. Keep a secondary copy off this server for critical production media or database dumps.
Secure Docker and Caddy architecture
Only Caddy publishes public ports (80 and 443). The S3 API port (9000) stays inside the private Docker Compose network, and the web console port (9001) binds strictly to loopback (127.0.0.1:9001) so you open it only through an SSH tunnel:
Three details prevent common production mistakes:
- Host directories owned by
10001:10001: the official RustFS image runs as UID/GID10001, notroot. Plainmkdirfolders owned by your user orrootcause startup write errors on/data. - Preserved
Hostheader andflush_interval -1in Caddy: S3 clients sign theHostheader with AWS Signature V4 (AWS4-HMAC-SHA256). Caddy'sreverse_proxypreservesHostby default, andflush_interval -1turns off response buffering for larger downloads. - Web console isolated from the S3 API port: in RustFS
1.0.7,/rustfs/console/only responds on port9001. Requests tohttps://s3.example.com/rustfs/console/through port9000returnHTTP 403.
What you need
- A 64-bit Ubuntu 24.04 VPS with SSH access as a
sudouser. - A
ufwfirewall allowing only SSH,80/tcp, and443(TCP and UDP). If the server is brand new, apply First steps to secure an Ubuntu 24.04 VPS first. - A subdomain with a DNS
Arecord pointing to the VPS IPv4 address (s3.example.combelow) and an email address for Caddy's Let's Encrypt account.
Install Docker Engine
If Docker is already installed on your VPS, jump to the version check at the end of this section. Otherwise, install from the official Docker Ubuntu repository:
sudo apt update sudo apt install -y ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc sudo tee /etc/apt/sources.list.d/docker.sources <<EOF Types: deb URIs: https://download.docker.com/linux/ubuntu Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") Components: stable Architectures: $(dpkg --print-architecture) Signed-By: /etc/apt/keyrings/docker.asc EOF sudo apt update sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin sudo docker --version sudo docker compose version The output confirms Docker Engine and the Compose plugin are active (in our test VM, Docker version 29.10.1 and Docker Compose version v5.8.1).
Create directories and generate strong credentials
Create the project directory along with data and logs owned by 10001:10001:
mkdir -p ~/rustfs && cd ~/rustfs sudo install -d -m 750 -o 10001 -g 10001 data logs Generate random root credentials before starting the container (leaving them unset falls back to the public default rustfsadmin/rustfsadmin, which must never be exposed):
echo "RUSTFS_ACCESS_KEY=s3_$(openssl rand -hex 12)" echo "RUSTFS_SECRET_KEY=$(openssl rand -hex 24)" Write .env with the generated values and restrict its file permissions:
RUSTFS_VERSION=1.0.7 S3_DOMAIN=s3.example.com ACME_EMAIL=you@example.com RUSTFS_ACCESS_KEY=paste-generated-access-key RUSTFS_SECRET_KEY=paste-generated-secret-key chmod 600 .env ls -ld data logs .env Verify that both folders belong to 10001 and .env is readable only by its owner:
drwxr-x--- 1 10001 10001 0 Nov 28 09:29 data -rw------- 1 deploy deploy 186 Nov 28 09:29 .env drwxr-x--- 1 10001 10001 0 Nov 28 09:29 logs Back up
.envoutside the VPS.RUSTFS_ACCESS_KEYandRUSTFS_SECRET_KEYare the initial root credentials. Once the stack is up, create bucket-scoped access keys inside the Web Console for each application instead of sharing the root credentials.
Write the Caddyfile and docker-compose.yml
The Caddyfile publishes only the S3 API hostname and lets Caddy's reverse proxy obtain and renew the TLS certificate automatically:
{ email {$ACME_EMAIL} } {$S3_DOMAIN} { reverse_proxy rustfs:9000 { flush_interval -1 } } Next, create docker-compose.yml pinning release 1.0.7 from the official RustFS releases, with no-new-privileges:true, healthchecks on both internal ports, and the console bound strictly to 127.0.0.1:9001:
services: caddy: image: caddy:2.11 restart: unless-stopped ports: - "80:80" - "443:443" - "443:443/udp" environment: - S3_DOMAIN=${S3_DOMAIN} - ACME_EMAIL=${ACME_EMAIL} volumes: - ./Caddyfile:/etc/caddy/Caddyfile:ro - caddy_data:/data - caddy_config:/config depends_on: rustfs: condition: service_healthy rustfs: image: rustfs/rustfs:${RUSTFS_VERSION} restart: unless-stopped security_opt: - no-new-privileges:true ports: - "127.0.0.1:9001:9001" env_file: - .env environment: - RUSTFS_VOLUMES=/data - RUSTFS_ADDRESS=0.0.0.0:9000 - RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001 - RUSTFS_CONSOLE_ENABLE=true - RUSTFS_OBS_LOGGER_LEVEL=warn volumes: - ./data:/data - ./logs:/logs healthcheck: test: [ "CMD-SHELL", "curl -fsS http://127.0.0.1:9000/health/ready && curl -fsS http://127.0.0.1:9001/rustfs/console/health", ] interval: 15s timeout: 5s retries: 10 start_period: 15s volumes: caddy_data: caddy_config: Why
127.0.0.1:9001:9001instead of9001:9001? Docker insertsDNATrules beforeufw, so9001:9001exposes the console on the public interface even when the firewall is active. Prefixing127.0.0.1:restricts the listener to loopback. See Why Docker ports stay open with ufw for the full mechanics.
Validate, verify DNS, and start the stack
Validate both files before starting anything:
cd ~/rustfs sudo docker compose config --quiet sudo docker run --rm \ -e S3_DOMAIN=s3.example.com \ -e ACME_EMAIL=you@example.com \ -v "$PWD/Caddyfile:/etc/caddy/Caddyfile:ro" \ caddy:2.11 caddy validate --config /etc/caddy/Caddyfile --adapter caddyfile Caddy should print Valid configuration. Confirm that your DNS A record resolves to the VPS IPv4 (dig +short s3.example.com A), then bring the stack up:
sudo docker compose up -d sudo docker compose ps Caddy waits until rustfs reports healthy:
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS rustfs-caddy-1 caddy:2.11 "caddy run --config …" caddy 12 seconds ago Up 5 seconds 0.0.0.0:80->80/tcp, [::]:80->80/tcp, 0.0.0.0:443->443/tcp, [::]:443->443/tcp, 0.0.0.0:443->443/udp, [::]:443->443/udp, 2019/tcp rustfs-rustfs-1 rustfs/rustfs:1.0.7 "/etc/rustfs/entrypo…" rustfs 13 seconds ago Up 12 seconds (healthy) 9000/tcp, 127.0.0.1:9001->9001/tcp Verify health endpoints, HTTPS, and port isolation
Test the HTTP-to-HTTPS redirect and the S3 readiness endpoint:
curl -sS -I http://s3.example.com/health | head -n 6 curl -fsS https://s3.example.com/health/ready Port 80 responds with 308 Permanent Redirect to https://, and /health/ready returns HTTP/2 200 with subsystem status (iam, lock, poolMetadata, and storage):
{ "degradedReasons": [], "details": { "iam": { "ready": true, "status": "connected" }, "lock": { "ready": true, "status": "connected" }, "poolMetadata": { "ready": true, "status": "writable" }, "storage": { "missingDrives": [], "readQuorum": true, "readinessScope": "read_quorum", "ready": true, "source": "local_runtime", "status": "connected", "unavailableDrives": [], "writeQuorum": true } }, "ready": true, "service": "rustfs-endpoint", "status": "ok", "version": "1.0.7" } Check the host's listening sockets and the local console health check:
sudo ss -tulpn | grep -E ':(80|443|9000|9001)\b' curl -fsS http://127.0.0.1:9001/rustfs/console/health Expected output:
udp UNCONN 0 0 0.0.0.0:443 0.0.0.0:* users:(("docker-proxy",pid=10863,fd=8)) udp UNCONN 0 0 [::]:443 [::]:* users:(("docker-proxy",pid=10871,fd=8)) tcp LISTEN 0 4096 127.0.0.1:9001 0.0.0.0:* users:(("docker-proxy",pid=10667,fd=8)) tcp LISTEN 0 4096 0.0.0.0:443 0.0.0.0:* users:(("docker-proxy",pid=10848,fd=8)) tcp LISTEN 0 4096 0.0.0.0:80 0.0.0.0:* users:(("docker-proxy",pid=10834,fd=8)) Port 9000 is never published on the host, and port 9001 listens strictly on 127.0.0.1. The console health endpoint answers {"service":"rustfs-console","status":"ok","version":"1.0.7"}.
Open the Web Console over an SSH tunnel
From your workstation (not inside the VPS), open an SSH tunnel forwarding port 9001:
ssh -N -L 9001:127.0.0.1:9001 deploy@YOUR_VPS_IP If you moved SSH to a custom port (such as 2222 in the Ubuntu 24.04 hardening guide), include -p 2222 in the command (ssh -p 2222 -N -L 9001:127.0.0.1:9001 deploy@YOUR_VPS_IP).
While that terminal remains open, visit http://localhost:9001/rustfs/console/ in your browser (opening http://localhost:9001/ in a browser also redirects with 302 to /rustfs/console/). Sign in using RUSTFS_ACCESS_KEY and RUSTFS_SECRET_KEY from .env, create your buckets, and issue scoped Access Keys limited to each application's buckets.
If you explicitly want the web console reachable without an SSH tunnel, add a second dedicated subdomain in the Caddyfile (console-s3.example.com) proxying to rustfs:9001 rather than mixing console access onto the public S3 API domain.
Test S3 operations end to end with rclone
To confirm that AWS SigV4 signing, object uploads, listing, and disk persistence work through Caddy, install the official rclone .deb package and run a full write, container recreation, and read-back test:
cd /tmp curl -fsSLO "https://downloads.rclone.org/rclone-current-linux-$(dpkg --print-architecture).deb" sudo apt install -y "./rclone-current-linux-$(dpkg --print-architecture).deb" rclone version | head -n 1 Load the .env variables (or use a scoped key created in the Console) and create an S3 remote with force_path_style=true:
cd ~/rustfs set -a && . ./.env && set +a rclone config create rustfs-prod s3 provider=Other env_auth=false \ access_key_id="$RUSTFS_ACCESS_KEY" \ secret_access_key="$RUSTFS_SECRET_KEY" \ endpoint="https://${S3_DOMAIN}" \ region="us-east-1" \ force_path_style=true > /dev/null Create a bucket, generate a 1 MB random file, upload it to RustFS, and record its SHA-256 digest:
rclone mkdir rustfs-prod:app-media rclone lsd rustfs-prod: dd if=/dev/urandom of=/tmp/sample-1mb.bin bs=1M count=1 status=none sha256sum /tmp/sample-1mb.bin rclone copyto /tmp/sample-1mb.bin rustfs-prod:app-media/sample-1mb.bin rclone ls rustfs-prod:app-media Now recreate the containers (without -v) and download the object back to prove ./data persists across restarts:
sudo docker compose down sudo docker compose up -d rclone copyto rustfs-prod:app-media/sample-1mb.bin /tmp/restored-1mb.bin sha256sum /tmp/sample-1mb.bin /tmp/restored-1mb.bin Both SHA-256 digests must match identically. Remove the test object with rclone deletefile rustfs-prod:app-media/sample-1mb.bin and clean up /tmp.
Connect Evolution API, n8n backups, and Coolify
Once the HTTPS endpoint passes the check above, any S3-compatible client can write to your buckets using path-style URLs (https://s3.example.com/<bucket>/<object>).
Evolution API (store WhatsApp media outside PostgreSQL)
In your Evolution API Docker setup, point .env to a dedicated RustFS bucket (such as evolution) with a scoped key pair:
S3_ENABLED=true S3_ACCESS_KEY=dedicated-evolution-access-key S3_SECRET_KEY=dedicated-evolution-secret-key S3_BUCKET=evolution S3_PORT=443 S3_ENDPOINT=s3.example.com S3_REGION=us-east-1 S3_USE_SSL=true n8n and Coolify backups
- n8n: the Automatic n8n backups guide uses
rclonewith acryptlayer on top of an S3 remote. Passendpoint="https://s3.example.com"andforce_path_style=truewhen creatingn8n-s3(pointing at a separate VPS from the n8n host so backups live off-box). - Coolify: under S3 Storages, enter
https://s3.example.com, the backup bucket name, regionus-east-1, and a scoped key restricted to that bucket.
Upgrades and common issues
Upgrade RustFS without touching your buckets
- Review the changelog on RustFS GitHub releases and the official RustFS docs.
- Update
RUSTFS_VERSIONin.envto the new stable tag. - Pull and recreate only the
rustfscontainer:
cd ~/rustfs sudo docker compose pull rustfs sudo docker compose up -d rustfs sudo docker compose logs --tail=30 rustfs Common issues
- Container restarts in a loop with
Permission deniedon/dataor/logs: the directories belong torootor your login user instead of10001:10001. Fix ownership withsudo chown -R 10001:10001 ~/rustfs/data ~/rustfs/logsand runsudo docker compose restart rustfs. -
curl http://127.0.0.1:9001/returns403or501: port9001only redirects/when it receives browser headers (Accept: text/htmland a browserUser-Agent). Usehttp://127.0.0.1:9001/rustfs/console/healthfor CLI health checks and openhttp://localhost:9001/rustfs/console/in your browser. -
SignatureDoesNotMatchor client errors: make sure path-style addressing is enabled (force_path_style=trueinrclone,AWS_USE_PATH_STYLE_ENDPOINT=truein Laravel/AWS SDK) whenever you expose a single subdomain (s3.example.com) without wildcard DNS (*.s3.example.com). - TLS certificate does not issue: check that your DNS
Arecord points to the VPS, confirm80/tcpand443are open in bothufwand any upstream network firewall, and inspectsudo docker compose logs caddy.
Next steps
- If you want RustFS ready out of the box without setting up Docker and Caddy by hand, see Dedicated S3 Storage VPS (RustFS).
- If you have not hardened SSH, the firewall, and automatic updates yet, follow First steps to secure an Ubuntu 24.04 VPS.
- To schedule encrypted workflow backups into your new bucket, read Automatic n8n backups.
