Skip to main content
This only works with an Ubuntu machine, so ensure the underlying OS is verified beforehand!
If you’re looking to quickly set up a production instance of Formbricks on an Ubuntu server, this guide is for you. Using a convenient shell script, you can install everythingβ€”including Docker, Postgres DB, and an SSL certificateβ€”in just a few steps. The script takes care of all the dependencies and configuration for your server, making the process smooth and simple.
This setup uses Traefik as a reverse proxy, essential for directing incoming traffic to the correct container and enabling secure internet access to Formbricks. Traefik is chosen for its simplicity and automatic SSL management via Let’s Encrypt.
The bundled RustFS option in this one-click setup is designed for convenience on a single server. It is a good fit for small-scale or low-complexity self-hosted deployments, but it is not the ideal RustFS architecture for high-availability or larger production environments. For stricter production requirements, use external object storage or run a dedicated RustFS deployment separately from the Formbricks one-click stack.
When bundled RustFS is enabled, the installer stores the generated RustFS credentials in ./formbricks/.env and restricts the file to 0600. Keep that file private, include it in your server backup plan, and avoid checking it into source control or copying it to shared locations.
For better RustFS performance and stability, prefer local SSD or NVMe-backed storage for the host volume behind rustfs-data. Avoid NFS and other network filesystems for bundled RustFS data, and use XFS on dedicated storage disks when you manage the host layout yourself.
For other operating systems or a more customized installation, please refer to the advanced installation guide with Docker.

Requirements

  • An Ubuntu Virtual Machine with SSH access.
  • A custom domain with an A record pointing to your server.
  • Ports 80 and 443 are open in your VM’s Security Group, allowing Traefik to create an SSL certificate.

Deployment

Run this command in your terminal:
The current v5 one-click stack is based on the production Docker Compose file and includes Formbricks Hub and Cube as part of the baseline (Cube configuration lives under formbricks/cube/). Ensure your generated formbricks/docker-compose.yml contains a non-empty HUB_API_KEY and that formbricks/.env contains CUBEJS_API_SECRET before treating the v5 stack as ready. If either value is missing after the script finishes, add it manually. HUB_API_URL should normally stay at http://hub:8080.
The v5 one-click Traefik setup also exposes Hub-backed FeedbackRecords through Formbricks at /api/v3/feedbackRecords and /v1/feedback-records. Traefik calls the internal Formbricks gateway auth endpoint first, then forwards allowed requests to Hub with the generated HUB_API_KEY. Browser callers should request short-lived gateway tokens from /api/v3/gateway/token with { "service": "feedbackRecords" }.

Script Prompts

During installation, the script will prompt you to provide some details:
  • Overwriting Docker GPG Keys: If Docker GPG keys already exist, the script will ask whether you want to overwrite them.
  • Domain Name: Enter the domain name where you’ll host Formbricks. The domain will be used to generate an SSL certificate. Do not include the protocol (http/https).
  • HTTPS Certificate Setup: The script will ask if you’d like to create an HTTPS certificate for your domain. Enter Y to proceed (highly recommended for secure access).
  • DNS Setup Prompt: Ensure that your domain’s DNS is correctly configured and ports 80 and 443 are open. Confirm this by entering Y. This step is crucial for proper SSL certificate issuance and secure server access.
  • Email Address for SSL Certificate: Provide an email address to register the SSL certificate. Notifications regarding the certificate will be sent to this address.
  • Enforce HTTPS with HSTS: Enabling HTTP Strict Transport Security (HSTS) ensures all communication with your server is encrypted. It’s a recommended best practice. Enter Y to enforce HTTPS.
  • Email Service Setup Prompt: The script will ask if you want to set up the email service. EnterΒ YΒ to proceed.(default isΒ N). You can skip this step if you don’t want to set up the email service. You will still be able to use Formbricks without setting up the email service.
That’s it! After running the command and providing the required information, visit the domain name you entered, and you should see the Formbricks home wizard!

Update

To update Formbricks for a minor or patch release, run:
The script pulls the latest images, stops the running containers, and starts the stack again.
./formbricks.sh update does not rewrite your existing formbricks/docker-compose.yml. For a major migration such as Formbricks 4.x to 5.0, follow the migration guide first, merge the current v5 Compose changes into your existing deployment, confirm HUB_API_KEY is set, and only then run the update command. If your older one-click install also uses bundled MinIO for file uploads, review that storage path separately before the first v5 restart; newer self-hosting updates move the bundled object-storage path to RustFS, while external S3-compatible storage keeps the same S3_* app contract.

Stop

To stop Formbricks, simply run the following command:
The script will automatically stop all the Formbricks related containers and brings the entire stack down.

Restart

To restart Formbricks, simply run the following command:
The script will automatically restart all the Formbricks related containers and brings the entire stack up with the previous configuration.

Cleanup RustFS init (optional)

During the one-click setup, a temporary rustfs-init service configures RustFS (bucket, policy, service user). It is idempotent and safe to leave in place; it will do nothing on subsequent starts once the configuration exists. If you prefer to remove the rustfs-init service and its references after a successful setup, run:
./formbricks.sh cleanup-minio-init is still available as a backward-compatible alias. This only removes the init job and its Compose references; it does not delete any data or affect your RustFS configuration.

Uninstall

To uninstall Formbricks, simply run the following command, but keep in mind that this will delete all your data!
The script will automatically stop all the Formbricks related containers, remove the Formbricks directory, and delete the Docker network.

Debug

If you encounter any issues, you can check the logs of the containers with:

Troubleshooting

If you encounter any issues, consider the following steps:
  • Inbound Rules: Make sure you have added inbound rules for Port 80 and 443 in your VM’s Security Group.
  • A Record: Verify that you have set up an A record for your domain, pointing to your VM’s IP address.
  • Check Docker Instances: RunΒ docker psΒ to check the status of the Docker instances.
  • Check Formbricks Logs: RunΒ cd formbricks && docker compose logsΒ to check the logs of the Formbricks stack.
If you have any questions or require help, feel free to reach out to us onΒ GitHub Discussions. πŸ˜ƒ