# Self-host RustFS

> An S3-compatible object storage server written in Rust, with a web console. One container serves the S3 API on port 9000 and the console on port 9001. Access and secret keys are generated at install time.

- Page: https://levelrail.com/templates/rustfs/
- JSON: https://levelrail.com/templates/rustfs.json
- Category: Storage
- Licence: Apache-2.0 (Permissive license)
- Source: https://github.com/rustfs/rustfs
- Upstream docs: https://docs.rustfs.com/

## Requirements
- Memory: about 256 MiB
- amd64: published, arm64: tested
- Needs configuration before start: no
- Pinned image tag: 1.0.4

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| rustfs | rustfs/rustfs | 1.0.4 | 9001, 9000 | data -> /data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| rustfs | RUSTFS_ACCESS_KEY | generated |
| rustfs | RUSTFS_ADDRESS | preset |
| rustfs | RUSTFS_CONSOLE_ADDRESS | preset |
| rustfs | RUSTFS_CONSOLE_ENABLE | preset |
| rustfs | RUSTFS_SECRET_KEY | generated |

## Deploy

### CLI

```bash
levelrail-cli templates deploy rustfs --name my-rustfs
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/rustfs/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## First run
1. Sign in to the console with the access key and secret key from the service environment settings.

## Questions

### Can I deploy RustFS on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id rustfs for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image rustfs/rustfs:1.0.4 is what you deploy there.

Self-host RustFS, RustFS docker compose file, deploy RustFS on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
