Deploy Formbricks 5 | With the Hub and Cube It Cannot Start Without
Formbricks 5 with the Hub and Cube it refuses to start without.
Just deployed
HubPostgres
Just deployed
/var/lib/postgresql/data
Postgres
Just deployed
/var/lib/postgresql/data
Just deployed
/data
Just deployed
Formbricks
Just deployed
/home/nextjs/apps/web/uploads
Formbricks 5
The survey and feedback platform, self-hosted, with the two services it refuses to start without.
What this fixes
The existing Formbricks template pulls formbricks/formbricks:latest from
Docker Hub — where the newest tag is 3.6.0, from March 2025. The project moved
to GHCR and never published to Hub again, so that template has been deploying a
sixteen-month-old build and will never update on its own.
Bringing it current is not a tag change. Formbricks 5 refuses to boot without a
Hub and a Cube service: its environment validation fails on CUBEJS_API_URL,
CUBEJS_API_SECRET, HUB_API_URL and HUB_API_KEY before the application
starts. Upstream runs those with one-shot migration containers and
condition: service_completed_successfully, which a template cannot express.
How it is expressed here
- Hub's migrations moved into its start command.
goose … up && river migrate-up … && exec /app/hub-api— "migrate, then serve" is an ordering inside one service, so no separate migration container is needed. - Cube's configuration is baked into an image. Upstream bind-mounts
cube.jsand the data model from its repository; there is no host directory to mount from here, so they live inak40u/formbricks-cube-railwayinstead. - Hub gets its own database. Sharing one meant Hub migrated first and the
Formbricks Prisma migration then sat on a lock until it timed out at 300
seconds. Upstream supports
HUB_DATABASE_URLfor exactly this. - Both databases are pgvector images. Hub's first migration runs
CREATE EXTENSION vector, and plain Postgres answers "extension is not available".
Verified
Deployed from this template: /health returns 200, the sign-up page is served,
and the management API answers unauthenticated calls with not_authenticated
rather than a 404. The environment validation that blocks a misconfigured
Formbricks 5 passes — which is only possible if Hub and Cube are both reachable
and their secrets match.
Creating the first account happens in the browser and was not driven here.
Services
Formbricks, its Postgres, Valkey, Hub, Hub's Postgres, and Cube. Six, because that is what Formbricks 5 needs.
Configuration
Nothing to fill in. Every secret and both database passwords are generated.
Formbricks is by Formbricks GmbH; the parts used here are AGPL-3.0.
Template Content
HubPostgres
pgvector/pgvector:pg18Postgres
pgvector/pgvector:pg18Formbricks
ghcr.io/formbricks/formbricks:5.2.1