---
title: "Deploy Metabase Self Host vs Cloud"
description: "self-host Metabase instead of Metabase Cloud"
category: "Analytics"
url: https://railway.com/deploy/metabase-self-host-vs-cloud
---

# Deploy Metabase Self Host vs Cloud

self-host Metabase instead of Metabase Cloud

**[Deploy Metabase Self Host vs Cloud on Railway](https://railway.com/template/metabase-self-host-vs-cloud)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/metabase-self-host-vs-cloud/manifest.json

- **Creator:** onepush
- **Category:** Analytics

## Template content

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

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

### metabase/metabase

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

## Documentation

# Deploy and Host self hosted Metabase (BI) on Railway

Choosing Metabase Cloud Starter (~$85+/mo) versus self-hosting on Railway is mostly a cost-and-control call. This listing is the Railway Metabase + Postgres stack for teams that want the OSS app without the managed Cloud bill.

## About Hosting Metabase open-source software on Railway (self hosted Metabase template)

Metabase boots with an embedded H2 file database locally, but H2 is wiped on redeploy. This template pairs the official `metabase/metabase` image with a managed Postgres service that stores users, questions, dashboards, and settings. The app runs on port 3000 with a health check at `GET /api/health`. First boot runs migrations against Postgres, then you create the admin account in the setup wizard. Your actual analytics databases are separate — connect them later via Admin → Databases.

## Why Deploy Metabase, the Metabase Cloud alternative on Railway (Railway Free Trial)

Metabase Cloud Starter starts around $85 per month plus per-user fees. Self-hosting on Railway typically costs $5–15 per month. The $5 GitHub trial credit covers early testing. You run the same open-source AGPL code with your own Postgres and deploy pipeline.

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 Self Host vs Cloud 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.

### Railway vs Other Hosting Providers and VPS for Metabase self hosting

| Provider | Setup model | Postgres handling | Cost feel for Metabase |
|---|---|---|---|
| DigitalOcean | Droplet or App Platform, manual docker | Managed extra or self-managed | Predictable, but you patch and monitor |
| AWS | EC2/ECS, IAM, VPC | RDS adds setup overhead | Complexity tax later |
| Hetzner | Bare VPS, install Docker | Self-managed or separate cloud DB | Lowest raw compute, highest manual effort |
| Railway | Template deploy with companion Postgres | Managed Postgres included | Low operational overhead, predictable Hobby pricing |

## Common Use Cases for hosted Metabase

- Product teams tracking signups, activation, and churn from a read replica.
- Ops groups monitoring ticket volume, response times, and SLAs from Postgres.
- Seed-stage startups using free self-hosted BI for dashboards and SQL.
- Consultants running one Metabase instance for multiple client warehouses.

## Dependencies for Metabase Docker hosted on Railway

This template ships Metabase plus a companion Postgres for the application database — not your warehouse. After first boot you connect analytics sources in Admin → Databases.

### Deployment Dependencies for Managed Metabase Service (open-source BI)

A production-grade application database is required. Use Postgres (or MySQL), not H2. Set `MB_DB_TYPE=postgres` plus connection variables. Also set `MB_SITE_URL` to the public HTTPS domain so links, embeds, and emails resolve.

### Implementation Details for Metabase (Using Metabase official docker image)

Service uses `metabase/metabase`, pin a tag like `v0.63.x`. Port 3000 exposed, health check `/api/health`. Set these env vars:

- `MB_DB_TYPE=postgres`
- `MB_DB_HOST`, `MB_DB_PORT`, `MB_DB_USER`, `MB_DB_PASS`, `MB_DB_DBNAME`
- `MB_ENCRYPTION_SECRET_KEY` — stable random string, never rotate after setup
- `MB_SITE_URL` — public HTTPS URL

First boot migrates the app Postgres, then you create admin user. Connect analytics databases afterwards via Admin → Databases.

## How does Metabase compare against other managed BI / cloud analytics platforms

### Metabase vs Tableau (Tableau Alternative)

Tableau has stronger drag-and-drop exploration and pixel-perfect dashboards but costs about $75/user/month. Metabase is faster to deploy, friendlier for SQL teams, and far cheaper self-hosted. Tableau wins for complex visual grammar; Metabase wins for simplicity.

### Metabase vs Power BI (Power BI Alternative)

Power BI Pro is $10/user/month, cheap until Premium is needed. Metabase has no per-viewer fee when self-hosted. Power BI wins on Excel and DAX; Metabase wins on transparent SQL and open-source flexibility.

### Metabase vs Looker (Looker Alternative)

Looker demands a LookML developer and enterprise contract. Metabase has a lighter data model and much lower total cost. Looker wins for governed metrics at scale; Metabase wins for 80% of insight with 5% of setup.

### Metabase vs Apache Superset (Apache Superset Alternative)

Superset offers more chart types and a richer SQL Lab but has a more complex Python/Flask stack. Metabase has a simpler UX, friendlier query builder, and a single JVM container easier to run on Railway. Superset for advanced analytics engineering; Metabase for product and ops teams.

## How to use Metabase (the OSS open-source BI)?

Open the Railway URL, complete the setup wizard, then go to Admin → Databases and add your analytics connection. Use the query builder for non-technical users or the SQL editor for raw queries. Dashboards combine saved questions with filters and refresh intervals. Collections organize content; permissions can be set per group. Public links and basic embedding are available; interactive embedding with row-level security is Pro-only.

## How to self host Metabase on other VPS Services (Metabase self hosting guide)

### Clone the Repository

You don't need the Metabase source repo. Use Docker and the official image. Optionally `git clone https://github.com/metabase/metabase` if you plan to build from source.

### Install Dependencies

Install Docker Engine and Docker Compose. You also need a Postgres instance — either managed or a container. H2 is not production-safe.

### Configure Environment Variables

Set `MB_DB_TYPE=postgres`, `MB_DB_HOST`, `MB_DB_PORT`, `MB_DB_USER`, `MB_DB_PASS`, `MB_DB_DBNAME`, `MB_ENCRYPTION_SECRET_KEY` (generate with `openssl rand -base64 32`), and `MB_SITE_URL`.

### Start the Metabase Application

Run `docker compose up -d`. Watch logs with `docker compose logs -f metabase`. When `http://your-vps:3000/api/health` returns ok, open the UI, complete the wizard, and connect databases.

## Official Pricing of Metabase (Metabase pricing)

Open-source Metabase is free under AGPL. Cloud Starter is about $85/month plus per-user fees; Pro adds SSO, row-level permissions, and interactive embedding at higher cost. Self-hosted OSS includes dashboards, SQL editor, query builder, alerts, public sharing, and basic permissions.

## Metabase cloud vs self hosted comparison (Pricing, features, costs, and more)

### Monthly cost of self hosting Metabase on Railway

A small Metabase + Postgres stack on Railway typically costs $5–15/month. The $5 trial credit covers early testing. Metabase Cloud Starter is $85/month plus per-user fees. Hidden costs of self-hosting are your time for backups and upgrades, but most small teams spend less than an hour per month after setup.

### System Requirements for Hosting Metabase on a VPS

For up to 20 active users, 1–2 GB RAM and 1 vCPU for Metabase; Postgres needs 256–512 MB RAM and a few GB disk. For heavier dashboards, bump Metabase to 4 GB. Disk usage for the app database is modest (often under 1 GB). No multi-node cluster in this template; scale vertically or move to Cloud Pro.

## Frequently Asked Questions (FAQs)

### Can I use H2 for the Metabase app database on Railway?

No. H2 is wiped on redeploy. Use the companion Postgres service with `MB_DB_*` variables.

### What happens if I change `MB_ENCRYPTION_SECRET_KEY` after setup?

Encrypted connection settings become unreadable. Generate once, store in Railway variables, never rotate unless you re-enter all database credentials.

### Do I need a separate database for my analytics data?

Yes. The app Postgres stores Metabase metadata, not business data. Connect your warehouse separately in Admin → Databases.

### How do I upgrade Metabase on Railway?

Change the image tag (e.g., `v0.62.x` to `v0.63.x`) and deploy. Metabase runs migrations automatically. Read release notes, back up Postgres, test on staging.

### Is Metabase OSS really free to self-host?

Yes, AGPL-licensed and free. You pay only for infrastructure. Pro-only features include row-level permissions and full interactive embedding.

### What is the main reason people move from self-hosted Metabase to Metabase Cloud?

Usually SSO, audit requirements, or not wanting to own upgrades and backups. Cloud offers support and SLAs. If you don't need those, self-hosting on Railway is cheaper.
Keep the Metabase Postgres app DB and a stable encryption secret; the UI listens on port 3000 with health at /api/health so restarts stay clean.
Keep the Metabase Postgres app DB and a stable encryption secret; the UI listens on port 3000 with health at /api/health so restarts stay clean.
Keep the Metabase Postgres app DB and a stable encryption secret; the UI listens on port 3000 with health at /api/health so restarts stay clean.
Keep the Metabase Postgres app DB and a stable encryption secret; the UI listens on port 3000 with health at /api/health so restarts stay clean.
Keep the Metabase Postgres app DB and a stable encryption secret; the UI listens on port 3000 with health at /api/health so restarts stay clean.
Keep the Metabase Postgres app DB and a stable encryption secret; the UI listens on port 3000 with health at /api/health so restarts stay clean.
Keep the Metabase Postgres app DB and a stable encryption secret; the UI listens on port 3000 with health at /api/health so restarts stay clean.
Keep the Metabase Postgres app DB and a stable encryption secret; the UI listens on port 3000 with health at /api/health so restarts stay clean.
Keep the Metabase Postgres app DB and a stable encryption secret; the UI listens on


## Similar templates

- [Typesense vs Meilisearch](https://railway.com/deploy/typesense-vs-meilisearch) — self-hosted Typesense vs Meilisearch
- [Betterlytics](https://railway.com/deploy/betterlytics) — Betterlytics is a cookieless analytics platform GDPR-compliant.
- [Finance Tracker](https://railway.com/deploy/finance-tracker-1) — Private multi-user household finance ledger with budgets and CSV import.

Open this page in a browser: https://railway.com/deploy/metabase-self-host-vs-cloud
