Railway

Deploy Formbricks

Typeform Alternative. Build beautiful surveys, but open source.

Deploy Formbricks

Just deployed

/data

Just deployed

/var/lib/postgresql/data

Just deployed

Just deployed

formbricks-uploads

Bucket

Just deployed

Formbricks logo

Deploy and Host Formbricks on Railway

Formbricks is an open-source experience management suite built around a survey engine, used by product, research and support teams who want Typeform-style forms and Qualtrics-style analysis without sending customer feedback to a third party. It runs link surveys shared by URL, in-app and website surveys triggered by user actions, and email-embedded surveys, collecting answers into a workspace with per-question summaries, NPS and CSAT breakdowns, contact attributes and targeting rules. Teams self-host Formbricks when responses contain personal data that must stay in their own infrastructure, or when they want unlimited responses rather than a per-response plan.

Deploy Formbricks on Railway and the whole production stack comes up wired together, not just the web container: the web application, PostgreSQL, Redis, the Formbricks Hub API and its worker, a Cube semantic-layer service, and a managed object storage bucket. Browser traffic reaches only the web service, which renders the dashboard and public survey pages, runs its migrations on boot, and processes background jobs through Redis-backed BullMQ queues. Hub owns the unified feedback tables in the same database while its worker drains webhook jobs, and Cube reads those tables to answer analytics queries signed with a shared secret. Uploads go to object storage, so the web service stays stateless.

Formbricks Railway architecture

Getting Started with Formbricks on Railway

Open the deployed URL and you land on a first-run setup wizard, not a login screen. There are no default credentials: click Get started and create the administrator account (password: 8+ characters, mixed case, one number). Log in, name your organization, and skip the "invite your team" step unless SMTP is configured — without mail settings, invitations must be copied as links from organization settings. Then the quickest way to confirm everything works is Use a templateNPS → publish.

Publishing opens a share dialog with a public survey URL like https://your-app.up.railway.app/s/. Open it in a private window, answer and submit — the response appears within seconds on the survey's Summary tab, with impressions, completion rate and a promoter/detractor breakdown. That round trip exercises the web service, PostgreSQL and the queue at once, so if it succeeds the deployment is healthy.

Formbricks survey editor building an NPS question with live preview Formbricks NPS summary showing promoter and detractor breakdown Formbricks response table listing three anonymous survey submissions

About Hosting Formbricks

Formbricks replaces the tools most teams stitch together — a form builder for research, an in-app widget for feature feedback, and a spreadsheet where answers end up. Self-hosting matters because responses are frequently personal data: open-text answers naming individuals, emails attached to contacts, NPS scores tied to accounts. Running it yourself keeps that in a database you control.

Key features:

  • Link, website, in-app and email surveys from one editor, 30+ question types
  • Conditional logic, answer recall, multi-language surveys and quotas
  • NPS, CSAT, CES and star-rating templates with built-in scoring
  • Contact attributes and targeting so a survey reaches only the right users
  • Webhooks, Slack, Notion, Airtable and Google Sheets integrations
  • An open API and JavaScript SDK for embedding surveys in your product

The deployment splits work across services rather than one container: a web tier that also runs the job workers in-process, a database, a cache and queue, the Hub API with its own worker, and an analytics layer — each described under Dependencies below.

Why Deploy Formbricks on Railway

Railway removes the parts of this stack that are tedious to run yourself:

  • One deploy brings up all six services, connected by private networking
  • Managed PostgreSQL and Redis, with backups and no patching
  • Managed object storage instead of a volume you have to size
  • Automatic HTTPS, or bring your own custom domain
  • Horizontal scaling without touching file storage

Common Use Cases for Self-Hosted Formbricks

  • In-app product feedback — a micro-survey when a user finishes onboarding or abandons a flow, segmented by plan or role
  • NPS and CSAT programmes — track the score over time and route detractors to support by webhook
  • Research with personal data — interviews or HR feedback that must stay in your own infrastructure
  • Churn surveys — ask why a customer is leaving and push the reason to your CRM

Dependencies for Formbricks

  • Formbricks webghcr.io/formbricks/formbricks:latest on port 3000, the only public service.
  • PostgreSQL — managed. Stores surveys, responses, contacts and feedback tables. Hub's embedding migrations need pgvector, which Railway provides.
  • Redis — managed. Cache, rate limiting, audit log and BullMQ queue; Formbricks will not start without it.
  • Hubghcr.io/formbricks/hub:latest on port 8080, private; migrates itself first.
  • Hub worker — the same image started with /app/hub-worker.
  • Cubecubejs/cube:v1.6.6 with its config and data model baked in. Private, port 4000.
  • Object storage — managed bucket for uploads.

Environment Variables Reference

VariablePurpose
WEBAPP_URL / NEXTAUTH_URLPublic URL of the instance; both must match
NEXTAUTH_SECRETSigns sessions — changing it logs everyone out
ENCRYPTION_KEYEncrypts 2FA secrets and single-use links; keep stable
DATABASE_URL / REDIS_URLPostgreSQL and Redis connection strings
HUB_API_KEY / CUBEJS_API_SECRETShared secrets for Hub and Cube
S3_*Object storage credentials and endpoint
SMTP_*, MAIL_FROMOptional mail for invites and follow-ups
ENTERPRISE_LICENSE_KEYOptional; unlocks feedback inbox and dashboards

Deployment Dependencies

  • Source: ,
  • Docs:
  • Runtime: Node.js 22, Go, PostgreSQL with pgvector, Redis 7

Hardware Requirements for Self-Hosting Formbricks

ResourceMinimumRecommended
CPU2 vCPU across all services4 vCPU
RAM4 GB total8 GB total
Storage5 GB for PostgreSQL20 GB plus object storage
RuntimeNode.js 22, Go, PostgreSQL, Redissame, managed

The web service is the heaviest component — give it at least 1 GB of RAM.

Self-Hosting Formbricks with Docker

Upstream ships a production Compose file with the same services. To self-host Formbricks manually, clone the repository and create the environment file:

git clone https://github.com/formbricks/formbricks.git
cd formbricks/docker
cp ../.env.example .env

Set WEBAPP_URL and NEXTAUTH_URL, then generate one 32-byte hex secret each for NEXTAUTH_SECRET, ENCRYPTION_KEY, CRON_SECRET, HUB_API_KEY and CUBEJS_API_SECRET. ENCRYPTION_KEY must never change once surveys exist.

openssl rand -hex 32
docker compose up -d

Formbricks then listens on port 3000; on Railway this is already done for you.

How Much Does Formbricks Cost to Self-Host?

Formbricks is free and open source. The core is AGPL-3.0, while the code under apps/web/modules/ee carries a separate enterprise licence and stays locked without an ENTERPRISE_LICENSE_KEY. Self-hosting has no per-response pricing, so the volume that pushes a Typeform or Qualtrics plan into hundreds of dollars a month costs nothing extra. On Railway you pay only for compute, database and storage.

FAQ

What is Formbricks? An open-source survey and experience management platform — a self-hostable alternative to Typeform, Qualtrics and SurveyMonkey, running link, website, in-app and email surveys.

What does this Railway template deploy? Six services — the Formbricks web app, PostgreSQL, Redis, the Hub API, the Hub worker and Cube — plus a managed object storage bucket. Only the web app is reachable from the internet.

Why does the template include Redis and a separate Hub service? Redis is required, not optional: it backs caching, rate limiting, audit logging and the job queue behind follow-up emails and webhooks. Hub owns the unified feedback tables surveys write into, which is why it and its worker are in upstream's own production stack.

How do I create the first admin user in self-hosted Formbricks? Complete the wizard at /setup/intro. The first account becomes the administrator; there are no default credentials, and sign-up is invite-only afterwards.

How do I enable email invites and password resets in self-hosted Formbricks? Set SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD and MAIL_FROM, then set EMAIL_VERIFICATION_DISABLED and PASSWORD_RESET_DISABLED to 0.

Can I scale Formbricks to more than one replica on Railway? Yes — uploads go to object storage and sessions live in PostgreSQL, so the web service scales horizontally as long as replicas share one Redis. Leave Cube at one replica.

Why do Feedback Data and Analysis say "Upgrade to unlock"? Those screens are enterprise edition. Surveys, responses, summaries and integrations work without a licence; ENTERPRISE_LICENSE_KEY unlocks them.


Template Content

More templates in this category

View Template
Matomo Analytics + MariaDB
Privacy-friendly analytics with MariaDB and persistent volumes.

leodev
1
View Template
Bugsink
Self-hosted Error Tracking. Sentry-SDK compatible

zǝʇɹoɔ oɓıɹpoɹ
19
View Template
SubTrackr
Self-hosted Subscription Tracker

amnesia
3