---
title: "Deploy Metabase [Updated Jun'26]"
description: "Self-hosted Tableau alternative — dashboards, charts, SQL & team analytics."
category: "Analytics"
url: https://railway.com/deploy/metabase-2
---

# Deploy Metabase [Updated Jun'26]

Self-hosted Tableau alternative — dashboards, charts, SQL & team analytics.

**[Deploy Metabase [Updated Jun'26] on Railway](https://railway.com/template/metabase-2)**

- **Creator:** Tasha
- **Category:** Analytics

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### metabase-railway

- **Source:** Amritasha/metabase-railway
- **Public domain:** Yes

## Documentation

# Deploy and Host Metabase on Railway

**Metabase** is an open-source **business intelligence and data analytics platform** that lets teams explore, visualize, and share insights from their databases without writing code. It provides an intuitive UI for building **dashboards, charts, and reports** with both no-code and SQL interfaces.

## About Hosting Metabase on Railway

Metabase is a **JVM-based web application** distributed as a Docker image. Hosting it requires a backing database — **PostgreSQL** is strongly recommended for production to store Metabase's own application metadata (users, dashboards, questions, etc.). The default embedded H2 database is unsuitable for multi-user or persistent deployments. You'll also need to configure environment variables for the application database connection, set the correct `PORT`, and optionally connect Metabase to your own data sources (Postgres, MySQL, BigQuery, etc.) post-deploy.

## Common Use Cases for Self-Hosted Metabase

- **Building internal business intelligence dashboards and reports**
- **Enabling non-technical teams to query databases without writing SQL**
- **Embedding interactive charts and analytics** into customer-facing products

## Dependencies for Metabase Hosting

- **PostgreSQL** (application metadata database — persists dashboards, users, settings)
- **Docker-compatible runtime** (Metabase ships as `metabase/metabase`)

### Deployment Dependencies

- [Metabase Docker Hub](https://hub.docker.com/r/metabase/metabase)
- [Metabase Environment Variable Reference](https://www.metabase.com/docs/latest/configuring-metabase/environment-variables)
- [Metabase Production Deployment Guide](https://www.metabase.com/docs/latest/installation-and-operation/running-metabase-on-docker)

### Implementation Details

Set the following environment variables on Railway:

\`\`\`env
MB_DB_TYPE=postgres
MB_DB_DBNAME=${{Postgres.PGDATABASE}}
MB_DB_PORT=${{Postgres.PGPORT}}
MB_DB_USER=${{Postgres.PGUSER}}
MB_DB_PASS=${{Postgres.PGPASSWORD}}
MB_DB_HOST=${{Postgres.PGHOST}}
MB_JETTY_PORT=3000
PORT=3000
\`\`\`

Metabase listens on port `3000` by default. Ensure `PORT` and `MB_JETTY_PORT` match.

## Why Deploy Metabase on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Metabase on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

## 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-2
