Metabase BI Dashboards (Postgres)
Metabase is an open-source business intelligence tool for dashboards, SQL and no-code questions. This template runs Metabase 65 (open-source edition) with Postgres 18 as its application database and creates the administrator for you on first start.
What you get
- Metabase v0.65.4.4 with a launcher that sizes the Java heap from the memory limit
- Postgres 18 application database on a volume
- Administrator created on first start, so the setup wizard cannot be claimed by someone else
- Generated encryption key for saved data-source credentials
- Sample Database included for a first look
Good for
- Self-service dashboards on top of your existing databases
- A SQL editor and saved questions for analysts
- Scheduled dashboard subscriptions and alerts
- Embedding charts in internal tools
Cost
The template notes were measured on Railway: Metabase uses nearly the whole 1 GB limit on Trial, and idles at about 1.6 GB on Hobby. Postgres idles at about 0.1 to 0.2 GB. Memory is the main cost driver.
Services in this template
- Postgres · image
ghcr.io/railwayapp-templates/postgres-ssl:18.6@sha256:4fc833b43d2aaf6ecc9b18615f5533602b723a32d0e2efe2dae8ca0f7217c863 - Metabase · from
baranberkay96/metabase-railway
Questions people ask
How do I log in?
Wait for the first start to finish (2 to 5 minutes). Sign in with METABASE_ADMIN_EMAIL (default admin@example.com) and METABASE_ADMIN_PASSWORD from the Metabase service Variables tab. Set your own email before deploying.
Which plan do I need?
The Free plan's 0.5 GB per service is not enough. Trial's 1 GB works for light use only. Hobby or Pro is recommended for teams and larger queries.
Can it send email alerts?
Subscriptions and alerts need SMTP under Admin settings. The template notes that Railway allows outbound SMTP on the Pro plan only.
What happens if I lose the encryption key?
MB_ENCRYPTION_SECRET_KEY encrypts the credentials of connected databases. If it changes, saved connections must be re-entered, so keep it.
How do I upgrade?
Back up Postgres, read the release notes, change the tag in services/metabase/Dockerfile and redeploy. Metabase migrates its database on start. Downgrades are not supported.
Full template README
Deploy and Host Metabase with Railway
Metabase is an open-source business intelligence tool: connect your databases, ask questions with SQL or a no-code query builder, and share dashboards, alerts and embedded charts. This community template runs Metabase 65 (open-source edition) with PostgreSQL as its application database and creates the administrator for you on first start.
About Hosting Metabase
Metabase is a Java application. It stores its own data (users, questions, dashboards, saved connection details) in an application database; the embedded H2 file database is meant for trials only, so this template uses PostgreSQL 18 from the start. Connection passwords for your data sources are encrypted with a generated key. On first start the launcher completes Metabase's setup with your administrator email and a generated password before the site goes live, so nobody else can claim the instance through the setup wizard. The Java heap is sized from the service's memory limit, so the same template runs on small and large plans.
Common Use Cases
- Self-service dashboards on top of Postgres, MySQL, BigQuery, Snowflake and other databases.
- SQL editor and saved questions for analysts, with a no-code query builder for everyone else.
- Scheduled dashboard subscriptions and alerts for KPIs.
- Embedding charts in internal tools.
- A shared reporting layer for a startup or a single team.
Dependencies for Metabase Hosting
- Metabase open-source edition (
metabase/metabase:v0.65.4.4) - PostgreSQL 18 (application database)
- The databases you want to analyse (added in Admin settings after login)
Deployment Dependencies
- Metabase documentation: https://www.metabase.com/docs/latest/
- Running Metabase on Docker: https://www.metabase.com/docs/latest/installation-and-operation/running-metabase-on-docker
- Environment variables: https://www.metabase.com/docs/latest/configuring-metabase/environment-variables
- Application database: https://www.metabase.com/docs/latest/installation-and-operation/configuring-application-database
- Metabase releases: https://github.com/metabase/metabase/releases
Implementation Details
| Service | Image | Role |
|---|---|---|
Metabase |
metabase/metabase:v0.65.4.4 + Railway launcher |
Web app, query engine, scheduler |
Postgres |
postgres-ssl:18.6 |
Application database (volume) |
First login. Wait until Metabase is healthy (the first start runs database migrations and takes 2–5 minutes), open its domain and sign in with METABASE_ADMIN_EMAIL (default admin@example.com) and METABASE_ADMIN_PASSWORD from the Metabase service's Variables tab. Set your own email before deploying, or change it later in Account settings. The password variable is applied on the first start only; afterwards change your password in Metabase. The Sample Database is included for a first look.
If the password is rejected. Metabase requires at least 6 characters including a digit and rejects common passwords. If the value you typed fails, the account is created with a random password and the deploy log explains how to reset it with java -jar /app/metabase.jar reset-password {email} from a Railway shell.
Setup wizard instead. Set METABASE_AUTO_SETUP=false before the first deploy to use Metabase's own wizard. Then the first visitor of the URL becomes administrator, so complete it right away.
Encryption key. MB_ENCRYPTION_SECRET_KEY encrypts the credentials of the databases you connect. Keep it; if it changes, saved connections must be re-entered.
Memory and plans. The launcher sizes the Java heap from the service's memory limit: below 2 GB it uses 40% of the limit with lean JVM settings, above that 60%, capped at 2 GB. Set JAVA_OPTS=-Xmx3g (for example) to choose it yourself. Measured on Railway: with a 1 GB limit (Trial) Metabase starts, completes setup and runs sample queries, using nearly the whole limit, so it suits light use only; on Hobby it idles at about 1.6 GB. Postgres idles at about 0.1–0.2 GB. The Free plan's 0.5 GB per service is not enough for Metabase. Hobby or Pro is recommended for teams and larger queries.
Email. Dashboard subscriptions and alerts need SMTP (Admin settings → Email). Railway allows outbound SMTP on the Pro plan only.
Scaling. Give Metabase more memory and CPU as dashboards and users grow. All state is in Postgres, so you can add replicas of the Metabase service.
Pinning and upgrades. The version is the FROM line in services/metabase/Dockerfile of the template repository. Back up Postgres, read the release notes, change the tag and redeploy; Metabase migrates its database on start. Downgrades are not supported.
Why Deploy Metabase on Railway?
Railway runs Metabase and its PostgreSQL database together on a private network with HTTPS, a persistent volume and usage-based pricing. You get a working BI tool with an administrator already in place in one deploy, and can raise memory as your dashboards grow.
Guides for this template
View Metabase BI Dashboards (Postgres) on railway.com
Similar templates
| Template | Category | DeploymentsDeploys |
|---|---|---|
| Umami An open source, privacy-focused alternative to Google Analytics | Analytics | 4,236 |
| Metabase Fast analytics and integrated tooling for companies exploring their data | Analytics | 2,642 |
| Plausible Analytics An easy to use, privacy-friendly, open-source Google Analytics alternative | Analytics | 915 |
| Formbricks An open source surveys & experience management solution | Analytics | 693 |
| SearXNG | Open Source Search API for AI Agents Self-Host SearXNG. Open source, AI-ready search, 70+ engines combined | Analytics | 140 |
| PostHog Product Analytics SuiteTracklayer Self-hosted product analytics, session replay, feature flags and A/B tests. | Analytics | 14 |