Deploy Metabase Static Embed

signed static embeds for Metabase

Deploy Metabase Static Embed

metabase/metabase

metabase/metabase

Just deployed

/var/lib/postgresql/data

Deploy and Host self hosted Metabase Static Embed (Open-Source BI) on Railway

Metabase's static embed feature lets you sign a chart or dashboard URL with a JWT and drop it into an iframe anywhere — no interactive drill-downs, no Pro license, no per-viewer seats. This guide covers the operational reality of running that on Railway: what works out of the box, what breaks, and how to keep the embedding secret and MB_SITE_URL straight so your signed URLs actually load.

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

Static embedding in Metabase OSS sounds simple until the first 404 from a signed URL that was fine five minutes ago. The mechanics are straightforward: configure an embedding secret, generate a JWT, append it to a public embed URL. The friction comes from keeping the secret stable across deploys, matching MB_SITE_URL to the host users hit, and separating the Metabase app database from the analytics database you chart.

On Railway, run the official metabase/metabase image (pin to something like v0.63.x, not latest) with a companion Postgres for the app DB. The UI listens on port 3000; health check at GET /api/health. First boot runs migrations and can take a minute or two. Never use the default H2 database — it wipes on every redeploy.

Why Deploy Metabase Static Embed, the Tableau alternative on Railway (Railway Free Trial)

Tableau Embedded is polished but priced per viewer — expensive for a static iframe of a KPI chart. Metabase OSS gives you a signed URL that renders a chart in an iframe without logins or per-seat fees. You pay only for Railway compute and Postgres. For internal status dashboards or customer-facing aggregate metrics, that's a huge cost difference.

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 Static Embed 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 Static Embed self hosting

Railway gives you a public HTTPS endpoint, managed Postgres, and deploy previews without touching a reverse proxy. DigitalOcean App Platform is similar but Postgres pricing ramps faster. AWS is heavyweight and overkill for a single-node Metabase. Hetzner is cheapest raw compute but you manage everything. Here's the matrix:

ProviderBest forEmbed-specific trade-off
DigitalOceanApp Platform + managed PostgresSimple, but less flexible on internal networking
AWSEnterprise scale, IAM integrationSteepest setup; overkill for a static embed
HetznerLowest raw cost on a VPSYou manage TLS, Postgres, and every deploy manually
RailwayFast deploys, Postgres attached, HTTPS by defaultTrading some control for a working stack in minutes

Common Use Cases for hosted Metabase Static Embed

The most common deployment is an internal status dashboard embedded in a wiki or support tool. Build the dashboard, sign the URL, paste the iframe. No logins. Another classic is customer-facing analytics: pre-compute aggregate metrics, then serve a static embed showing a specific cohort's numbers without exposing the query interface. A SaaS might embed a chart of a customer's monthly API usage in their billing portal.

Dependencies for Metabase Static Embed Docker hosted on Railway

You need exactly two services: the Metabase container and a Postgres database. The Postgres is for Metabase's own metadata — users, dashboards, saved questions, embedding settings. It is not the database you're analyzing. Your actual data sources (Postgres, MySQL, BigQuery, Snowflake, Redshift, MongoDB, etc.) get connected after first boot via Admin → Databases. Pointing the app DB at your analytics warehouse is a common mistake.

Deployment Dependencies for Managed Metabase Static Embed Service (Embedded Analytics)

For Railway specifically: a project with two services — Metabase on port 3000 and Postgres on the internal network. Set MB_DB_* variables to the Postgres internal hostname and credentials. MB_ENCRYPTION_SECRET_KEY should be a long random string (openssl rand -hex 32). MB_SITE_URL to the public HTTPS URL. Health check at GET /api/health. The $5 Railway GitHub trial covers a hobby stack. Deploy restarts can cause brief downtime for signed URLs — normal for single-node.

Implementation Details for Metabase Static Embed (Using Metabase official docker image)

Sequence: create Railway project, add Postgres service, note internal hostname/credentials. Add Metabase service from metabase/metabase. Set 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, MB_SITE_URL. Deploy and wait for health check green (first boot migrations take a couple minutes).

How does Metabase Static Embed compare against other static embedded analytics platforms

Static embeds render signed charts or dashboards with no interactive drill. Metabase OSS static embed costs $0 beyond hosting. Other platforms require paid embedding or per-view pricing and often lock SSO/RLS behind enterprise tiers.

Metabase Static Embed vs Tableau Embedded (Tableau Embedded Alternative)

Tableau Embedded needs Creator/Viewer licenses and token-based pricing; Metabase static embed needs no per-view fee on OSS.

Metabase Static Embed vs Looker Embedded (Looker Embedded Alternative)

Looker embeds require a Looker instance plus embed user licenses; Metabase static embed uses a JWT signing key with no seat count for public signed views.

Metabase Static Embed vs Power BI Embedded (Power BI Embedded Alternative)

Power BI Embedded bills by capacity nodes; Metabase static embed on Railway runs on one small container and Postgres, usually $5–15/mo.

Metabase Static Embed vs ThoughtSpot (ThoughtSpot Alternative)

ThoughtSpot embeds focus on search and liveboards under per-session pricing; Metabase static embed is simpler chart/dashboard rendering with no per-view cost.

How to use Metabase Static Embed (the OSS Embedded Analytics)?

Enable static embedding in Admin Settings > Embedding. Set MB_SITE_URL to your Metabase origin and set an embedding secret. Generate signed JWT URLs for public questions/dashboards; these render charts/dashboards without drill-through. On Railway, set MB_SITE_URL and MB_ENCRYPTION_SECRET_KEY; static embed tokens remain valid only when URL and secret match.

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

Use any VPS with Docker and Postgres. The Railway template runs metabase/metabase on port 3000, health /api/health, with ghcr.io/railwayapp-templates/postgres-ssl for app DB. Steps below.

Clone the Repository

git clone the template repo and cd into it.

Install Dependencies

Only Docker and Docker Compose are required; no Node/Ruby dependencies.

Configure Environment Variables

Set MB_DB_TYPE=postgres, MB_DB_HOST/PORT/DB/USER/PASS, MB_ENCRYPTION_SECRET_KEY, and MB_SITE_URL. Use a long random secret.

Start the Metabase Static Embed Application

Run docker compose up -d. Check http://VPS_IP:3000/api/health returns 200.

Official Pricing of Metabase Static Embed (Metabase Static Embed pricing)

Metabase OSS static embedding is free. Interactive embed, SSO, and row-level permissions require Metabase Pro (from $500/mo for 10 users, or Cloud Starter ~$85/mo). Self-hosting OSS on Railway costs $5–15/mo for app + Postgres.

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

Cloud Starter includes interactive embeds, SSO, and managed upgrades at ~$85/mo. Self-hosted OSS static embed has no licensing fee but you operate Postgres, upgrades, backups, and security.

Monthly cost of self hosting Metabase Static Embed on Railway

Typically $5–15/mo on Hobby plan with Postgres; $5 GitHub trial credits can cover early testing.

System Requirements for Hosting Metabase Static Embed on a VPS

Minimum 1 vCPU, 1–2 GB RAM, 10 GB disk for app; Postgres needs 512 MB–1 GB RAM. Metabase idle memory around 500 MB–1 GB.

Frequently Asked Questions (FAQs)

Can I do customer embeds on Metabase OSS?

Static signed embeds for public charts/dashboards: yes. Per-customer data isolation, SSO, and interactive drill require Pro/Enterprise.

What is MB_SITE_URL used for with embeds?

It defines the origin used to validate signed embed tokens. If it changes, existing static embed URLs break until regenerated.

Why must the app DB be Postgres not H2?

H2 is file-based and not safe for concurrent multi-process or backup/restore; Postgres is required for production on Railway.

What breaks if I rotate MB_ENCRYPTION_SECRET_KEY?

Saved database connection credentials and existing embed tokens become undecryptable/invalid; you must re-enter DB passwords and regenerate embed URLs.

How does Railway cost compare to Metabase Cloud?

Railway self-host OSS static embed: $5–15/mo. Metabase Cloud Starter: ~$85/mo. Railway has no per-user or per-embed fees.

Is this template multi-node HA?

No. It runs one Metabase container and one Postgres; for HA run multiple app replicas behind a load balancer and a managed/replicated Postgres.

Pin MB_SITE_URL to your Railway HTTPS domain before signing static embed JWTs, or every iframe will 404 after the next custom-domain change.

Rotate the embedding secret only when you can regenerate every signed URL your product already shipped to customers.

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.


Template Content

More templates in this category

View Template
Typesense vs Meilisearch
self-hosted Typesense vs Meilisearch

onepush
0
View Template
Betterlytics
Betterlytics is a cookieless analytics platform GDPR-compliant.

OpenSource Templates
27
View Template
Finance Tracker
Private multi-user household finance ledger with budgets and CSV import.

wotonews
0