---
title: "Deploy Formbricks"
description: "Typeform Alternative. Build beautiful surveys, but open source."
category: "Analytics"
url: https://railway.com/deploy/formbricks-survey
---

# Deploy Formbricks

Typeform Alternative. Build beautiful surveys, but open source.

**[Deploy Formbricks on Railway](https://railway.com/template/formbricks-survey)**

- **Creator:** A3A
- **Category:** Analytics
- **Total deploys:** 3

## Template content

### Redis https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/redis.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### hub https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/formbricks.svg

- **Image:** ghcr.io/formbricks/hub:latest
- **Health check:** /health

### Postgres https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### cube https://cube.dev/favicon.svg

- **Source:** https://github.com/gridalpha/formbricks-railway

### formbricks https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/formbricks.svg

- **Image:** ghcr.io/formbricks/formbricks:latest
- **Health check:** /health
- **Public domain:** Yes

### hub-worker https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/formbricks.svg

- **Image:** ghcr.io/formbricks/hub:latest
- **Start command:** `/app/hub-worker`

## Buckets

- **formbricks-uploads**

## Documentation

![Formbricks logo](https://formbricks.com/_next/static/media/formbricks-logo-header-open-source-form-infrastructure.0fba6299.svg)

# 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](https://res.cloudinary.com/rroe4rtk/image/upload/v1786974607/9c697d0c-f75b-4825-aacd-7569fe06abb7.png)

## 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 template** → **NPS** → 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](https://res.cloudinary.com/rroe4rtk/image/upload/v1786899148/formbricks-survey-editor.png)
![Formbricks NPS summary showing promoter and detractor breakdown](https://res.cloudinary.com/rroe4rtk/image/upload/v1786899150/formbricks-nps-summary.png)
![Formbricks response table listing three anonymous survey submissions](https://res.cloudinary.com/rroe4rtk/image/upload/v1786899154/formbricks-response-table.png)

## 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 web** — `ghcr.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.
- **Hub** — `ghcr.io/formbricks/hub:latest` on port 8080, private; migrates itself first.
- **Hub worker** — the same image started with `/app/hub-worker`.
- **Cube** — `cubejs/cube:v1.6.6` with its config and data model baked in. Private, port 4000.
- **Object storage** — managed bucket for uploads.

### Environment Variables Reference

| Variable | Purpose |
|---|---|
| `WEBAPP_URL` / `NEXTAUTH_URL` | Public URL of the instance; both must match |
| `NEXTAUTH_SECRET` | Signs sessions — changing it logs everyone out |
| `ENCRYPTION_KEY` | Encrypts 2FA secrets and single-use links; keep stable |
| `DATABASE_URL` / `REDIS_URL` | PostgreSQL and Redis connection strings |
| `HUB_API_KEY` / `CUBEJS_API_SECRET` | Shared secrets for Hub and Cube |
| `S3_*` | Object storage credentials and endpoint |
| `SMTP_*`, `MAIL_FROM` | Optional mail for invites and follow-ups |
| `ENTERPRISE_LICENSE_KEY` | Optional; 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

| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 2 vCPU across all services | 4 vCPU |
| RAM | 4 GB total | 8 GB total |
| Storage | 5 GB for PostgreSQL | 20 GB plus object storage |
| Runtime | Node.js 22, Go, PostgreSQL, Redis | same, 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.


## Similar templates

- [Betterlytics](https://railway.com/deploy/betterlytics) — Betterlytics is a cookieless analytics platform GDPR-compliant.
- [Finance Tracker](https://railway.com/deploy/finance-tracker-1) — Private multi-user household finance ledger with budgets and CSV import.
- [Matomo Analytics + MariaDB](https://railway.com/deploy/matomo-analytics-mariadb) — Privacy-friendly analytics with MariaDB and persistent volumes.

Open this page in a browser: https://railway.com/deploy/formbricks-survey
