---
title: "Deploy Metabase AGPL"
description: "Metabase OSS AGPL licensing notes"
category: "Analytics"
url: https://railway.com/deploy/metabase-agpl
---

# Deploy Metabase AGPL

Metabase OSS AGPL licensing notes

**[Deploy Metabase AGPL on Railway](https://railway.com/template/metabase-agpl)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/metabase-agpl/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 AGPL (Open-Source BI) on Railway

Metabase AGPL's copyleft rarely triggers on Railway: running the stock image needs no source sharing. Here's the operational reality of hosting the OSS BI stack with Postgres.

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

First deploy takes ten minutes once Postgres is ready. The container runs migrations, then the setup wizard creates an admin.

AGPL changes legal obligations only for modified code. Running upstream unmodified for internal users is fine; only if you fork, patch, and serve the modified version externally do you owe source.

Keep the app DB on Postgres, not H2. Without MB_DB_TYPE set, Metabase falls back to H2, whose data disappears on redeploy. The template pins MB_DB_TYPE=postgres to the companion Postgres service.

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

Tableau expects procurement and training; Metabase expects a database and fifteen minutes.

Railway's free trial lets you stand up Metabase plus its required Postgres without a credit card.

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 AGPL 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 AGPL self hosting

Raw VPS means babysitting Postgres backups, TLS, restarts. Railway collapses that into a deployable service with env vars and health checks, automated backups, and point-in-time recovery without pg_dump cron.

| Provider | Metabase hosting experience | Best for |
|----------|------------------------------|----------|
| DigitalOcean | Droplet + Docker works, but you manage Postgres upgrades, certs, proxy | Teams comfortable with SSH and systemd |
| AWS | EC2/ECS gives control, but IAM, security groups, RDS add hours | Enterprises already in AWS |
| Hetzner | Cheapest raw compute, zero PaaS; you are the platform team | Cost-sensitive hobbyists who enjoy ops |

Railway sits between VPS and AWS: more abstraction than VPS, less config than AWS.

## Common Use Cases for hosted Metabase AGPL

Product teams answer "how many users did X last week" without a data engineer: pick the users table, add date filter, group by week, save, schedule Monday email.

Customer success teams build dashboards off a read replica: Metabase connects directly to Postgres/MySQL, no ETL for simple cases. Point at replica, not primary, to avoid production load.

Founders use Metabase as the whole analytics stack: connect production Postgres on Railway, build revenue dashboard, share via Slack. Expect saved questions to multiply and need pruning.

Embedded analytics is where AGPL matters: interactive embedding for external customers is Cloud Pro, not OSS. Static public dashboards exist, but signed per-user embedding requires Cloud Pro or Superset.

Operations teams monitor error rates by connecting Metabase to the app DB with read-only credentials, avoiding write access.

## Dependencies for Metabase AGPL Docker hosted on Railway

Metabase is two services: app container and Postgres. The app is stateless; all durable data lives in Postgres. Losing that volume loses dashboards, questions, permissions.

### Deployment Dependencies for Managed Metabase AGPL Service (Business Intelligence)

Postgres service (ghcr.io/railwayapp-templates/postgres-ssl, 17 ok) is non-negotiable. Set MB_DB_TYPE=postgres plus MB_DB_HOST, MB_DB_PORT, MB_DB_USER, MB_DB_PASS, MB_DB_DBNAME. Skipping falls back to H2.

Set a stable MB_ENCRYPTION_SECRET_KEY; it encrypts stored analytics DB credentials. Changing it breaks connections until re-entered. Set once in Railway env vars.

Set MB_SITE_URL to the public HTTPS URL; it controls links in scheduled emails and Slack. Leaving it as localhost breaks emailed dashboard links.

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

Use official image metabase/metabase—pin v0.63.x or latest. Port 3000. Health check GET /api/health; root path redirect confuses deploy status.

First boot runs migrations against app Postgres, then setup wizard creates admin and optionally first analytics DB. Wizard doesn't configure app DB; env vars do.

App DB (MB_DB_*) and analytics DBs are separate. Don't point MB_DB_HOST at the production warehouse—metadata inside the analyzed DB is slow and fragile.

## How does Metabase AGPL compare against other Business Intelligence platforms

BI splits into data-team tools (Tableau, Looker) and self-serve tools (Metabase, Redash). Metabase is the latter.

### Metabase AGPL vs Tableau (Tableau Alternative)

Tableau wins complex visual analysis, geospatial, stories, but costs per creator seat and rewards specialists. Metabase AGPL is free for internal use, runs on small Railway, PM builds dashboard in afternoon.

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

Power BI is cheap individually, Excel-integrated, but cloud publishing and sharing add admin overhead. Metabase connects directly to Postgres/MySQL without intermediate service.

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

Superset is Apache 2.0, permissive—embed, modify, sell as service, share nothing. Metabase AGPL copyleft triggers on modified external service. Superset is stronger for data engineers, harder to deploy.

### Metabase AGPL vs Metabase Cloud (Metabase Cloud Alternative)

Cloud is same core hosted, plus SSO, row-level permissions, interactive embedding. OSS has static embedding only. Cloud Starter ~$85/mo plus per-user; Pro much higher.

## How to use Metabase AGPL (the OSS Business Intelligence)?

Connect an actual database first, not sample data. Admin → Databases, add Postgres/MySQL connection, introspect schema. Build a question: users table, filter created_at, group by week, line chart.

Workflow: query builder for exploration, raw SQL for complex, variables make SQL self-serve (`WHERE created_at > {{start_date}}`). Analysts write once, expose params.

Scheduled reports make Metabase sticky: email snapshot Monday or Slack chart image. Screenshot lands in inbox, nobody remembers URL.

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

Outside Railway it's the same container plus Postgres with manual steps. Here's the path, showing what Railway abstracts.

### Clone the Repository

Metabase is open source, but clone only to build from source: `git clone https://github.com/metabase/metabase.git`. Docker image is the supported path; source build is for patching, which AGPL complicates.

### Install Dependencies

On bare VPS install Docker and Docker Compose plus a running Postgres. Official image bundles Java runtime; host needs docker and compose, plus reverse proxy (Caddy/nginx) for TLS.

### Configure Environment Variables

Create .env with MB_DB_TYPE=postgres, MB_DB_HOST, MB_DB_PORT, MB_DB_USER, MB_DB_PASS, MB_DB_DBNAME, MB_ENCRYPTION_SECRET_KEY, MB_SITE_URL. Also set MB_JETTY_HOST=0.0.0.0 and forward port 3000.

### Start the Metabase AGPL Application

Run `docker compose up -d` with Metabase and Postgres services. Wait for health check, open public URL. Setup wizard starts. If DB connection error, check Postgres reachable from container—service name, not localhost.

## Official Pricing of Metabase AGPL (Metabase AGPL pricing)

Metabase AGPL is free: no per-user fee, no license key. Real cost is infrastructure—Railway compute plus Postgres typically $5–15/month for small internal use.

Cloud Starter ~$85/month plus per-user; Pro much more with SSO, row-level permissions, interactive embedding. OSS lacks those. Many self-host AGPL for internal, upgrade to Cloud only for customer-facing embedding.

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

Core question: pay Metabase to run their software or pay Railway to run it yourself. Self-hosting gives control, direct DB access, fixed cost; Cloud gives upgrades, support, enterprise features.

### Monthly cost of self hosting Metabase AGPL on Railway

Small Metabase + Postgres on Railway typically $5–15/month Hobby, depending RAM. Metabase is not resource-hungry for few users; 512MB–1GB RAM enough. Postgres grows with question library.

### System Requirements for Hosting Metabase AGPL on a VPS

Official minimum: 1GB RAM and a couple cores for a small team. Larger needs 2–4GB RAM, dedicated Postgres with 2GB+. Disk dominated by Postgres; Metabase image ~500MB, app DB grows. Budget 20GB disk.

## Frequently Asked Questions (FAQs)

### Does AGPL require me to open-source my dashboards?

No. AGPL covers Metabase source, not your data or dashboards. Running unmodified Docker for your team creates no obligation.

### What happens if I modify Metabase AGPL and use it internally?

Internal use by employees doesn't trigger sharing. Network copyleft applies when you make modified software available to external users as a service. Internal is private; no patches owed.

### Can I use Metabase AGPL to embed dashboards in my SaaS product?

Static public dashboards yes. Interactive embedding with signed URLs and per-user filtering is Cloud Pro, not OSS. Modifying OSS to enable interactive embedding likely triggers AGPL.

### Is Metabase AGPL the same as Metabase Enterprise?

No. Metabase Enterprise is the old commercial name, now Cloud Pro. OSS on Railway is AGPL

### Do I need a lawyer before deploying Metabase AGPL on Railway?

For internal BI with the stock `metabase/metabase` image and no modified Metabase source offered as a public service, most teams treat AGPL as a known OSS license and proceed.


## Similar templates

- [Typesense PHP](https://railway.com/deploy/typesense-php) — official PHP client against Railway
- [Typesense vs Meilisearch](https://railway.com/deploy/typesense-vs-meilisearch) — self-hosted Typesense vs Meilisearch
- [OSS Power BI Alternative](https://railway.com/deploy/oss-power-bi-alternative) — open-source Power BI alternative on Railway

Open this page in a browser: https://railway.com/deploy/metabase-agpl
