Self-Hosting
One-Click Setup
If you want to quickly set up a production instance of Formbricks on a server running Ubuntu, we've got you covered! This method utilizes a convenient shell script that takes care of everything, including Docker, Postgres DB, and SSL certificate configuration. The shell script will automatically install all the required dependencies and configure your server, making the process a breeze.
This is the quickest way to get Formbricks up and running on an Ubuntu server. The shell script will automatically install all the required dependencies and configure your server, making the process a breeze.
Requirements
Before you proceed, make sure you have the following:
-
A Linux Ubuntu Virtual Machine deployed with SSH access.
This only works with an Ubuntu machine so please verify the underlying OS beforehand! -
An A record set up to connect a custom domain to your instance. Formbricks will automatically create an SSL certificate for your domain using Let's Encrypt.
Single Command Setup
Copy and paste the following command into your terminal:
Single Command to deploy Formbricks
curl -fsSL https://raw.githubusercontent.com/formbricks/formbricks/main/docker/production.sh -o formbricks.sh && chmod +x formbricks.sh && ./formbricks.sh install
The script will prompt you for the following information:
- Overwriting Docker GPG Keys: If Docker GPG keys already exist, the script will ask if you want to overwrite them.
Docker GPG Keys Overwrite Prompt
π§± Welcome to the Formbricks single instance installer
πΈ Fasten your seatbelts! We're setting up your Formbricks environment on your Ubuntu 22.04.2 LTS server.
π§Ή Time to sweep away any old Docker installations.
π Updating your package list.
π¦ Installing the necessary dependencies.
π Adding Docker's official GPG key and setting up the stable repository.
File '/etc/apt/keyrings/docker.gpg' exists. Overwrite? (y/N)
- Email Address: Provide your email address for SSL certificate registration with Let's Encrypt.
Email Prompt
π§± Welcome to the Formbricks single instance installer
πΈ Fasten your seatbelts! We're setting up your Formbricks environment on your Ubuntu 22.04.2 LTS server.
π§Ή Time to sweep away any old Docker installations.
π Updating your package list.
π¦ Installing the necessary dependencies.
π Adding Docker's official GPG key and setting up the stable repository.
File '/etc/apt/keyrings/docker.gpg' exists. Overwrite? (y/N) y
π Updating your package list again.
π³ Installing Docker.
π Testing your Docker installation.
π Docker is installed!
π³ Adding your user to the Docker group to avoid using sudo with docker commands.
π Hooray! Docker is all set and ready to go. You're now ready to run your Formbricks instance!
π Installing Traefik...
π Created Formbricks Quickstart directory at ./formbricks.
π‘ Please enter your email address for the SSL certificate:
- Domain Name: Enter the domain name that Traefik will use to create the SSL certificate and forward requests to Formbricks.
Domain Name for SSL certificate Prompt
π§± Welcome to the Formbricks single instance installer
πΈ Fasten your seatbelts! We're setting up your Formbricks environment on your Ubuntu 22.04.2 LTS server.
π§Ή Time to sweep away any old Docker installations.
π Updating your package list.
π¦ Installing the necessary dependencies.
π Adding Docker's official GPG key and setting up the stable repository.
File '/etc/apt/keyrings/docker.gpg' exists. Overwrite? (y/N) y
π Updating your package list again.
π³ Installing Docker.
π Testing your Docker installation.
π Docker is installed!
π³ Adding your user to the Docker group to avoid using sudo with docker commands.
π Hooray! Docker is all set and ready to go. You're now ready to run your Formbricks instance!
π Installing Traefik...
π Created Formbricks Quickstart directory at ./formbricks.
π‘ Please enter your email address for the SSL certificate:
docs@feedbackflowhq.com
π‘ Created traefik.yaml file with your provided email address.
π‘ Created acme.json file with correct permissions.
π Please enter your domain name for the SSL certificate (π¨ do NOT enter the protocol (http/https/etc)):
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!
Successfully setup Formbricks on your Ubuntu machine
π§± Welcome to the Formbricks single instance installer
πΈ Fasten your seatbelts! We're setting up your Formbricks environment on your Ubuntu 22.04.2 LTS server.
π§Ή Time to sweep away any old Docker installations.
π Updating your package list.
π¦ Installing the necessary dependencies.
π Adding Docker's official GPG key and setting up the stable repository.
File '/etc/apt/keyrings/docker.gpg' exists. Overwrite? (y/N) y
π Updating your package list again.
π³ Installing Docker.
π Testing your Docker installation.
π Docker is installed!
π³ Adding your user to the Docker group to avoid using sudo with docker commands.
π Hooray! Docker is all set and ready to go. You're now ready to run your Formbricks instance!
π Installing Traefik...
π Created Formbricks Quickstart directory at ./formbricks.
π‘ Please enter your email address for the SSL certificate:
docs@feedbackflowhq.com
π‘ Created traefik.yaml file with your provided email address.
π‘ Created acme.json file with correct permissions.
π Please enter your domain name for the SSL certificate (π¨ do NOT enter the protocol (http/https/etc)):
my.hosted.url.com
π Updating NEXTAUTH_SECRET in the Formbricks container...
π NEXTAUTH_SECRET updated successfully!
[+] Running 4/4
β Network formbricks_default Created 0.1s
β Container formbricks-postgres-1 Started 0.5s
β Container formbricks-formbricks-1 Started 0.7s
β Container traefik Started 1.1s
π¨ Make sure you have set up the DNS records as well as inbound rules for the domain name and IP address of this instance.
π All done! Check the status of Formbricks & Traefik with 'cd formbricks && sudo docker compose ps.'
Update Formbricks
To update Formbricks, simply run the following command:
Update Formbricks
./formbricks.sh update
The script will automatically pull the latest version of Formbricks from GitHub Container Registry and restart the containers.
Stop Formbricks Instance
To stop Formbricks, simply run the following command:
Stop Formbricks
./formbricks.sh stop
The script will automatically stop all the Formbricks related containers and brings the entire stack down.
Restart Formbricks Instance
To restart Formbricks, simply run the following command:
Restart Formbricks
./formbricks.sh restart
The script will automatically restart all the Formbricks related containers and brings the entire stack up with the previous configuration.
Uninstall Formbricks
To uninstall Formbricks, simply run the following command, but keep in mind that this will delete all your data!
Uninstall Formbricks
./formbricks.sh uninstall
The script will automatically stop all the Formbricks related containers, remove the Formbricks directory, and delete the Docker network.
Debugging
If you encounter any issues, you can check the logs of the container with:
Check logs of the container
cd formbricks && docker compose logs -f
You can close the logs again with CTRL + C
.
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.
Still canβt figure it out?: Join our Discord!