Railway

Deploy metabase

Deploy and Host metabase with Railway

Deploy metabase

Just deployed

/var/lib/postgresql/data

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

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

  • 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

Implementation Details

Set the following environment variables on Railway:

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.


Template Content

More templates in this category

View Template
NEW
Matomo Analytics + MariaDB
Privacy-friendly analytics with MariaDB and persistent volumes.

leodev
View Template
Bugsink
Self-hosted Error Tracking. Sentry-SDK compatible

zǝʇɹoɔ oɓıɹpoɹ
View Template
SubTrackr
Self-hosted Subscription Tracker

amnesia