---
title: "Deploy Formbricks + Postgres"
description: "Formbricks surveys with Postgres, Valkey, persistent uploads, secrets."
category: "Analytics"
url: https://railway.com/deploy/formbricks-postgres
---

# Deploy Formbricks + Postgres

Formbricks surveys with Postgres, Valkey, persistent uploads, secrets.

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

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

## Template content

### valkey

- **Image:** valkey/valkey:8-alpine
- **Start command:** `/bin/sh -c 'exec valkey-server --appendonly yes --dir /data --requirepass "$VALKEY_PASSWORD"'`

### postgres

- **Image:** pgvector/pgvector:pg17

### formbricks

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

## Documentation

# Deploy and Host Formbricks + Postgres on Railway

Self-host Formbricks surveys and experience management on Railway with Postgres, Valkey, generated secrets, persistent uploads, and private networking.

## About Hosting Formbricks + Postgres on Railway

- `formbricks`: public Formbricks web service
- `postgres`: private Postgres database
- `valkey`: private cache service for rate limits, caching, and audit logging
- Persistent upload storage
- Generated auth, encryption, cron, database, and cache secrets
- One-domain default setup for fast first launch

## Why Deploy Formbricks + Postgres on Railway

The published template deploy test created `formbricks`, `postgres`, and `valkey`; all services reached `SUCCESS`; the public app returned HTTP `200`; and `/health` returned HTTP `200` after the migration window.

The template keeps first launch simple: no bundled SMTP, OAuth, S3, or enterprise license assumptions. Teams can add those after the app is healthy.

## Common Use Cases

- Product feedback portals
- In-app surveys
- Link surveys and customer research
- NPS, CSAT, and onboarding feedback
- Internal evaluation of self-hosted Formbricks

## Dependencies for Formbricks + Postgres Hosting

Formbricks depends on Postgres for durable application data, Valkey for cache/rate-limit/audit behavior, generated auth/encryption secrets, and a stable public web URL.

### Deployment Dependencies

- `DATABASE_URL`: private Postgres connection string
- `REDIS_URL`: private Valkey connection string
- `ENCRYPTION_KEY`: generated encryption secret
- `NEXTAUTH_SECRET`: generated auth secret
- `WEBAPP_URL`: Railway public Formbricks URL

## After Deploy

1. Open the Formbricks public URL.
2. Create the first account.
3. Add SMTP before enabling email verification or password reset flows.
4. Keep `PUBLIC_URL` unset unless you intentionally want a two-domain admin/survey setup.

## Support Checklist

If a deploy fails, include `formbricks`, `postgres`, and `valkey` deployment IDs, whether `/health` is still migrating or failing, and log lines mentioning Prisma, database, or cache startup.


## Similar templates

- [Matomo Analytics + MariaDB](https://railway.com/deploy/matomo-analytics-mariadb) — Privacy-friendly analytics with MariaDB and persistent volumes.
- [Bugsink](https://railway.com/deploy/bugsink) — Self-hosted Error Tracking. Sentry-SDK compatible
- [SubTrackr](https://railway.com/deploy/bscottsubtrackr) — Self-hosted Subscription Tracker

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