Optional: add RustFS for file storage
RustFS provides S3-compatible object storage for file uploads in Formbricks. It is not required for the baseline Docker setup. Add it only when you want features like image uploads, survey file uploads, or custom logos.For a broader overview of file storage options and required environment variables, see our File Uploads
Configuration guide.
Quick start: repository development stack
If you cloned the Formbricks repository, the fastest way to test file uploads locally is to use the includeddocker-compose.dev.yml, which already starts RustFS and auto-creates the formbricks bucket.
This development compose file is not downloaded by the manual production quickstart. If you only
downloaded
docker-compose.yml, use the manual RustFS setup below or the one-click production setup.1
Start the local stack
From the repository root:This starts PostgreSQL, Valkey (Redis), Mailhog, RustFS, a permissions helper, a one-time bucket
bootstrap job, Formbricks Hub, and a local Cube instance for analytics testing.
2
Open the storage console
Open http://localhost:9001 in your browser and sign in with:
- Username:
devrustfs - Password:
devrustfs123
3
Configure Formbricks
Update your
.env file or environment variables:4
Verify uploads
After uploading a file in Formbricks, open http://localhost:9001 and navigate to Buckets → formbricks
to confirm the object was stored successfully.
The development compose file also runs a
rustfs-init job so you do not need to create the bucket manually.Manual RustFS setup (custom configuration)
Recommended: Prefer
docker-compose.dev.yml for local development unless you
need to fold RustFS into an existing custom Compose stack.docker-compose.yml, use a pinned RustFS image plus two helper
services:
.env file next to your docker-compose.yml instead of
hardcoding them in Compose:
rustfs-init job defined above, so no manual
RustFS console step is required.
Restrict the
.env file to 0600 and do not commit it to source control. For production, prefer the
one-click setup script, which creates a separate least-privilege service
account automatically.Tips & common gotchas
-
Permission denied on
/data: Ensure the mounted directory or volume is owned by UID10001. Therustfs-permshelper handles this for Compose-managed volumes. -
Storage medium matters: Prefer local SSD or NVMe storage for
rustfs-data, use XFS on dedicated host-managed disks where possible, and avoid NFS or other network filesystems for RustFS data. -
Connection refused: Ensure the
rustfscontainer is running and port9000is reachable from the Formbricks container. -
Bucket not found: Confirm that
rustfs-initcompleted successfully or create the bucket manually withrc. -
Auth failed: Confirm that
S3_ACCESS_KEYandS3_SECRET_KEYmatch the RustFS credentials configured on the server. -
Backups: Back up the
rustfs-datavolume regularly, especially for single-server deployments. - Console exposure: Do not expose the RustFS console port publicly in production. Keep it on a private network or behind admin-only controls.
-
Health check: From the Formbricks container:
Production setup with Traefik
For production deployments, use the one-click setup script, which automatically configures:- RustFS behind Traefik on a dedicated
files.yourdomain.comsubdomain - Automatic SSL certificate generation via Let’s Encrypt
- CORS configuration scoped to your Formbricks domain
- Rate limiting middleware
- Separate RustFS admin and Formbricks service credentials
- A
rustfs-initjob that creates the bucket and access policy
Even in the one-click flow, bundled RustFS remains a convenience-oriented single-server deployment. For
higher availability, stricter operational requirements, or larger storage footprints, prefer external object
storage or a dedicated RustFS deployment managed separately from Formbricks.