Documentation Index
Fetch the complete documentation index at: https://formbricks.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
v5
Formbricks v5 changes the self-hosted runtime contract. If you are upgrading an existing Formbricks 4.x deployment, review this section before starting the new version.What Changes In v5
- Formbricks Hub is now mandatory for self-hosted Formbricks v5 deployments.
- Edge rate limiting is now required for specific public and API-key routes. Those routes are no longer throttled inside the application server.
- AI features are configured at the instance level via
AI_*environment variables. - XM Suite v5 analytics depends on Cube.js. The Docker and one-click stack bundle it, while Helm
deployments still need a separate reachable Cube.js instance and
CUBEJS_API_SECRET.
Before You Upgrade
Before you restart your instance on Formbricks v5:- back up your database
- identify your current deployment type: one-click, manual Docker Compose, or Kubernetes/Helm
- confirm Redis/Valkey and your file storage setup are already healthy from your v4 baseline
- identify whether file uploads use external S3-compatible storage or a legacy bundled MinIO service
- decide whether this instance needs AI features, dashboards/analysis, or only core survey flows
- verify whether you already run Envoy Gateway or another equivalent edge rate limiter for the covered routes
Required Config And Infrastructure Changes
Formbricks Hub
Formbricks v5 expects Hub to be part of the self-hosted stack.HUB_API_KEYis requiredHUB_API_URLmust point to the Hub service the Formbricks app can reachHUB_DATABASE_URLis optional; when unset, Hub can share the same PostgreSQL database as Formbricks- bundled Docker and Helm assets run Hub database migrations automatically during startup or upgrade, and the migration steps are idempotent
Hub-specific source code and standalone deployment assets live in the
Formbricks Hub repository. For a normal Formbricks v5 upgrade, use that
repository as reference material only; the canonical migration steps stay in these Formbricks docs.
Edge Rate Limiting
Formbricks v5 splits rate limiting across two layers:- Envoy Gateway, or an equivalent edge rate limiter, for covered public and API-key routes
- the application server for the remaining session-authenticated routes, server actions, and uncovered APIs
AI Features
AI features are optional and only need instance-level configuration if you want to enable the related enterprise functionality.AI_PROVIDERandAI_MODELare the base settingsAI_PROVIDER=awsrequiresAI_AWS_REGION,AI_AWS_ACCESS_KEY_ID, andAI_AWS_SECRET_ACCESS_KEYAI_PROVIDER=googlerequiresAI_GOOGLE_CLOUD_PROJECT,AI_GOOGLE_CLOUD_LOCATION, and eitherAI_GOOGLE_CLOUD_CREDENTIALS_JSONorAI_GOOGLE_CLOUD_APPLICATION_CREDENTIALSAI_PROVIDER=azurerequiresAI_AZURE_API_KEYand eitherAI_AZURE_BASE_URLorAI_AZURE_RESOURCE_NAME
Cube.js Analytics
XM Suite v5 dashboard and analysis features require Cube.js.- the Docker and one-click stack bundle the
cubeservice and expectCUBEJS_API_SECRET - Helm deployments still need a separate reachable Cube.js instance
- the Formbricks app expects
CUBEJS_API_URLandCUBEJS_API_SECRET - if you run Cube yourself, you may also need to override
CUBEJS_DB_*values for the Cube service
Upgrade Steps By Deployment Type
1. Back up your database- One-Click
- Docker Compose
- Kubernetes
From the
formbricks directory created by the installer:If your PostgreSQL service name differs, run
docker compose ps first and adjust the command.- One-Click
- Docker Compose
- Kubernetes
The one-click Then compare
./formbricks.sh update command only pulls new images. It does not rewrite your existing
formbricks/docker-compose.yml, so you must merge the v5 stack changes before the first v5 restart.formbricks/docker-compose.v5.yml with your existing formbricks/docker-compose.yml and merge
the v5 additions:- add a non-empty
HUB_API_KEYand reuse the same value wherever your deployment resolves Hub auth - keep
HUB_API_URLathttp://hub:8080unless Hub runs elsewhere - include the bundled
hub-migrateandhubservices - if you use the bundled XM Suite v5 analytics stack, sync
formbricks/cube/cube.jsandformbricks/cube/schema/FeedbackRecords.jsfrom the current release and ensureformbricks/.envcontainsCUBEJS_API_SECRET - if your older setup still uses bundled MinIO for 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 - add any
AI_*variables you need - if you do not run the bundled Docker analytics path, point
CUBEJS_API_URLat your external Cube.js instance and provide the matchingCUBEJS_API_SECRET
Post-Upgrade Verification
After the upgrade:- confirm the Formbricks app starts and
GET /healthreturns successfully - confirm the Hub service is healthy and reachable from the Formbricks app
- verify any Hub-backed connector or feedback flows you use
- verify covered routes are rate-limited at the edge layer
- verify AI features only if you configured the required
AI_*variables - verify dashboards and analysis flows only if your deployment path includes Cube.js or points to an external Cube.js instance
Troubleshooting And Rollback
Common upgrade issues:- Missing
HUB_API_KEY: Formbricks cannot authenticate to Hub, and Hub itself may fail to start - Bad
HUB_API_URL: the app starts, but Hub-backed features fail because the service cannot be reached - No edge rate limiter in front of covered routes: the v5 deployment runs, but those routes are no longer protected by the legacy in-app limiter
- Missing AI credentials: AI features remain unavailable until
AI_PROVIDER,AI_MODEL, and the matching provider credentials are set correctly - Cube not configured: dashboards or analysis queries fail even though the core Formbricks app is healthy
- restore the pre-upgrade database backup if schema or data changes require it
- revert your image tags or Helm release values to the last known-good Formbricks 4.x version
- revert compose or Helm configuration changes introduced for the v5 rollout
Formbricks v5 also includes the Environment ID to Workspace ID transition for SDK setup. If you still rely on a
legacy Environment ID, read the Migrate to Workspace ID guide.
v4.7
Formbricks v4.7 introduces typed contact attributes with nativenumber and date data types. This enables comparison-based segment filters (e.g. “signup date before 2025-01-01”) that were previously not possible with string-only attribute values.
What Happens Automatically
When Formbricks v4.7 starts for the first time, the data migration will:- Analyze all existing contact attribute keys and infer their data types (
text,number, ordate) based on the stored values - Update the
ContactAttributeKeytable with the detecteddataTypefor each key - If your instance has fewer than 1,000,000 contact attribute rows: backfill the new
valueNumberandvalueDatecolumns inline. No manual action is needed. - If your instance has 1,000,000 or more contact attribute rows: the value backfill is skipped to avoid hitting the migration timeout. You will need to run a standalone backfill script after the upgrade.
Most self-hosted instances have far fewer than 1,000,000 contact attribute rows (a typical setup with 100K
contacts and 5-10 attributes each lands around 500K-1M rows). If you are below the threshold, the migration
handles everything automatically and you can skip the manual backfill step below.
Steps to Migrate
1. Backup your Database- Docker
- Kubernetes
Before running these steps, navigate to the
formbricks directory where your docker-compose.yml file is located.If you run into “No such container”, use
docker ps to find your container name, e.g.
formbricks_postgres_1.- Docker
- Kubernetes
- Docker
- Kubernetes
Skipping value backfill (X rows >= 1000000 threshold), proceed to step 4. Otherwise, the migration is complete and no further action is needed.
4. Run the Backfill Script (large datasets only)
If the migration skipped the value backfill, run the standalone backfill script inside the running Formbricks container:
- Docker
- Kubernetes
Replace
formbricks with your actual container name if it differs. Use docker ps to find it.- Safe to run while Formbricks is live — it does not lock the entire table or wrap work in a long transaction
- Idempotent — it only updates rows where the typed columns are still
NULL, so you can safely run it multiple times - Resumable — each batch commits independently, so if the process is interrupted you can re-run it and it picks up where it left off
- No timeout risk — unlike the migration, this script runs outside the migration transaction and has no time limit
- Access your Formbricks instance at the same URL as before
- If you use contact segments with number or date filters, verify they return the expected results
- Check that existing surveys and response data are intact
v4.0
Formbricks 4.0 is a major milestone that sets up the technical foundation for future iterations and feature improvements. This release focuses on modernizing core infrastructure components to improve reliability, scalability, and enable advanced features going forward.What’s New in Formbricks 4.0
🚀 New Enterprise Features:- Quotas Management: Advanced quota controls for enterprise users
- Enhanced File Storage: Improved file handling with better performance and reliability
- Improved Caching: New caching functionality improving speed, extensibility and reliability
- Database Optimization: Removal of unused database tables and fields for better performance
- Future-Ready Architecture: Standardized infrastructure components for upcoming features
What This Means for Your Self-Hosting Setup
These improvements in Formbricks 4.0 also make some infrastructure requirements mandatory going forward:- Redis for caching
- RustFS or S3-compatible storage for file uploads
Why We Made These Changes
We know this represents more moving parts in your infrastructure and might even introduce more complexity in hosting Formbricks, and we don’t take this decision lightly. As Formbricks grows into a comprehensive Survey and Experience Management platform, we’ve reached a point where the simple, single-service approach was holding back our ability to deliver the reliable, feature-rich product our users demand and deserve. By moving to dedicated, professional-grade services for these critical functions, we’re building the foundation needed to deliver:- Enterprise-grade reliability with proper redundancy and backup capabilities
- Advanced features that require sophisticated caching and file processing
- Better performance through optimized, dedicated services
- Future scalability to support larger deployments and more complex use cases without the need to maintain two different approaches
Migration Steps for v4.0
Additional migration steps are needed if you are using a self-hosted Formbricks setup that uses either local file storage (not S3-compatible file storage) or doesn’t already use a Redis cache.Legacy one-click v4.0 upgrade
For historical v4.0 upgrades, our original one-click migration script is still available:- Adds a Redis service to your setup and configures it
- Adds a bundled MinIO service to your setup, configures it, and migrates local files to it
- Pulls the latest Formbricks image and updates your instance
Manual Setup
If you use a different setup to host your Formbricks instance, you need to make sure to make the necessary adjustments to run Formbricks 4.0.Redis
Formbricks 4.0 requires a Redis instance to work properly. Please add a Redis instance to your Docker setup, your K8s infrastructure, or however you are hosting Formbricks at the moment. Formbricks works with the latest versions of Redis as well as Valkey. You need to configure theREDIS_URL environment variable and point it to your Redis instance.
S3-compatible storage
To use file storage (e.g., file upload questions, image choice questions, custom survey backgrounds, etc.), you need to have S3-compatible file storage set up and connected to Formbricks. Formbricks supports multiple storage providers (among many other S3-compatible storages):- AWS S3
- Digital Ocean Spaces
- Hetzner Object Storage
- Custom RustFS server
Upgrade Process
1. Backup your Database Critical Step: Create a complete database backup before proceeding. Formbricks 4.0 will automatically remove unused database tables and fields during startup.If you run into “No such container”, use
docker ps to find your container name, e.g.
formbricks_postgres_1.- Detect and apply required database schema updates
- Remove unused database tables and fields
- Optimize the database structure for better performance
- Access your Formbricks instance at the same URL as before
- Test file uploads to ensure S3 storage integration works correctly. Check the File Upload Troubleshooting section if you face any issues.
- Verify that existing surveys and data are intact
- Check that previously uploaded files are accessible
v3.3
With Formbricks 3.0, we introduced an automatic data migration system. If you’re using a version older than
v2.7, you must upgrade step-by-step through earlier versions (e.g. 2.4 → 2.5 → 2.6 → 2.7). Once you
reach v2.7, you can upgrade directly to any v3.x or future release without needing intermediate
migrations.
Steps to Migrate
This guide is for users who are self-hosting Formbricks using the one-click setup. If you have a different setup, you may need to adjust the commands accordingly. Before running these steps, navigate to theformbricks directory where your docker-compose.yml file is located.
- Backup your Database: Backing up your database is crucial before upgrading. Use the following command to create a backup:
If you run into “No such container”, use
docker ps to find your container name,
e.g. formbricks_postgres_1.*.sql file remove the -Fc (custom format) option. In case of a restore scenario you will need to use psql then with an empty formbricks database.
- Pull the latest version of Formbricks:
- Stop the running Formbricks instance & remove the related containers:
- Restarting the containers with the latest version of Formbricks:
- Access your updated instance
v3.2
With Formbricks 3.0, we introduced an automatic data migration system. If you’re using a version older than
v2.7, you must upgrade step-by-step through earlier versions (e.g. 2.4 → 2.5 → 2.6 → 2.7). Once you
reach v2.7, you can upgrade directly to any v3.x or future release without needing intermediate
migrations.
Steps to Migrate
This guide is for users who are self-hosting Formbricks using the one-click setup. If you have a different setup, you may need to adjust the commands accordingly. Before running these steps, navigate to theformbricks directory where your docker-compose.yml file is located.
- Backup your Database: Backing up your database is crucial before upgrading. Use the following command to create a backup:
If you run into “No such container”, use
docker ps to find your container name,
e.g. formbricks_postgres_1.*.sql file remove the -Fc (custom format) option. In case of a restore scenario you will need to use psql then with an empty formbricks database.
- Pull the latest version of Formbricks:
- Stop the running Formbricks instance & remove the related containers:
- Restarting the containers with the latest version of Formbricks:
- Access your updated instance
v3.1
With Formbricks 3.0, we introduced an automatic data migration system. If you’re using a version older than
v2.7, you must upgrade step-by-step through earlier versions (e.g. 2.4 → 2.5 → 2.6 → 2.7). Once you
reach v2.7, you can upgrade directly to any v3.x or future release without needing intermediate
migrations.
Steps to Migrate
This guide is for users who are self-hosting Formbricks using the one-click setup. If you have a different setup, you may need to adjust the commands accordingly. Before running these steps, navigate to theformbricks directory where your docker-compose.yml file is located.
- Backup your Database: Backing up your database is crucial before upgrading. Use the following command to create a backup:
If you run into “No such container”, use
docker ps to find your container name,
e.g. formbricks_postgres_1.*.sql file remove the -Fc (custom format) option. In case of a restore scenario you will need to use psql then with an empty formbricks database.
- Pull the latest version of Formbricks:
- Stop the running Formbricks instance & remove the related containers:
- Restarting the containers with the latest version of Formbricks:
- Access your updated instance
v3.0
This major release brings a better approach to data migrations.- If you’re using Formbricks v2.7 or later, you can upgrade directly to v3.x and future versions.
- If you’re on a version older than v2.7, you must upgrade step-by-step (e.g. 2.4 → 2.5 → 2.6 → 2.7) before moving to v3.x.
Steps to Migrate
This guide is for users self-hosting Formbricks with the one-click setup. If you’re using a different setup, you might adjust the commands.- Navigate to the Formbricks Directory
docker-compose.yml file is located.
- Backup Your Database
Note: If you see a “No such container” error, run
docker ps to find your actual container name (e.g.
formbricks_postgres_1).Tip: If you want to store the backup as a
.sql file, remove the -Fc (custom format) option. If you need
to restore it later, use psql with an empty Formbricks database.- Pull the latest version of Formbricks:
- Stop the running Formbricks instance & remove the related containers:
- Restarting the containers with the latest version of Formbricks:
- Access your updated instance
v2.7
AI Features & Database Update: This release lays the groundwork for upcoming AI features, now in private beta. Formbricks requires the
pgvector extension in PostgreSQL.One-Click Setup Users: Use the pgvector/pgvector:pg15 image instead of postgres:15-alpine to ensure compatibility.Additional Updates
If you previously used organisation-based access control (an enterprise feature) and theDEFAULT_ORGANIZATION_ROLE environment variable, update its value to one of these roles: owner, manager, or member. Read more about the new roles in the documentation.
Steps to Migrate
This guide is for users who are self-hosting Formbricks using our one-click setup. If you are using a different setup, you might adjust the commands accordingly. To run all these steps, please navigate to the Formbricks folder where yourdocker-compose.yml file is located.
- Backup your Database: This is a crucial step. Please make sure to backup your database before proceeding with the upgrade. You can use the following command to backup your database.
If you run into “No such container”, use
docker ps to find your container name,
e.g. formbricks_postgres_1.If you want to store the backup as an *.sql file, remove the
-Fc option. To restore, use psql with an
empty Formbricks database.- If you use an older
docker-compose.ymlfile from the one-click setup, modify it to use thepgvector/pgvector:pg15image instead ofpostgres:15-alpine:
- Pull the latest version of Formbricks:
- Stop the running Formbricks instance and remove the related containers:
- Restarting the containers with the latest version of Formbricks:
- Now let’s migrate the data to the latest schema:
- That’s it! Once the migration is finished, you can access your Formbricks instance at the same URL as before.
v2.6
Formbricks v2.6 introduces advanced logic jumps for surveys, allowing more complex branching logic, including variables, conditions, and more. This release also includes numerous bug fixes, significant performance improvements for website and app surveys, and enhanced stability.This release includes the final step of deprecating server-side action tracking (previously used for segment
filtering by performed actions). The migrations will delete all tracked actions from the database. If you
still need these action records, ensure you export them before upgrading.
Steps to Migrate
This guide is for users who are self-hosting Formbricks using our one-click setup. If you’re using a different setup, you might need to adjust the commands accordingly. To run these steps, navigate to the folder where yourdocker-compose.yml file is located.
- Backup your Database: This is an important step. Make sure to back up your database before proceeding with the upgrade. You can use this command to back up your database:
If you get a “No such container” error, run
docker ps to find your container name, for example,
formbricks_postgres_1.If you prefer storing the backup as an
*.sql file remove the -Fc (custom format) option. In case of a
restore scenario, you will need to use psql then with an empty formbricks database.- Pull the latest version of Formbricks:
- Stop the running Formbricks instance & remove the related containers:
- Restarting the containers with the latest version of Formbricks:
- Now let’s migrate the data to the latest schema:
To find the Docker network name for your Postgres database, run the command:
- Once the migration is complete, you can access your Formbricks instance at the same URL as before.
v2.5
Formbricks v2.5 lets you visualise responses in a data table format. This release also brings a few bug fixes and performance improvements.This release fixes the inconsistency of CTA and consent question values when a question is skipped. The
value will now be set to an empty string instead of “dismissed” to maintain consistency with other
questions.
Steps to Migrate
This guide is for users self-hosting Formbricks with our one-click setup. If you’re using a different setup, you may need to adjust the commands. To begin, navigate to the folder where yourdocker-compose.yml file is located.
- Backup your Database: This step is important. Please make sure to back up your database before upgrading. You can use the following command to back up your database:
If you run into “No such container”, use
docker ps to find your container name,
e.g.formbricks_postgres_1.If you prefer storing the backup as an
*.sql file remove the -Fc (custom format) option. In case of a
restore scenario you will need to use psql then with an empty formbricks database.- Pull the latest version of Formbricks:
- Stop the running Formbricks instance & remove the related containers:
- Restarting the containers with the latest version of Formbricks:
- Now let’s migrate the data to the latest schema:
To find your Docker Network name for your Postgres Database, find it using
docker network ls- Once the migration is complete, you can access your Formbricks instance at the same URL as before.
v2.4
Formbricks v2.4 lets you create multiple endings for your surveys and choose which one users see based on logic jumps. This version also includes bug fixes and performance improvements.This release will remove support for advanced targeting (enterprise targeting for app surveys) using actions
(e.g. targeting users who triggered action x 3 times in the last month). Actions can still be used as
triggers, but they will no longer be stored on the server to improve Formbricks’ overall performance.
Steps to Migrate
This guide is for users who are self-hosting Formbricks with our one-click setup. If you’re using a different setup, you may need to adjust the commands accordingly. To follow these steps, go to the folder where yourdocker-compose.yml file is located.
- Backup your Database: This step is important. Please make sure to back up your database before upgrading. You can use the following command to back up your database:
If you run into “No such container”, use
docker ps to find your container name,
e.g. formbricks_postgres_1.If you prefer storing the backup as a
*.sql file, remove the -Fc (custom format) option. In case of a
restore scenario, you will need to use psql then with an empty formbricks database.- Pull the latest version of Formbricks:
- Stop the running Formbricks instance & remove the related containers:
- Restarting the containers with the latest version of Formbricks:
docker network ls
- That’s it! Once the migration is done, you can access your Formbricks instance at the same URL as before.
Additional Updates
- The
CRON_SECRETenvironment variable is now required to enhance the security of the internal cron APIs. Please ensure that this variable is set in your environment ordocker-compose.yml. You can generate a secure secret usingopenssl rand -hex 32
v2.3
Formbricks v2.3 introduces new colour options for rating questions, enhanced multi-language support for Chinese (Simplified & Traditional), and includes several bug fixes and performance improvements.Steps to Migrate
You only need to run the data migration if you have surveys set up in Chinese (
zh). If you don’t have any
surveys in Chinese, you can skip the migration step.docker-compose.yml file is located.
- Backup your Database: This is a crucial step. Please make sure to backup your database before proceeding with the upgrade. You can use the following command to backup your database:
If you run into “No such container”, use
docker ps to find your container name, e.g.
formbricks_postgres_1.If you prefer storing the backup as an
*.sql file remove the -Fc (custom format) option. In case of a
restore scenario you will need to use psql then with an empty formbricks database.- Pull the latest version of Formbricks:
- Stop the running Formbricks instance & remove the related containers:
- Restarting the containers with the latest version of Formbricks:
- Now let’s migrate the data to the latest schema:
To find your Docker Network name for your Postgres Database, find it using
docker network ls- Once the migration is complete, you can access your Formbricks instance at the same URL as before.
Additional Updates
The feature to create short URLs in Formbricks is now deprecated. Existing short URLs will continue to work for now, but it is recommended to use long URLs instead. Support for short URL redirects will be removed in a future release.v2.2
Formbricks v2.2 introduces XM research presets, providing a brand-new product onboarding experience. Our goal is to make user research “obviously easy” across different industries, starting with Software-as-a-Service and E-Commerce.Steps to Migrate
This guide is for users who are self-hosting Formbricks with our one-click setup. If you’re using a different setup, you may need to adjust the commands accordingly. To run all these steps, please navigate to theformbricks folder where your docker-compose.yml file is located.
- Backup your Database: This is a crucial step. Please make sure to backup your database before proceeding with the upgrade. You can use the following command to backup your database:
If you run into “No such container”, use
docker ps to find your container name, e.g.
formbricks_postgres_1.If you prefer storing the backup as an
*.sql file remove the -Fc (custom format) option. In case of a
restore scenario you will need to use psql then with an empty formbricks database.- Pull the latest version of Formbricks:
- Stop the running Formbricks instance & remove the related containers:
- Restarting the containers with the latest version of Formbricks:
- Now let’s migrate the data to the latest schema:
To find your Docker Network name for your Postgres Database, find it using
docker network ls- Once the migration is complete, you can access your Formbricks instance at the same URL as before.
Changes in Environment Variables
- The
ONBOARDING_DISABLEDenvironment variable is now deprecated. We have replaced the user onboarding with a product onboarding process that only runs when creating a new product.
v2.1
Formbricks v2.1 introduces more options for creating No-Code Actions and improves the self-hosting experience with a new onboarding process for fresh instances.To improve the user experience and simplify setup for self-hosting instances, we are transitioning to a single organization model. This change allows self-hosts to manage their instance centrally and more easily control access. A new permissions system will also be introduced soon, providing more granular control over projects and resources within an organization.If you’ve previously created multiple organizations, you can still switch between them in the UI, but creating new organizations will no longer be possible.
Steps to Migrate
This guide is for users self-hosting Formbricks using our one-click setup. If you are using a different setup, you may need to adjust the commands accordingly. To follow these steps, please navigate to the Formbricks folder where yourdocker-compose.yml file is located.
- Backup your Database: This is an essential step. Please ensure that you back up your database before proceeding with the upgrade. You can use the following command to back it up:
If you run into “No such container”, use
docker ps to find your container name, e.g.
formbricks_postgres_1.If you prefer storing the backup as a
*.sql file remove the -Fc (custom format) option. In case of a
restore scenario you will need to use psql then with an empty formbricks database.- Pull the latest version of Formbricks:
- Stop the running Formbricks instance & remove the related containers.
- Restarting the containers with the latest version of Formbricks:
- Now let’s migrate the data to the latest schema:
To find your Docker network name for the Postgres database, run the following
docker network ls- That’s it! Once the migration is complete, you can now access your Formbricks instance at the same URL as before.
Changes in Environment Variables
- SIGNUP_DISABLED is now deprecated. Self-hosting instances have signup disabled by default, and new users can only be invited by the organization owner or admin.
- DEFAULT_TEAM_ID has been renamed to DEFAULT_ORGANIZATION_ID.
- DEFAULT_TEAM_ROLE has been renamed to DEFAULT_ORGANIZATION_ROLE.
v2.0
Formbricks v2.0 introduces significant features such as Multi-Language Surveys and Advanced Styling for Surveys, aimed at improving the flexibility and appearance of your surveys. Additionally, the release includes several optimisations, bug fixes, and smaller improvements to ensure a smoother user experience. If you are upgrading to Formbricks v2.0, follow this guide to ensure a smooth migration of your existing Formbricks instance without encountering issues or build errors.This upgrade requires a data migration. Please make sure to back up your database before proceeding.
Follow the steps below to upgrade your Formbricks instance to v2.0.
If you’ve used the Formbricks Enterprise Edition with a free beta license key, your instance will be
downgraded to the Community Edition 2.0. You can find all license details on the license
page.
Steps to Migrate
This guide is for users who are self-hosting Formbricks using our one-click setup. If you are using a different setup, you might adjust the commands accordingly. To run all these steps, please navigate to theformbricks folder where your docker-compose.yml file is located.
- Backup your Database: This is an essential step. Please ensure that you back up your database before proceeding with the upgrade. You can use the following command to back it up:
If you run into “No such container”, use
docker ps to find your container name,
e.g. formbricks_postgres_1.*.sql file remove the -Fc (custom format) option. In case of a restore scenario you will need to use psql then with an empty formbricks database.
- Pull the latest version of Formbricks:
- Stop the running Formbricks instance & remove the related containers:
- Restarting the containers with the latest version of Formbricks:
- Now let’s migrate the data to the latest schema:
To find your Docker Network name for your Postgres Database, find it using
docker network ls- That’s it! Once the migration is complete, you can now access your Formbricks instance at the same URL as before.
App Surveys with @formbricks/js
With this upgrade, we now dynamically fetch the package from our API endpoint and have updated the package entry points to support both app and website surveys. This ensures that you always have the latest version of the package (v2.0.0+). Old approach: (v1.6.5)v1.6
Formbricks v1.6 introduces key features like Advanced Targeting, Segmentation, on-the-fly survey triggers, and stability improvements. This update also changes some environment variables. Follow this guide to upgrade your Formbricks instance to v1.6 smoothly.This upgrade requires a data migration. Ensure you back up your database before proceeding. Follow the steps
below to upgrade your Formbricks instance to v1.6.
Steps to Migrate
This guide is for users self-hosting Formbricks with our one-click setup. If you’re using a different setup, adjust the commands accordingly. Navigate to the Formbricks folder containing yourdocker-compose.yml file to run the steps.
- Backup your Database: This is a crucial step. Please make sure to backup your database before proceeding with the upgrade. You can use the following command to backup your database:
If you run into “No such container”, use
docker ps to find your container name,
e.g. formbricks_postgres_1.If you prefer storing the backup as a
*.sql file remove the -Fc (custom format) option. In case of a
restore scenario you will need to use psql then with an empty formbricks database.- Stop the running Formbricks instance & remove the related containers:
- Restarting the containers will automatically pull the latest version of Formbricks:
- Now let’s migrate the data to the latest schema:
To find your Docker Network name for your Postgres Database, find it using
docker network ps- That’s it! Once the migration is complete, you can now access your Formbricks instance at the same URL as before.
Restoring the database after a failed upgrade
Replace the path to
formbricks_pre_v1.6_<timestamp_of_your_dump_file>.dump with the exact path to your .dump file.This will wipe the database and restore from the
.dump file.App Surveys with @formbricks/js
If you’re using the @formbricks/js package, update it to version ~1.6.5 to access the latest features and improvements.
Currently, the package needs to be pinned to
~1.6.5, see this
issue.Upgrade and pin the client package
Deprecated Environment Variables
| Environment Variable | Comments |
|---|---|
GITHUB_AUTH_ENABLED | Was used to enable GitHub OAuth, but from v1.6, you can just set the GITHUB_ID and GITHUB_SECRET environment variables. |
GOOGLE_AUTH_ENABLED | Was used to enable Google OAuth, but from v1.6, you can just set the GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET environment variables. |
AZUREAD_AUTH_ENABLED | Was used to enable AzureAD OAuth, but from v1.6, you can just set the AZUREAD_CLIENT_ID, AZUREAD_CLIENT_SECRET & AZUREAD_TENANT_ID environment variables. |
v1.2
Formbricks v1.2 introduces new features for Link Surveys and enhances security. However, there are some breaking changes related to environment variables. This guide will help you upgrade your Formbricks instance to v1.2 smoothly.New Environment Variables
| Environment Variable | Required | Recommended Generation | Comments |
|---|---|---|---|
ENCRYPTION_KEY | true | openssl rand -hex 32 | Needed for 2 Factor Authentication |
Deprecated / Removed Environment Variables
| Environment Variable | Comments |
|---|---|
SURVEY_BASE_URL | The WEBAPP_URL is now used to determine the survey base URL in all places |
v1.1
Formbricks v1.1 introduces new features and improvements but includes breaking changes with environment variables. This guide will help you upgrade your Formbricks instance to v1.1 without data loss.Renamed Environment Variables
| till v1.0 | v1.1 |
|---|---|
NEXT_PUBLIC_EMAIL_VERIFICATION_DISABLED | EMAIL_VERIFICATION_DISABLED |
NEXT_PUBLIC_PASSWORD_RESET_DISABLED | PASSWORD_RESET_DISABLED |
NEXT_PUBLIC_SIGNUP_DISABLED | SIGNUP_DISABLED |
NEXT_PUBLIC_INVITE_DISABLED | INVITE_DISABLED |
NEXT_PUBLIC_PRIVACY_URL | PRIVACY_URL |
NEXT_PUBLIC_TERMS_URL | TERMS_URL |
NEXT_PUBLIC_IMPRINT_URL | IMPRINT_URL |
NEXT_PUBLIC_GITHUB_AUTH_ENABLED | GITHUB_AUTH_ENABLED |
NEXT_PUBLIC_GOOGLE_AUTH_ENABLED | GOOGLE_AUTH_ENABLED |
NEXT_PUBLIC_WEBAPP_URL | WEBAPP_URL |
NEXT_PUBLIC_IS_FORMBRICKS_CLOUD | IS_FORMBRICKS_CLOUD |
NEXT_PUBLIC_SURVEY_BASE_URL | SURVEY_BASE_URL |
Deprecated Environment Variables
-
NEXT_PUBLIC_VERCEL_URL: Was used as deployment URL fallback (used instead ofWEBAPP_URL), but from v1.1, you can just set theWEBAPP_URLenvironment variable. -
RAILWAY_STATIC_URL: Was used as Railway Static URL (used instead ofWEBAPP_URL), but from v1.1, you can just set theWEBAPP_URLenvironment variable. -
RENDER_EXTERNAL_URL: Was used as an external URL to Render (used instead ofWEBAPP_URL), but from v1.1, you can just set theWEBAPP_URLenvironment variable. -
HEROKU_APP_NAME: Was used to build the App name on a Heroku hosted webapp, but from v1.1, you can just set theWEBAPP_URLenvironment variable. -
NEXT_PUBLIC_WEBAPP_URL: Was used for the same purpose asWEBAPP_URL, but from v1.1, you can just set theWEBAPP_URLenvironment variable. -
PRISMA_GENERATE_DATAPROXY: Was used to tell Prisma that it should generate the runtime for Dataproxy usage. But its officially deprecated now.
Helper Shell Script
For a seamless migration, below is a shell script for your self-hosted instance that will automatically update your environment variables to be compliant with the new naming conventions.Docker & Single Script Setup
Now that these variables can be defined at runtime, you can append them inside yourx-environment in the docker-compose.yml itself.
For a more detailed guide on these environment variables, please refer to the
Environment Variables page.
docker-compose.yml