---
title: "Deploy Metabase SQL Server"
description: "Dashboards on Microsoft SQL Server and Azure SQL"
category: "Analytics"
url: https://railway.com/deploy/deploy-metabase-for-sql-server
---

# Deploy Metabase SQL Server

Dashboards on Microsoft SQL Server and Azure SQL

**[Deploy Metabase SQL Server on Railway](https://railway.com/template/deploy-metabase-for-sql-server)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/deploy-metabase-for-sql-server/manifest.json

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

## Template content

### metabase/metabase

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

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

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

## Documentation

# Deploy and Host self hosted Metabase SQL Server (Open-Source BI for Microsoft SQL Server) on Railway

Plenty of teams keep their SQL Server data in-house and don't want a BI vendor's cloud in the middle.

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

Your SQL Server reporting database is probably behind a firewall already, so the trick is letting BI tooling reach it without handing out sa.

## Why Deploy Metabase SQL Server, the Power BI alternative on Railway (Railway Free Trial)

Power BI suits Windows-heavy analyst teams, but per-user licensing adds up fast.

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 SQL Server 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 SQL Server self hosting

Metabase doesn't care much where it runs, but SQL Server reachability does, so compare the hosts on what they handle for you.

| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | Metabase and Railway Postgres 18 wired by variables, with HTTPS and no server patching | A Droplet with root access and a flat price, but you handle Docker, TLS, and Postgres backups |
| AWS | Deploys in minutes without touching VPC, security groups, or IAM roles | Fine control over VPC peering and fixed egress IPs for SQL Server firewall rules, with a steeper learning curve |
| Hetzner | Managed Postgres and easy scaling without ordering hardware | Low VPS prices and generous bandwidth, but you own the firewall, updates, and uptime |

Whichever host you pick, plan the SQL Server firewall rule first, since that is the step most often missed.

## Common Use Cases for hosted Metabase SQL Server

- **Ops dashboards on a read replica.** Point Metabase at a readable secondary so order volume and shipment delays refresh without competing with transactional work. Turn off deep scans on the big fact tables.
- **Finance close packs for Azure SQL.** Build revenue, AR aging, and budget-versus-actual questions, then pin them to one collection. Use a service principal with a certificate if SQL logins are banned.
- **Self-service questions for non-SQL users.** Analysts write T-SQL native questions once and expose them with field filters, so a regional manager picks a date range without touching a query.
- **Migration bridge off SSRS.** Keep existing T-SQL and rebuild the screens in Metabase, retiring paginated reports one at a time while the same connection stays in place.

## Dependencies for Metabase SQL Server Docker hosted on Railway

Sort out network access first. Metabase connects outbound over the public internet, so the SQL Server or Azure SQL firewall must allow it.

### Deployment Dependencies for Managed Metabase SQL Server Service (BI for SQL Server and Azure SQL)

The template runs two services: the official metabase/metabase image on the latest tag (port 3000), and Railway Postgres 18 from ghcr.io/railwayapp-templates/postgres-ssl:18 on a volume.

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

Wire Metabase to Postgres with MB_DB_TYPE=postgres plus MB_DB_HOST, MB_DB_PORT, MB_DB_USER, MB_DB_PASS, and MB_DB_DBNAME from the Postgres service.

## How does Metabase SQL Server compare against other BI tools for SQL Server platforms

Most teams pick a BI tool for SQL Server based on who builds the reports. Here is how Metabase SQL Server stacks up against the usual alternatives.

### Metabase SQL Server vs Power BI (Microsoft BI alternative)

- **Authoring:** Power BI Desktop is Windows-only and strong on data modelling. Metabase builds questions in the browser, which suits macOS and Linux teams, though heavy modelling is more limited.
- **Cost model:** Metabase OSS is free (AGPL) on your own Railway stack. Power BI Pro is licensed per user.
- **Where Power BI wins:** richer visuals, row-level security in Premium, and tight Microsoft 365 sharing.

### Metabase SQL Server vs SQL Server Reporting Services (paginated reports)

- **Output style:** SSRS produces pixel-perfect paginated reports for printing and PDF handoff. Metabase produces interactive dashboards and ad hoc questions.
- **Where SSRS wins:** invoices and regulated printouts where layout must be exact.
- **Practical split:** many shops run SSRS for scheduled paper output and Metabase for everyday questions.

### Metabase SQL Server vs Tableau (Tableau alternative)

- **Visual depth:** Tableau has the stronger visualisation engine. Metabase is simpler and faster to get a team productive.
- **Price:** Tableau licences add up per creator and viewer. Metabase Cloud Starter is $100/month with 5 users included plus $6 per extra user.
- **Where Tableau wins:** complex visual analytics on very large extracts.

### Metabase SQL Server vs Apache Superset (Superset alternative)

- **Ease of entry:** Metabase's question builder gets non-SQL users in front of data quickly. Superset rewards engineers willing to write SQL and configure more.
- **Where Superset wins:** richer chart types and a developer-oriented extension model.

## How to use Metabase SQL Server (the OSS BI for SQL Server and Azure SQL)?

Your first hour with Metabase SQL Server is mostly about getting the warehouse connection right. Work through these steps in order.

1. Finish the setup wizard and create the admin account.
2. Set MB_ENCRYPTION_SECRET_KEY before saving any warehouse password, and never change it afterward.
3. Create a dedicated read-only login with db_datareader on the reporting database. Avoid sa.
4. Go to Admin, then Databases, then Add a database, and pick SQL Server. Enter host, port 1433, database name, and login, or paste a connection string.
5. For Azure SQL, choose SQL Server login or an Entra ID service principal. Managed identity only works inside Azure.
6. Allow Railway's outbound traffic through the SQL Server or Azure SQL firewall. Railway does not guarantee static IPs, so an SSH tunnel through a bastion host is often cleaner.
7. Save, let the first sync finish, and turn off deep field scans on very large tables.

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

Running Metabase on a plain VPS is mostly about lining up the app, a Postgres app database, and a network path to SQL Server.

### Clone the Repository

Metabase ships as a Docker image, so there's no source checkout to manage. Pull the image into a clean ops directory.

```bash
mkdir -p ~/metabase-sqlserver && cd ~/metabase-sqlserver
docker pull metabase/metabase:latest
```

### Install Dependencies

You need Docker with Compose on the host. Keep production off H2, since it gets wiped on redeploy.

```bash
sudo apt-get update && sudo apt-get install -y docker.io docker-compose-plugin
sudo systemctl enable --now docker
```

### Configure Environment Variables

Set MB_ENCRYPTION_SECRET_KEY before you save the SQL Server password, and never change it afterward.

```bash
MB_DB_TYPE=postgres
MB_DB_HOST=postgres
MB_DB_PORT=5432
MB_DB_USER=metabase
MB_DB_PASS=change-me
MB_DB_DBNAME=metabase
MB_SITE_URL=https://your-domain
MB_ENCRYPTION_SECRET_KEY=generate-a-long-random-string
```

### Start the Metabase SQL Server Application

Bring the stack up, then add SQL Server under Admin  Databases on port 1433.

```bash
docker compose up -d
curl -s http://localhost:3000/api/health
```

Railway handles the Postgres service, the public HTTPS domain, and restarts for you, which is why the managed path is less fiddly.

## Official Pricing of Metabase SQL Server (Metabase SQL Server pricing)

Metabase is open source under AGPL, so connecting it to SQL Server or Azure SQL costs nothing in licence fees.

If you'd rather not run it yourself, Metabase Cloud Starter is $100/month with 5 users included, plus $6 per extra user. Enterprise starts at $20,000/year.

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

Metabase Cloud bills by tier and seat, while self hosting on Railway swaps that for compute and Postgres you run yourself.

### Monthly cost of self hosting Metabase SQL Server on Railway

Metabase Cloud Starter is $100 per month with 5 users included, plus $6 per extra user. Enterprise starts at $20,000 per year.

Self hosting on Railway means paying for the Metabase service and the Postgres 18 service that holds the application database.

### System Requirements for Hosting Metabase SQL Server on a VPS

On a VPS, run the official metabase/metabase image on port 3000 with Postgres 18 on persistent storage.

## Frequently Asked Questions (FAQs)

### Can I point Metabase SQL Server at a production database?

Better not.

### Do I need an SSH tunnel to reach SQL Server from Railway?

Not always. If your firewall allows the connection directly, that is simplest.

### Why does my SQL Server password disappear after a redeploy?

Usually MB_ENCRYPTION_SECRET_KEY was not set before you saved the warehouse credentials, or it changed later.

### Which Azure SQL login method should I pick from Railway?

Use a SQL Server login or an Azure AD service principal with a client ID and secret. Managed identity only works when Metabase runs inside Azure.

### Will very large tables slow Metabase SQL Server down?

Often, yes. Turn off deep scans on huge tables, cache slow questions, and write T-SQL native questions with field filters for heavy reports.

### How is this different from SQL Server Reporting Services?

Reporting Services suits paginated, print-style reports and ships with SQL Server licences.


## Similar templates

- [Plausible WordPress](https://railway.com/deploy/deploy-plausible-for-wordpress-sites) — Cookie-free WordPress stats from your own Plausible
- [Typesense Multilingual](https://railway.com/deploy/deploy-typesense-multilingual-search) — Locale-aware multilingual search with Typesense
- [Formbricks | Open-Source Typeform & Qualtrics Alternative](https://railway.com/deploy/formbricks-surveys) — Surveys, NPS and in-app feedback on your own Postgres, Hub and Cube

Open this page in a browser: https://railway.com/deploy/deploy-metabase-for-sql-server
