---
title: "Deploy metabase-source-20260617"
description: "Metabase BI with a private Postgres application database."
category: "Analytics"
url: https://railway.com/deploy/metabase-source-20260617
---

# Deploy metabase-source-20260617

Metabase BI with a private Postgres application database.

**[Deploy metabase-source-20260617 on Railway](https://railway.com/template/metabase-source-20260617)**

- **Creator:** leodev
- **Category:** Analytics

## Template content

### postgres

- **Image:** postgres:17

### metabase

- **Image:** metabase/metabase:latest
- **Public domain:** Yes

## Documentation

# 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-20260617` deployed `metabase` and `postgres` to `SUCCESS`.
- Source `/api/health` returned `{"status":"ok"}` after first-boot migrations.
- Source setup token was available; admin setup and login succeeded.
- Source saved question `Railway Validation Question` returned `ANSWER=42` against the sample database.
- Source dashboard `Railway Validation Dashboard` was created and readable.
- Source admin login, saved question, and dashboard persisted after a `metabase` restart.
- Public-template test project `metabase-test` deployed both services to `SUCCESS`.
- Public-template `/api/health` returned `{"status":"ok"}` after first-boot migrations.
- Public-template setup token was available; admin setup and login succeeded.
- Public-template saved question `Railway Public Validation Question` returned `ANSWER=42`.
- Public-template dashboard `Railway Public Validation Dashboard` was created and readable.
- Public-template admin login, saved question, and dashboard persisted after a `metabase` restart.
- Source and public-template test projects were deleted after validation; cleanup audit returned `[]`.


## 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/metabase-source-20260617
