Formbricks v1.2 ships a lot of features targeting our Link Surveys. We have also improved our security posture to be as robust as ever. However, it also comes with a few breaking changes specifically with the environment variables. This guide will help you migrate your existing Formbricks instance to v1.2 without any hassles or build errors.
New Environment Variables
|Environment Variable||Required||Recommended Generation||Comments|
|ENCRYPTION_KEY||true||Needed for 2 Factor Authentication|
|SHORT_URL_BASE||false||Needed if you want to enable shorter links for Link Surveys|
Deprecated / Removed Environment Variables
|SURVEY_BASE_URL||The WEBAPP_URL is now used to determine the survey base url in all places|
Formbricks v1.1 includes a lot of new features and improvements. However, it also comes with a few breaking changes specifically with the environment variables. This guide will help you migrate your existing Formbricks instance to v1.1 without losing any data.
Renamed Environment Variables
This was introduced because we got a lot of requests from our users for the ability to define some common environment variables at runtime itself i.e. without having to rebuild the image for the changes to take effect. This is now possible with v1.1. However, due to Next.JS best practices, we had to deprecate the prefix NEXTPUBLIC in the following environment variables:
Deprecated Environment Variables
- NEXT_PUBLIC_VERCEL_URL: Was used as Vercel URL (used instead of WEBAPP_URL), but from v1.1, you can just set the WEBAPP_URL environment variable to your Vercel URL.
- RAILWAY_STATIC_URL: Was used as Railway Static URL (used instead of WEBAPP_URL), but from v1.1, you can just set the WEBAPP_URL environment variable.
- RENDER_EXTERNAL_URL: Was used as an external URL to Render (used instead of WEBAPP_URL), but from v1.1, you can just set the WEBAPP_URL environment variable.
- HEROKU_APP_NAME: Was used to build the App name on a Heroku hosted webapp, but from v1.1, you can just set the WEBAPP_URL environment variable.
- NEXT_PUBLIC_WEBAPP_URL: Was used for the same purpose as WEBAPP_URL, but from v1.1, you can just set the WEBAPP_URL environment 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 your
x-environment in the
For a more detailed guide on these environment variables, please refer to the Important Runtime Variables section.
version: "3.3" x-environment: &environment environment: # The url of your Formbricks instance used in the admin panel WEBAPP_URL: # PostgreSQL DB for Formbricks to connect to DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/formbricks?schema=public" # NextJS Auth # @see: https://next-auth.js.org/configuration/options#nextauth_secret # You can use: `openssl rand -hex 32` to generate one NEXTAUTH_SECRET: # Set this to your public-facing URL, e.g., https://example.com # You do not need the NEXTAUTH_URL environment variable in Vercel. NEXTAUTH_URL: http://localhost:3000 # PostgreSQL password POSTGRES_PASSWORD: postgres # Email Configuration MAIL_FROM: SMTP_HOST: SMTP_PORT: SMTP_SECURE_ENABLED: SMTP_USER: SMTP_PASSWORD: # Uncomment the below and set it to 1 to disable Email Verification for new signups # EMAIL_VERIFICATION_DISABLED: # Uncomment the below and set it to 1 to disable Password Reset # PASSWORD_RESET_DISABLED: # Uncomment the below and set it to 1 to disable Signups # SIGNUP_DISABLED: # Uncomment the below and set it to 1 to disable Invites # INVITE_DISABLED: # Uncomment the below and set a value to have your own Privacy Page URL on the signup & login page # PRIVACY_URL: # Uncomment the below and set a value to have your own Terms Page URL on the auth and the surveys page # TERMS_URL: # Uncomment the below and set a value to have your own Imprint Page URL on the auth and the surveys page # IMPRINT_URL: # Uncomment the below and set to 1 if you want to enable GitHub OAuth # GITHUB_AUTH_ENABLED: # GITHUB_ID: # GITHUB_SECRET: # Uncomment the below and set to 1 if you want to enable Google OAuth # GOOGLE_AUTH_ENABLED: # GOOGLE_CLIENT_ID: # GOOGLE_CLIENT_SECRET:
Did we miss something? Are you still facing issues migrating your app? Join our Discord! We'd be happy to help!