Deploy Metabase SaaS Metrics
MRR, churn, and SaaS KPI dashboards
metabase/metabase
Just deployed
Just deployed
/var/lib/postgresql/data
Deploy and Host self hosted Metabase SaaS Metrics (Open-Source BI) on Railway
Most SaaS operators don't actually know their real MRR number until it's too late. Metabase lets you query billing data directly and build MRR movement, churn, and NRR dashboards that refresh on schedule. This guide covers deploying Metabase on Railway, wiring it to Postgres, and connecting your billing warehouse.
About Hosting Metabase SaaS Metrics open-source software on Railway (self hosted Metabase template)
Two databases matter: the Metabase app DB stores dashboards, users, and permissions; the billing warehouse holds Stripe or subscription data. On Railway, keep them separate. Never use the default H2 app DB in production, because it's wiped on redeploy. Pin the image version, like v0.63.x, rather than blindly pulling latest.
Why Deploy Metabase SaaS Metrics, the ChartMogul alternative on Railway (Railway Free Trial)
ChartMogul auto-computes MRR but is a closed system. Metabase lets you write SQL and join billing data with product usage or support tickets. The trade: you own the modeling logic. If you already have a billing table in Postgres, MRR movement categories are one SQL query away.
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 SaaS Metrics 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 SaaS Metrics self hosting
Railway keeps the Metabase container and companion Postgres on one private network, so you use internal hostnames and skip VPC and firewall config. The trade is less raw control than a VPS.
| Provider | Setup effort for Metabase + Postgres | Best for |
|---|---|---|
| Railway | Low: services and env vars in one dashboard | Small teams who want managed Postgres |
| DigitalOcean | Medium: droplet plus managed Postgres | Teams comfortable with SSH and systemd |
| AWS | High: RDS, ECS, security groups, IAM | Orgs already on AWS with compliance needs |
| Hetzner | Medium: VPS plus self-run Postgres | Cost-sensitive operators |
Common Use Cases for hosted Metabase SaaS Metrics
The usual starting point is an MRR movement dashboard built from a billing table synced from Stripe: compare each customer's subscription amount between periods, then bucket them into new, expansion, contraction, churned, or reactivated. Next comes logo versus revenue churn. A business with many small customers and one big anchor can have low logo churn and terrifying revenue churn in the same month. Cohort retention groups customers by signup month and shows the share still active each month after. NRR is starting MRR plus expansion and reactivation, minus contraction and churn, divided by starting MRR. Metabase won't compute any of this for you; you write each definition once and every dashboard reuses it.
Dependencies for Metabase SaaS Metrics Docker hosted on Railway
The official Metabase image bundles the Java runtime and listens on port 3000, and Railway can hit GET /api/health for health checks. It does not include a production database, so you provide Postgres as the app DB.
Deployment Dependencies for Managed Metabase SaaS Metrics Service (SaaS Metrics)
Two required pieces: the Metabase container and a Postgres app database on ghcr.io/railwayapp-templates/postgres-ssl (17 is fine). No Redis, no queue, no object storage. Optional SMTP enables scheduled emails. The billing warehouse is a separate connection added after first boot, on its own instance so heavy analytics never competes with the app DB.
Implementation Details for Metabase SaaS Metrics (Using Metabase official docker image)
Set these environment variables on the Metabase service in Railway:
- MB_DB_TYPE=postgres
- MB_DB_HOST, MB_DB_PORT, MB_DB_USER, MB_DB_PASS, MB_DB_DBNAME, pointing at the companion Postgres
- MB_ENCRYPTION_SECRET_KEY: a stable random string; changing it breaks saved database credentials
- MB_SITE_URL: the public HTTPS URL for links, embeds, and emails
On first boot, Metabase runs migrations against the app Postgres, then the setup wizard creates the admin user. After that, add your billing warehouse in Admin → Databases. When a scheduled MRR query grinds through a million invoice rows, you want it grinding on the warehouse.
How does Metabase SaaS Metrics compare against other SaaS metrics and subscription analytics platforms
Metabase isn't a dedicated MRR engine. You bring the billing sync and the SQL; in return MRR can sit next to product events or support tickets.
Metabase SaaS Metrics vs ChartMogul (ChartMogul Alternative)
ChartMogul auto-computes MRR from Stripe. If you want zero SQL, it wins. Metabase makes you define MRR movements yourself, but you can join billing to internal tables ChartMogul will never see.
Metabase SaaS Metrics vs Baremetrics (Baremetrics Alternative)
Baremetrics ships polished churn dashboards plus dunning emails; Metabase won't chase a failed payment. It gives you a churn cohort sliced by plan, channel, or sales rep instead. For a founder without a data person, Baremetrics is often the right call.
Metabase SaaS Metrics vs Looker (Looker Alternative)
LookML defines MRR once as governed measures, which is better for a large org with several analysts. It's also enterprise-priced and usually needs a dedicated analytics engineer. For a five-person SaaS, Metabase plus Postgres covers it.
Metabase SaaS Metrics vs Apache Superset (Apache Superset Alternative)
Superset has more chart types but runs as web, worker, Redis, and Postgres. Metabase is one container plus Postgres, and friendlier for the founder reading the dashboard on Monday. If you're building a platform for a data team, Superset's extra moving parts can pay off.
How to use Metabase SaaS Metrics (the OSS SaaS Metrics)?
Metabase won't pull from Stripe directly; a sync (Fivetran, Stitch, or a cron job on the Stripe API) lands invoices and subscriptions in Postgres first. Then write MRR movement, churn, and cohort questions, drop them on one dashboard, and add a dashboard subscription so the Monday MRR summary lands in email or Slack. Filter widgets let teammates change date ranges and plans without touching SQL.
How to self host Metabase SaaS Metrics on other VPS Services (Metabase SaaS Metrics self hosting guide)
On a plain VPS, Docker is the simplest path: Docker, a separate Postgres, and an env file.
Clone the Repository
Nothing to clone. The official image is metabase/metabase on Docker Hub; building from source is optional.
Install Dependencies
Install Docker plus a Postgres instance, managed or in a second container. Add Caddy or nginx for HTTPS.
Configure Environment Variables
Create an env file with MB_DB_TYPE=postgres, MB_DB_HOST, MB_DB_PORT, MB_DB_USER, MB_DB_PASS, MB_DB_DBNAME, a long random MB_ENCRYPTION_SECRET_KEY, and MB_SITE_URL. Don't commit it to git.
Start the Metabase SaaS Metrics Application
Run docker run -d -p 3000:3000 --env-file .env metabase/metabase:v0.63.x, wait for /api/health to return 200, then create the admin user.
Official Pricing of Metabase SaaS Metrics (Metabase SaaS Metrics pricing)
Metabase OSS is free under AGPL. Metabase Cloud Starter is $100/mo plus per-user fees; Pro costs much more and adds SSO, row and column security, and interactive embedding. For internal SaaS metrics dashboards, OSS covers it.
Metabase SaaS Metrics cloud vs self hosted comparison (Pricing, features, costs, and more)
Cloud handles hosting, upgrades, and backups. Self-hosted OSS means you own all three, and billing data stays in your network. For a small team tracking MRR and churn, self-hosting is much cheaper; Cloud makes sense when you need enterprise auth or want zero ops.
Monthly cost of self hosting Metabase SaaS Metrics on Railway
On Railway Hobby, Metabase plus companion Postgres typically runs about $5–15/mo. The $5 GitHub trial covers a first test run. A billing warehouse that also lives on Railway is billed on top.
System Requirements for Hosting Metabase SaaS Metrics on a VPS
Metabase is a JVM app; give it 1–2 GB of RAM, and Postgres its own memory. A 2 vCPU / 4 GB VPS handles a few million invoice rows. This template is single-node OSS with no built-in HA cluster.
Frequently Asked Questions (FAQs)
Real questions from the first month of running MRR dashboards.
Can Metabase calculate MRR from Stripe data on its own?
No. Sync Stripe into Postgres first, then write SQL for MRR movements. There's no built-in Stripe MRR model.
Should the billing warehouse live in the same Postgres as the Metabase app DB?
Not in production. A heavy analytics query can slow the app DB that stores dashboards and users. One instance is fine for a weekend test.
Why do my churn numbers differ from the Stripe dashboard?
Stripe uses its own definitions and timing; your SQL may bucket cancellations differently, include paused subscriptions, or use calendar months instead of billing periods. Check sync lag and date boundaries.
What breaks if I rotate MB_ENCRYPTION_SECRET_KEY?
Saved database passwords become unreadable, so you re-enter credentials for every data source. Keep the key stable and backed up.
How does Railway cost compare to Metabase Cloud?
Railway Hobby typically runs $5–15/mo versus $100/mo plus per-user for Cloud Starter. Self-host is cheaper if you handle updates and backups.
Is this template highly available?
No. It's single-node Metabase with one Postgres, so a restart means brief downtime. Real HA needs managed Postgres with failover and multiple app replicas behind a load balancer, which this template doesn't configure.
Template Content
metabase/metabase
metabase/metabase