Self-host Metabase on Railway for team BI dashboards

By Tracklayer · Updated 2026-11-20

Short answer: deploy Metabase on Railway with its own Postgres application database, then add your app’s database as a data source and build dashboards with the query builder or SQL. Tracklayer’s template runs Metabase 65 (open-source edition), creates the administrator for you and sizes the Java heap from the service’s memory limit. Plan for a paid Railway plan: Metabase does not run on the Free plan’s 0.5 GB per service.

Deploy Metabase on Railway

When a BI tool makes sense

Your app already stores the data. A BI tool lets people who do not write code ask questions of it:

Connect it to a read-only database user where you can, so a dashboard can never change your data.

BI templates people deploy on Railway

TemplateCreatorDeploymentsServices
MetabaseBrody's Projects2,6422
Apache Superset 6 BI DashboardsTracklayer46
Metabase BI Dashboards (Postgres)Tracklayer22

Railway marketplace data as of 2026-11-19. Full ranking: Best BI and dashboard templates on Railway.

Check each template’s services before you choose. Metabase keeps its own users, questions and dashboards in an application database. Its built-in H2 file database is meant for trials only, so look for a template that includes Postgres.

Deploy Metabase, step by step

These steps use Tracklayer’s Metabase 65 template (metabase/metabase:v0.65.4.4).

  1. Set your email first. Before deploying, set METABASE_ADMIN_EMAIL. The default is admin@example.com. You can also change it later in Account settings.
  2. Deploy the template. It creates the Metabase service and a PostgreSQL 18 application database with a volume.
  3. Wait for the first start. It runs database migrations and takes 2 to 5 minutes.
  4. Find your login. Open the Metabase service, then Variables. Sign in with your email and METABASE_ADMIN_PASSWORD. The variable is applied on first start only, so change your password inside Metabase afterwards.
  5. Save the encryption key. MB_ENCRYPTION_SECRET_KEY encrypts the credentials of the databases you connect. If it changes, you must re-enter saved connections.
  6. Add your data. In Admin settings, add the database you want to analyse. The included Sample Database is there for a first look.

If you prefer Metabase’s own setup wizard, set METABASE_AUTO_SETUP=false before the first deploy. Then the first visitor of the URL becomes administrator, so finish it immediately.

Persistence

Users, questions, dashboards and saved connection details live in Postgres on a volume, so they survive redeploys. Your own data stays in the databases you connect.

Memory and cost

Metabase is a Java application and memory is the main cost driver on Railway’s usage billing. The template’s README reports measurements:

Below 2 GB the launcher sizes the Java heap at 40% of the limit; above that, 60%, capped at 2 GB. To choose it yourself, set JAVA_OPTS, for example -Xmx3g.

Limitations and licence

Scaling and upgrades

All state is in Postgres, so you can add replicas of the Metabase service and give it more memory and CPU as users grow. To upgrade, back up Postgres, read the release notes, change the tag in services/metabase/Dockerfile of the template repository and redeploy. Metabase migrates its database on start.

Other options

Tracklayer also maintains Apache Superset 6. It runs six services: the web app, a Celery worker, Celery beat, a one-shot init job, Postgres and Redis. It adds scheduled email reports and alerts, with drivers for Postgres, MySQL and ClickHouse. The template’s resource profile lists about 1.5 GB of memory idle across all services and about 2.5 to 4 GB under typical use. Superset is Apache-2.0; the template notes that some bundled drivers carry other licences.

For the full ranking, see BI dashboard templates on Railway.

FAQ

How do I log in to Metabase after deploying?

Wait for the first start to finish, which takes 2 to 5 minutes. Then sign in with METABASE_ADMIN_EMAIL (default admin@example.com) and METABASE_ADMIN_PASSWORD from the Metabase service's Variables tab. The administrator is created for you, so nobody else can claim the instance through the setup wizard. If the password is rejected, the deploy log explains how to reset it.

Which Railway plan does Metabase need?

The template's README says the Free plan's 0.5 GB per service is not enough. On Trial (1 GB) it starts and runs sample queries, but it uses nearly the whole limit, so it suits light use only. On Hobby it was measured idling at about 1.6 GB. Hobby or Pro is recommended for teams.

Can Metabase send dashboard emails and alerts from Railway?

Subscriptions and alerts need SMTP, set under Admin settings, then Email. Railway allows outbound SMTP on the Pro plan only, so on other plans you need another way to deliver them.

What licence is Metabase under?

The template runs the open-source edition, which its NOTICE lists as AGPL-3.0. The image is used unmodified. AGPL has conditions if you modify and offer the software to others, so read the licence or ask a lawyer if you plan to embed or resell it. The template is a community template, not affiliated with Metabase, Inc.

Should I pick Metabase or Superset?

Metabase is one service plus Postgres. Superset runs six services (web, worker, beat, init, Postgres, Redis) and adds scheduled reports and a ClickHouse driver. If you want the shortest path to dashboards on an existing database, start with Metabase.