This only works with an Ubuntu machine, so ensure the underlying OS is verified beforehand!
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.
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.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
Yto 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
Yto 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.
Update
To update Formbricks for a minor or patch release, run:Stop
To stop Formbricks, simply run the following command:Restart
To restart Formbricks, simply run the following command:Cleanup RustFS init (optional)
During the one-click setup, a temporaryrustfs-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!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.