Self-host Formbricks surveys on Railway
Short answer: Formbricks is an open-source survey and experience-management platform for link surveys, website and in-app surveys, and NPS or CSAT tracking. Version 6 is a set of services, not one container. Tracklayer’s template runs Formbricks 6.2.2 on Railway with the full stack: the web app, SpiceDB, the Formbricks Hub API and worker, Cube, PostgreSQL 18, Redis 8.2 and a Railway Bucket for uploads. It creates the first admin from your variables before the site answers requests.
Deploy Formbricks on RailwayWhen Formbricks makes sense
Formbricks fits when you want surveys and feedback data on your own infrastructure rather than in a hosted survey tool. The template documentation lists uses such as:
- link surveys and forms you share by URL or QR code,
- website and in-app surveys triggered by user actions through the Formbricks SDK,
- NPS, CSAT and product-market-fit tracking with dashboards,
- collecting and analysing feedback from several sources in one place,
- an alternative to Typeform, SurveyMonkey or Qualtrics.
If you want chat-style forms and lead-capture bots instead, see the Typebot guide. For product analytics such as funnels and session replays, see the PostHog guide. More about the software is on the Formbricks app page.
What the template deploys
| Service | Source | Role | Public |
|---|---|---|---|
| Formbricks | ghcr.io/formbricks/formbricks:6.2.2 plus start script |
Web app and APIs; migrations, first admin, Bucket CORS, SpiceDB schema | yes |
| SpiceDB | SpiceDB 1.57.0 binaries on Alpine 3.22 | Authorization graph over gRPC with a preshared key | no |
| Hub | ghcr.io/formbricks/hub:0.14.3 |
Feedback-record API; runs its own migrations | no |
| Hub Worker | same image as Hub | Webhook delivery and enrichment jobs | no |
| Cube | ghcr.io/formbricks/cube:1.8.8-3 plus upstream’s config |
Analytics queries for dashboards | no |
| Postgres | postgres-ssl:18.6 |
Formbricks, Hub and SpiceDB data; volume | no |
| Redis | redis:8.2.11 |
Cache, rate limits, job queues; volume | no |
| Bucket | Railway Bucket | Uploaded images and files; private | no |
Every image is pinned by digest, and no third-party repositories are used. Formbricks, SpiceDB, Hub and Cube have healthchecks.
The start order matters, and the template handles it. Every component waits for Postgres. SpiceDB creates its own spicedb database, because it must not share a schema with Formbricks. Formbricks migrates the shared database first; Hub waits for Formbricks’ /health before it runs its own migrations, and Hub Worker waits for Hub. This mirrors the order in upstream’s production compose file.
First login
- Enter your e-mail in
ADMIN_EMAILwhen you deploy.ADMIN_PASSWORDis generated (8 to 128 characters are accepted if you set your own). - Wait for the first deploy. Migrations take a few minutes.
- Open the Formbricks URL and sign in with
ADMIN_EMAILandADMIN_PASSWORDfrom the Formbricks service’s Variables tab. - Create your organization. Onboarding creates the default workspace.
- Add teammates under Organization settings > Members.
There is no public sign-up. The template’s tests confirmed that the setup wizard requires login and that Better Auth’s own sign-up route is not available to strangers.
E-mail, uploads and domains
- E-mail. Formbricks sends invitations, password resets and notifications over SMTP, which Railway allows only on the Pro plan. Without SMTP, the template sets
EMAIL_VERIFICATION_DISABLED=1and disables password reset, so store the admin password safely. On Pro, setMAIL_FROMand theSMTP_*variables. - Uploads. Files go to a private Railway Bucket with virtual-hosted URLs (
S3_FORCE_PATH_STYLE=0). Browser uploads use presigned requests, which need a CORS rule on the Bucket; the start script sets upstream’s documented rule on every start. The volumes vs Buckets guide explains how Buckets differ from volumes. - Custom domain. Add it to the Formbricks service, set
WEBAPP_URLtohttps://{your-domain}and redeploy.NEXTAUTH_URLandBETTER_AUTH_URLreferenceWEBAPP_URL.
Data and backups
All survey, response, Hub and SpiceDB data is in Postgres, on a volume. Redis has a volume for its queues, and uploads are in the Bucket. The template has no scheduled backup job, so back up Postgres yourself, at least before upgrades; see Postgres backups on Railway. Keep ENCRYPTION_KEY from the Formbricks service: it encrypts fields such as 2FA secrets and tokens and must not change after first use.
Cost
Measured idle on Railway on 2026-11-24, after login, organization creation and SpiceDB preparation:
| Service | Idle RAM |
|---|---|
| Formbricks | 0.50 to 0.72 GB |
| Postgres | 0.14 to 0.19 GB |
| Cube | 0.09 GB |
| SpiceDB and Redis | 0.05 GB each |
| Hub Worker and Hub | 0.03 GB and 0.01 GB |
That is about 1.13 GB in total with near-zero idle CPU. The template documentation puts it at about $12 a month idle plus Bucket storage, and the author estimates $15 to $25 a month with real traffic. Each service is under the Trial plan’s 1 GB limit at idle, but the web service can exceed 1 GB under load (upstream sizes it for 2 GB), so Hobby is recommended. See Railway pricing.
Upgrades
Formbricks and Cube are pinned in services/*/Dockerfile, Hub in the template and SpiceDB in services/spicedb/Dockerfile. To upgrade, read the Formbricks release notes, back up Postgres, move the images to the matching release and redeploy; migrations run on start. Hub and Hub Worker must use the same image.
Limits and licence
- Testing: the template’s tests covered login, organization creation, authorization through SpiceDB and the Bucket CORS rule. Survey creation, responses and an image upload end to end were not tested.
- Community edition: the free edition allows one workspace, which onboarding creates. Enterprise features are not unlocked.
- Formbricks licence: AGPL-3.0 for the core and for the two Cube config files the template copies from upstream; MIT for the SDK packages; the Formbricks Enterprise license for
apps/web/modules/ee. AGPL has conditions if you modify the code and offer it to others, so read it or ask a lawyer if you plan to. - Other parts: SpiceDB, Hub and the Cube image Apache-2.0, PostgreSQL License, Redis 8.2 under RSALv2, SSPLv1 or AGPLv3.
- Affiliation: this community template is not affiliated with or endorsed by Formbricks GmbH or Railway. Formbricks is a trademark of Formbricks GmbH.
Related
The template page shows the services and variables, and the Formbricks self-hosting docs cover the upstream setup. For website traffic analytics without cookies, see the Plausible and Umami guide. More walkthroughs are listed under guides.
FAQ
How do I log in to Formbricks after deploying?
Enter your e-mail in ADMIN_EMAIL when you deploy. After the first deploy, open the Formbricks URL and sign in with that e-mail and the generated ADMIN_PASSWORD from the Formbricks service's Variables tab, then create your organization. The admin is created before the site answers requests, so nobody can claim the setup wizard first.
Why does Formbricks 6 need SpiceDB, Hub and Cube?
Formbricks 6 asks SpiceDB for every authorization decision and refuses to authorize without it. Hub stores and processes feedback records, with a worker for webhooks and enrichments, and Cube answers the analytics dashboards. A single Formbricks container is not enough for version 6.
Can Formbricks send e-mails on Railway?
Only with SMTP, which Railway allows on the Pro plan. Without SMTP the template turns off e-mail verification and password reset so that logins work. On Pro, set MAIL_FROM and the SMTP_* variables on the Formbricks service.
What does it cost to run?
Measured idle on Railway, the seven services used about 1.13 GB of RAM in total, most of it the web app at 0.5 to 0.72 GB. The template documentation puts that at about $12 a month idle plus Bucket storage, and the author estimates $15 to $25 a month with real traffic.
What licence is Formbricks under?
The template's NOTICE lists the Formbricks core as AGPL-3.0, its SDK packages as MIT and apps/web/modules/ee under the Formbricks Enterprise license. Enterprise features need a license key and are not unlocked by the template. This is a community template, not affiliated with or endorsed by Formbricks GmbH or Railway.