Deploy metabase-source-20260617
Metabase BI with a private Postgres application database.
postgres
Just deployed
/var/lib/postgresql/data
metabase
Just deployed
Deploy and Host Metabase + Postgres on Railway
Metabase is an open-source business intelligence platform for asking questions about data, building dashboards, and sharing analytics. This Railway template deploys Metabase with a private Postgres application database so users, settings, dashboards, questions, and connection metadata persist across restarts.
Published marketplace code: metabase-source-20260617
Published template ID: d4811c37-703e-409c-a2d2-3585dccf197b
About Hosting Metabase + Postgres
Metabase can run with an embedded H2 database for quick trials, but production deployments should use an external application database. This template uses Postgres for Metabase's application database and keeps that database private inside the Railway project network.
The Metabase service is public on port 3000. The Postgres service is private and uses a persistent volume at /var/lib/postgresql/data.
Why Deploy Metabase + Postgres on Railway
Railway can provision the Metabase container, private Postgres networking, generated database credentials, persistent storage, and public HTTPS routing in one deploy flow. This gives teams a durable BI workspace without running the app database manually.
Common Use Cases
- Internal BI and reporting workspace
- SQL question builder for teams
- Persistent dashboards and saved questions
- Lightweight analytics portal for a product or operations team
- Self-hosted Metabase starter stack
Dependencies for Metabase
Deployment Dependencies
- Metabase via
metabase/metabase:latest - Postgres 17 for Metabase application state
- Generated Postgres database, user, and password
- Generated
MB_ENCRYPTION_SECRET_KEY - Public Metabase web service on port
3000
Post-Deploy Setup
Open the public Metabase URL and complete the first admin setup flow. Then connect your production analytics database from the Metabase admin UI.
This template does not bundle warehouse credentials or sample production data sources.
Persistence
Metabase application state persists in the private Postgres service. Restarting the Metabase service preserves the admin account, dashboards, saved questions, settings, and database connection metadata.
Validation Evidence - 2026-06-17
- Source project
metabase-source-20260617deployedmetabaseandpostgrestoSUCCESS. - Source
/api/healthreturned{"status":"ok"}after first-boot migrations. - Source setup token was available; admin setup and login succeeded.
- Source saved question
Railway Validation QuestionreturnedANSWER=42against the sample database. - Source dashboard
Railway Validation Dashboardwas created and readable. - Source admin login, saved question, and dashboard persisted after a
metabaserestart. - Public-template test project
metabase-testdeployed both services toSUCCESS. - Public-template
/api/healthreturned{"status":"ok"}after first-boot migrations. - Public-template setup token was available; admin setup and login succeeded.
- Public-template saved question
Railway Public Validation QuestionreturnedANSWER=42. - Public-template dashboard
Railway Public Validation Dashboardwas created and readable. - Public-template admin login, saved question, and dashboard persisted after a
metabaserestart. - Source and public-template test projects were deleted after validation; cleanup audit returned
[].
Template Content
postgres
postgres:17PGDATA
POSTGRES_DB
POSTGRES_USER
POSTGRES_PASSWORD
metabase
metabase/metabase:latestPORT
MB_DB_HOST
MB_DB_PASS
MB_DB_PORT
MB_DB_TYPE
MB_DB_USER
MB_DB_DBNAME
MB_JETTY_PORT
MB_ENCRYPTION_SECRET_KEY
