Docker Setup
Set up Formbricks quickly using our ready-to-use Docker image.
The image is pre-built and requires minimal setup—just download it and start the container.
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 the command below to generate a random string using openssl
and automatically insert it into the docker-compose.yml
file:
- Generate Encryption Key
Next, you need to generate an Encryption Key. This will be used for authenticating and verifying 2 Factor Authentication. The sed
command below generates a random string using openssl
, then replaces the ENCRYPTION_KEY:
placeholder in the docker-compose.yml
file with this generated secret:
- Generate Cron Secret
You require a Cron secret to secure API access for running cron jobs. Run the command below to generate a random string using openssl
and automatically insert it into the docker-compose.yml
file:
- 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 -d
flag 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
Debug
If you encounter any issues, you can check the logs of the container with this command:
In an ideal case, you should see this:
And at the tail of the output, you should see this:
You can close the logs again by hitting CTRL + C
.
Customizing environment variables
To edit any of the available environment variables, check out our Configure section!
If you have any questions or require help, feel free to reach out to us on GitHub Discussions. 😃
Was this page helpful?