DEV Community

Cover image for Self-Hosting S3 on Bare Metal: What I'd Tell My Past Self
Ethan Carter
Ethan Carter

Posted on

Self-Hosting S3 on Bare Metal: What I'd Tell My Past Self

Self-hosting S3 on bare metal means running an S3-compatible server on your own Linux hardware instead of renting cloud object storage. RustFS is one option worth a look: Apache 2.0 licensed, ships as a single container or binary, and answers the S3 API on port 9000 with a web console on 9001. The appeal is ownership. The disks, the network path, and the uptime are yours, and so is the bill math. The catch is that you also own the failure modes. Here is the short list of things I wish someone had put in front of me before the first docker run, pulled straight from the project's own documentation rather than a sales page.

Key Stats

Fact Detail Source
License Apache 2.0 (free to self-host, no license fee) RustFS GitHub README
S3 API port / console port 9000 / 9001 RustFS GitHub README
Default credentials rustfsadmin / rustfsadmin (change before exposing) RustFS GitHub README
Runs as non-root UID/GID 10001:10001 (host bind mounts must be writable by it) RustFS GitHub README
Feature status S3 core, versioning, Object Lock, ILM, KMS, replication, site replication all Available RustFS README Feature & Status (re-checked 2026-11-10)
Known gaps S3 Tables (Iceberg REST) and MinIO on-disk compat are Preview; no FUSE/POSIX mount RustFS README Feature & Status (re-checked 2026-11-10)

What "self-hosting S3" actually buys you

Self-hosted S3-compatible storage is a program you run on your own hardware that speaks the Amazon S3 API. Applications built on AWS SDKs, the aws CLI with --endpoint-url, or MinIO's mc talk to it without code changes, because the bucket, object, and credential model matches S3. The thing it buys you is not speed, it is control. The disks live in a rack you own, the network path is one you define, and the cost is hardware plus your time rather than a per-gigabyte bill that climbs with every upload. RustFS is written in Rust and licensed Apache 2.0, so there is no license fee and no vendor lock on the code. It exposes the S3 API on 9000 and a console on 9001, storing objects on the local filesystem. That compatibility is the whole point: you get an S3 endpoint without renting one. The trade you make is operational. A cloud bucket's outages are someone else's pager; a bare-metal node's outages are yours.

When does bare metal beat a VM or a managed bucket?

Bare metal wins when steady, high-volume storage makes a cloud egress and request bill painful, or when data residency rules forbid sending bytes off site. A VM blurs the line: you still rent compute, but you keep the disk and the S3 endpoint. Managed buckets win when you want zero operational responsibility and can tolerate the per-request and egress pricing. The honest split is about who answers the pager. If your team already runs Linux servers and cares about where data sits, bare metal or a self-hosted VM is a real option. If you want to forget the storage exists, a managed bucket is cheaper in attention even when it costs more in dollars. RustFS runs the same whether it sits on metal or in a VM, so the decision is about operations, not the software. Pick metal when control and bill predictability matter more than convenience, and pick managed when you would rather not own the incident.

Lesson one: RustFS runs as UID 10001, not root

The first surprise is that the RustFS container does not run as root. It runs as a non-root user rustfs with UID/GID 10001:10001. If you bind-mount a host directory, that path must be writable by 10001:10001, or the server fails to start with permission errors. The official quick start handles this up front:

# Create data and logs directories
mkdir -p data logs

# Change the owner of these directories
chown -R 10001:10001 data logs

# Using latest version
docker run -d -p 9000:9000 -p 9001:9001 -v $(pwd)/ -v $(pwd)/logs:/logs rustfs/rustfs:latest
Enter fullscreen mode Exit fullscreen mode

The -v $(pwd)/ mount and the chown step are not optional polish. Skip the chown and the container starts, then rejects the disk because it cannot write to it. For an upgrade from an older image that ran as root, you must re-chown the existing data and log directories to 10001:10001 before swapping the image, because replacing the image does not change file ownership on the host. RustFS checks that it can create, write, and delete a small temp file in each data root at startup, and a failed check rejects that disk. Permissions are yours to set, and the server will not fix them for you.

Why the default credentials are a ticking clock

The second lesson is about the keys. A fresh RustFS install ships with default credentials rustfsadmin / rustfsadmin, documented right in the README's access section. Those are not throwaway demo keys; they are the actual login until you change them. If you expose port 9000 or 9001 to any network with those defaults still set, you have published a writable S3 endpoint with a known username and password. RustFS itself does not rotate or expire them. The fix is unglamorous: set your own access and secret keys before the port faces anything but localhost. The RustFS install documents the RUSTFS_ACCESS_KEY and RUSTFS_SECRET_KEY environment variables for this, and the install path leaves a clear warning to replace the defaults. Treat the defaults like a router's admin/admin pair: fine on a bench, dangerous on a network. Change them, then verify you can still log in with the new keys before you trust the box with real data.

What a single disk really means for your data

Most quick starts land you in single-node, single-drive (SNSD) mode, which stores everything under one local path with no redundancy. The README is explicit that an SNSD deployment is a standalone local path: it cannot expand in place or be added to a Pool later. To grow, you create a new deployment and migrate data through S3. That is fine for evaluation and dev, but a single disk has no spare. If it fails, the objects on it are gone unless you copied them elsewhere. The practical move is to back up the data directory or replicate the bucket to a second site on a schedule you trust, and to check free space before the volume fills, because a full disk stops writes. RustFS does support distributed mode and bucket replication as listed features, but the one-line install is single-node by default. Know which one you just stood up, because the recovery story is very different between them.

How does S3 compatibility save you from a rewrite?

S3 compatibility is the feature that pays for itself the day you point existing tooling at the box. Because RustFS matches the S3 bucket, object, and credential model, the same client code that targets AWS S3 also targets your node on port 9000. MinIO's mc, the aws CLI with --endpoint-url, AWS SDKs, and the RustFS-native rc client all work against the same keys. You are not locked into one client. The RustFS rc client handles both object operations and admin checks, so rc alias set, rc bucket create, and rc object copy behave like their mc counterparts. That means the migration story is configuration, not code. Point the endpoint at your host, drop in the keys, and the application that expected S3 talks to your hardware instead. The lock-in you avoid is the one you would have built by writing around a proprietary API, and that is worth more than any single feature on the list.

What RustFS does and doesn't do today

RustFS today is a complete Apache 2.0 S3-compatible server for single-node and distributed deployments. The project's own Feature & Status table lists S3 core operations, versioning, Object Lock (WORM), lifecycle management (ILM), RustFS KMS, bucket replication, site replication, audit logging, IAM and policies, event notifications, and S3 Select as Available. That is a real toolkit, not a promise list. Two areas still carry a Preview label: S3 Tables, which ships as an Iceberg REST Catalog, and MinIO on-disk compatibility, which sits behind an opt-in feature and is not in the default build. There is also no FUSE or POSIX mount, so you expose S3 to applications rather than mounting a filesystem. If your plan needs a mounted drive, this is not the tool yet. For serving S3 to applications on your own hardware, the available feature set covers most self-hosting needs today, and the gaps are clearly marked rather than hidden.

What breaks first when you self-host?

The first things to break are rarely the storage engine. They are the operational basics you stopped thinking about when a vendor handled them. Disk fills, certs expire, the server reboots after an update and does not come back because a mount lost its permissions, the default credentials never got changed and something found port 9000. None of these are RustFS bugs; they are the cost of owning the box. Keep the service under systemd so it restarts on boot, watch systemctl status rustfs for the active line, and set a calendar item for cert renewal if you enabled TLS. Because single-node mode has no redundancy, a backup job or a bucket replication to a second site is not optional polish. The console on 9001 gives you a visual check of bucket and object state. Self-hosting trades a recurring fee for recurring attention, and the attention is what keeps the door shut when something on the network starts knocking.

FAQ

Is RustFS free to self-host on bare metal?

Yes. RustFS is licensed under Apache 2.0, so you can run it on your own hardware at no license cost. You pay only for the server, the disks, and your time to operate it. There is no per-seat or per-gigabyte fee from the project itself.

What are the default RustFS credentials?

The default access key and secret key are both rustfsadmin. The README documents these and warns you to replace them. Set RUSTFS_ACCESS_KEY and RUSTFS_SECRET_KEY and restart the service before exposing port 9000 or 9001 to any network.

Which RustFS features are still in preview?

As of the project's Feature & Status table (re-checked 2026-11-10), S3 Tables (Iceberg REST Catalog) and MinIO on-disk compatibility are marked Preview. S3 Tables ships as an Iceberg REST Catalog; MinIO on-disk compatibility sits behind an opt-in feature and is not in the default build.

Can RustFS mount a filesystem like FUSE or NFS?

No. RustFS exposes the S3 API (port 9000) and a web console (port 9001); it does not provide a FUSE or POSIX mount. Applications talk to it over S3, not by mounting a directory. If you need a mounted filesystem, this is not the right tool today.

What port does RustFS use, and do both need to be open?

The S3 API listens on port 9000 and the web console on 9001. Both must be reachable: 9000 for client and application traffic, 9001 for the browser console. Opening 9000 to a network before changing the default credentials is the single most common mistake.


Article type: a documentation-grounded walkthrough, not a production-environment hands-on report.

Every command above is copied verbatim from the RustFS GitHub README (Docker Quick Start and Feature & Status sections), re-checked on 2026-11-10. The default credentials, ports, non-root UID/GID, and feature status all come from that same source. This sandbox has no Docker daemon, so none of the commands were executed here; they are included as verbatim references, not as output I produced. I did not stand up a production deployment, run a concurrent load test, or perform a failure-injection recovery drill. Before you trust a bare-metal node with real data, validate the install on your own hardware, confirm uploads and deletes work, and keep a rollback plan. The gaps listed (Preview features, no FUSE mount) are documented limitations, not speculation.

Sources

What is the one operational habit you wish you had built before your first self-hosted service?

Top comments (0)