Self-Host Metabase on Railway: Open-Source BI in One Click
Deploy Metabase, the open-source business intelligence tool, on Railway in one click with a Postgres database, then connect your data and build dashboards.
Business intelligence (BI) tools turn the data in your databases into charts, dashboards and reports that anyone on a team can use. Metabase is one of the most popular open-source BI tools. People who don't know SQL can explore data with its visual query builder, and analysts can still write SQL when they need to.
To self-host Metabase on Railway:
- Deploy the one-click template, which runs Metabase with a Postgres database for its own settings.
- Open the URL and create the admin account.
- Connect your own database, or explore the built-in sample data.
- Ask questions and build dashboards.
What is Metabase?
Metabase connects directly to your databases and queries them live, without copying data into a separate store. It has 18 official connectors, including PostgreSQL, MySQL, SQL Server, MongoDB, Snowflake, BigQuery, Redshift, Databricks and ClickHouse, plus community drivers for more.

With the free open-source edition you can:
- Build questions with the visual query builder or SQL.
- Combine questions into dashboards with filters.
- Send results on a schedule, and set up alerts.
- Ask questions in plain English with Metabot, its AI assistant, using your own AI model.
- Organise everything into collections with group permissions.
Metabase's paid Pro and Enterprise plans add SAML and JWT single sign-on, row- and column-level security, and usage analytics and auditing. Pro starts at $575 a month for self-hosted or cloud, while the open-source edition is free.
Deploy Metabase on Railway in One Click
The Metabase template on Railway deploys two services:
- The official Metabase Docker image.
- A Postgres database for Metabase's own data: your questions, dashboards, users and settings.
Metabase ships with a built-in H2 database for quick demos, but its documentation says to avoid H2 in production and recommends Postgres. The template sets that up for you, with no variables to fill in.
Metabase takes a minute or two to start the first time. Then open the Metabase service's URL.

Getting Started with Metabase
The setup screens ask for your language and admin account details, then offer to connect a database. You can connect one now, or choose to add your data later and start with Metabase's sample database. The template sets a strong password policy (MB_PASSWORD_COMPLEXITY=strong), so the admin password needs at least eight characters with mixed case, a number and a symbol.
Once you're in, the home page suggests automatic explorations of your data, which Metabase calls x-rays. They're a quick way to see what's in a table.

Click + New to create a question, a SQL query, a dashboard or a model. To connect more databases, go to Admin settings > Databases. If your app runs on Railway, connect to its database over the private network using the database service's private host and credentials, so the traffic never leaves Railway. If your data is in PostgreSQL, my pgAdmin template gives you an admin interface for the database itself.
Here's Metabase's own demo of building a dashboard. For more, see the Metabase documentation.
Metabase demo video
Frequently Asked Questions
Is Metabase free? The open-source edition is free to self-host, with no user limits. The paid Pro and Enterprise plans add features such as SAML single sign-on, row-level security and auditing, and Metabase also sells a hosted cloud version.
What database does Metabase need? Metabase stores its own settings, questions and dashboards in an application database. The built-in H2 database is fine for trying it out, but Metabase recommends PostgreSQL for production. MySQL and MariaDB also work. The Railway template uses Postgres.
Metabase or Redash? Both are open-source BI tools. Metabase is built for people who don't write SQL, with a visual query builder and automatic insights. Redash is more SQL-first. I covered self-hosting Redash in Open-Source Business Intelligence with Redash.
Can Metabase connect to MongoDB? Yes, MongoDB is one of its official connectors.