Requirements
Make sure Docker and Docker Compose are installed on your system. These are usually included in tools like Docker Desktop and Rancher Desktop.docker compose without the hyphen is now the primary method of using docker-compose, according to the
Docker documentation.Start
-
Create a New Directory for Formbricks
Open a terminal and run the following commands to create and enter a new directory for Formbricks:
-
Download the Docker-Compose File
Get the docker-compose file from the Formbricks repository by running:
-
Generate NextAuth Secret
You need a NextAuth secret for session signing and encryption. Run one of the commands below based on your operating system:
For Linux:
For macOS:
-
Generate Encryption Key
Next, you need to generate an Encryption Key. This will be used for authenticating and verifying 2 Factor Authentication. Run one of the commands below based on your operating system:
For Linux:
For macOS:
-
Generate Cron Secret
You require a Cron secret to secure API access for running cron jobs. Run one of the commands below based on your operating system:
For Linux:
For macOS:
-
Start the Docker Setup
Now, you’re ready to run Formbricks with Docker. Use the command below to start Formbricks along with a PostgreSQL database using Docker Compose:
The
-dflag runs the containers in the background, so they keep running even after you close the terminal. - Open Formbricks in Your Browser Once the setup is running, open http://localhost:3000 in your browser to access Formbricks. The first time you visit, you’ll see a setup wizard. Follow the steps to create your first user and start using Formbricks.
Update
Please take a look at our migration guide for version specific steps to update Formbricks.-
Pull the latest Formbricks image
-
Stop the Formbricks stack
-
Re-start the Formbricks stack with the updated image
Optional: Adding MinIO for File Storage
MinIO provides S3-compatible object storage for file uploads in Formbricks. If you want to enable features like image uploads, file uploads in surveys, or custom logos, you can add MinIO to your Docker setup.For detailed information about file storage options and configuration, see our File Uploads
Configuration guide.
For production deployments with HTTPS, use the one-click setup script
which automatically configures MinIO with Traefik, SSL certificates, and a subdomain (required for MinIO in
production). The setups below are suitable for local development or testing only.
Quick Start: Using docker-compose.dev.yml
The fastest way to test MinIO with Formbricks is to use the includeddocker-compose.dev.yml which already has MinIO pre-configured.
-
Start MinIO and Services
From the repository root:
This starts PostgreSQL, Valkey (Redis), MinIO, and Mailhog.
-
Access MinIO Console
Open http://localhost:9001 in your browser.
Login credentials:
- Username:
devminio - Password:
devminio123
- Username:
-
Create Bucket
- Click “Buckets” in the left sidebar
- Click “Create Bucket”
- Name it:
formbricks
-
Configure Formbricks
Update your
.envfile or environment variables with MinIO configuration: -
Verify in MinIO Console
After uploading files in Formbricks, view them at http://localhost:9001:
- Navigate to Buckets → formbricks → Browse
- Your uploaded files will appear here
The
docker-compose.dev.yml file includes MinIO with console access on port 9001, making it easy to
visually verify file uploads. This is the recommended approach for development and testing.Manual MinIO Setup (Custom Configuration)
Recommended: If you can, use
docker-compose.dev.yml for the fastest path. Use
this manual approach only when you need to integrate MinIO into an existing docker-compose.yml
or customize settings.docker-compose.yml, follow these steps:
-
Add the MinIO service
Add this service alongside your existing
formbricksandpostgresservices:For production pinning, consider using a digest (e.g.,minio/minio@sha256:…) and review periodically withdocker inspect minio/minio:latest. -
Declare the MinIO volume
Add (or extend) your
volumesblock: -
Start services
-
Open the MinIO Console & Create a Bucket
- Visit http://localhost:9001
- Log in with:
- Username:
formbricks-root - Password:
change-this-secure-password
- Username:
- Go to Buckets → Create Bucket
- Name it:
formbricks
-
Configure Formbricks to use MinIO
In your
.envorformbricksservice environment, set:These credentials should matchMINIO_ROOT_USERandMINIO_ROOT_PASSWORDabove. For local/dev this is fine. For production, create a dedicated MinIO user with restricted policies. -
Verify uploads
After uploading a file in Formbricks, check http://localhost:9001:
- Buckets → formbricks → Browse
You should see your uploaded files.
- Buckets → formbricks → Browse
Tips & Common Gotchas
- Connection refused: Ensure the
miniocontainer is running and port 9000 is reachable from the Formbricks container (use the internal URLhttp://minio:9000). - Bucket not found: Create the
formbricksbucket in the console before uploading. - Auth failed: Confirm
S3_ACCESS_KEY/S3_SECRET_KEYmatch MinIO credentials. - Health check: From the Formbricks container:
Production Setup with Traefik
For production deployments, use the one-click setup script which automatically configures:- MinIO service with Traefik reverse proxy
- Dedicated subdomain (e.g.,
files.yourdomain.com) - required for production - Automatic SSL certificate generation via Let’s Encrypt
- CORS configuration for your domain
- Rate limiting middleware
- Secure credential generation
Debug
If you encounter any issues, you can check the logs of the container with this command:CTRL + C.
Customizing environment variablesTo edit any of the available environment variables, check out our Configuration section!