← All articles
a computer screen with a program running on it

Metabase: Self-Hosted Business Intelligence That Non-Technical People Can Actually Use

Analytics 2026-02-15 · 9 min read metabase business-intelligence analytics dashboards data docker
By Selfhosted Guides Editorial TeamSelf-hosting practitioners covering open source software, home lab infrastructure, and data sovereignty.

Most business intelligence tools fall into one of two camps. There are enterprise platforms like Tableau and Power BI that cost thousands per year and require dedicated analysts to operate. Then there are developer-focused tools that assume everyone on the team is comfortable writing SQL. For teams that need something in between — where a product manager can build a dashboard without filing a Jira ticket — the options narrow quickly.

Photo by James Wiseman on Unsplash

Metabase occupies that middle ground better than anything else available. It is an open source business intelligence tool that connects to your existing databases and lets anyone ask questions about their data through a visual query builder, without writing SQL. People who do know SQL can write it directly. Everyone gets clean, shareable dashboards.

Metabase business intelligence logo

Why Self-Host Metabase

Metabase offers a hosted cloud product starting at $85/month for 5 users. That adds up quickly as your team grows, and it means your query results (which often contain sensitive business data) travel through Metabase's servers. Self-hosting eliminates both concerns.

Reasons to self-host:

Reasons to consider Metabase Cloud instead:

Metabase vs. Alternatives

Before committing to Metabase, it is worth understanding how it compares to other self-hosted BI tools.

Apache Superset

Superset is the most common alternative. It is a graduate Apache project originally built at Airbnb.

Feature Metabase Apache Superset
Visual query builder Yes (excellent) Limited
SQL editor Yes Yes
Target audience Mixed technical/non-technical Primarily technical
Setup complexity Simple (single binary or container) Complex (Redis, Celery, multiple services)
Dashboard quality Clean, polished Functional, less polished
Chart types Good selection Extensive selection
Data source support SQL databases, MongoDB SQL databases, Druid, Presto, Trino
Embedding Yes (with Pro features) Yes (open source)
Community Large Large
Learning curve Low Moderate to high

Superset is more powerful for data engineering teams that live in SQL. Metabase is better when non-technical stakeholders need to self-serve their own analytics.

Redash

Redash was a popular open source BI tool acquired by Databricks in 2020. The hosted version shut down, and while the open source project continues, development has slowed significantly.

Lightdash

Lightdash is a newer entrant focused on the dbt (data build tool) ecosystem. It reads your dbt models and lets users explore data through a semantic layer.

Installation with Docker Compose

Metabase runs as a single Java application. For production use, you should pair it with PostgreSQL as its application database (the default H2 database is not recommended for anything beyond testing).

Docker Compose setup

Create a docker-compose.yml:

version: "3.8"

services:
  metabase:
    container_name: metabase
    image: metabase/metabase:latest
    ports:
      - "3000:3000"
    environment:
      MB_DB_TYPE: postgres
      MB_DB_DBNAME: metabase
      MB_DB_PORT: 5432
      MB_DB_USER: metabase
      MB_DB_PASS: your-secure-password-here
      MB_DB_HOST: metabase-db
      MB_SITE_URL: https://analytics.yourdomain.com
    depends_on:
      metabase-db:
        condition: service_healthy
    restart: always
    healthcheck:
      test: curl --fail http://localhost:3000/api/health || exit 1
      interval: 30s
      timeout: 10s
      retries: 5

  metabase-db:
    container_name: metabase_postgres
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: metabase
      POSTGRES_USER: metabase
      POSTGRES_PASSWORD: your-secure-password-here
    volumes:
      - metabase-pgdata:/var/lib/postgresql/data
    restart: always
    healthcheck:
      test: pg_isready -U metabase
      interval: 10s
      timeout: 5s

volumes:
  metabase-pgdata:

Starting Metabase

docker compose up -d

Metabase takes 1-2 minutes to start on first launch (it runs database migrations). Access the setup wizard at http://your-server:3000.

First-time setup

The setup wizard walks you through:

  1. Language selection — Metabase supports 30+ languages
  2. Admin account — Create the first admin user
  3. Database connection — Connect to the database you want to analyze (not the Metabase application database)
  4. Usage preferences — Whether to send anonymous usage stats to Metabase

Like what you're reading? Subscribe to Self-Hosted Weekly — free weekly guides in your inbox.

Connecting Your Databases

Metabase supports connecting to multiple databases simultaneously. Navigate to Admin > Databases > Add a database.

Supported databases

Connection best practices

Use a read-only database user. Metabase only needs SELECT permissions. Create a dedicated user:

-- PostgreSQL example
CREATE USER metabase_reader WITH PASSWORD 'secure-password';
GRANT CONNECT ON DATABASE yourdb TO metabase_reader;
GRANT USAGE ON SCHEMA public TO metabase_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO metabase_reader;
ALTER DEFAULT PRIVILEGES IN SCHEMA public
  GRANT SELECT ON TABLES TO metabase_reader;

Place Metabase on the same network as your database to minimize latency. If your database is on a different server, use an SSH tunnel or VPN rather than exposing the database port publicly.

Enable Metabase's metadata sync (on by default). Metabase periodically scans your database schema to keep its model of your tables up to date. The default 1-hour interval works for most setups.

Building Dashboards

This is where Metabase earns its reputation. There are three ways to query data.

The visual query builder

Click New > Question and select the visual query builder. You pick a table, add filters, choose columns, group by dimensions, and apply aggregations — all through dropdown menus. No SQL required.

For example, to see monthly revenue by product category:

  1. Select the orders table
  2. Add a Summarize step: Sum of amount, grouped by product.category and created_at (by month)
  3. Add a Filter: created_at is in the last 12 months
  4. Choose a visualization: line chart

This is genuinely usable by non-technical people. It covers 80% of common business questions.

The notebook editor

For more complex queries, the notebook editor provides a step-by-step interface that supports joins, custom columns, and nested queries — still without writing SQL. It is a middle ground between the visual builder and raw SQL.

The SQL editor

Power users get a full SQL editor with:

Assembling dashboards

Dashboards combine multiple questions (charts, tables, numbers) into a single view:

  1. Click New > Dashboard
  2. Add saved questions or create new ones inline
  3. Arrange and resize cards with drag-and-drop
  4. Add filter widgets that apply across all cards (date ranges, category selectors)
  5. Add text cards for context and annotations

Filters are the key feature. A single date picker at the top of a dashboard can filter every chart simultaneously, making dashboards interactive rather than static.

Sharing and Distribution

Public links

Any question or dashboard can be shared via a public link. This creates a URL that anyone can access without logging in — useful for embedding metrics in internal wikis or sharing with stakeholders who do not have Metabase accounts.

Subscriptions

Set up email subscriptions (called Pulses in older versions, now Dashboard subscriptions):

This requires SMTP configuration:

environment:
  MB_EMAIL_SMTP_HOST: smtp.yourdomain.com
  MB_EMAIL_SMTP_PORT: 587
  MB_EMAIL_SMTP_SECURITY: tls
  MB_EMAIL_SMTP_USERNAME: [email protected]
  MB_EMAIL_SMTP_PASSWORD: your-smtp-password
  MB_EMAIL_FROM_ADDRESS: [email protected]

Slack integration

Metabase can send dashboard snapshots to Slack channels on a schedule. Configure via Admin > Settings > Slack.

Embedding

Metabase supports embedding dashboards and questions in external applications:

For the open source edition, public embedding works well for internal tools. Signed embedding in the paid tiers is necessary if you need row-level security in embedded views.

Authentication and SSO

Built-in authentication

By default, Metabase manages its own user accounts with email and password. This works fine for small teams.

LDAP

Connect Metabase to an existing LDAP directory (Active Directory, OpenLDAP):

environment:
  MB_LDAP_ENABLED: true
  MB_LDAP_HOST: ldap.yourdomain.com
  MB_LDAP_PORT: 636
  MB_LDAP_SECURITY: ssl
  MB_LDAP_BIND_DN: cn=metabase,ou=services,dc=yourdomain,dc=com
  MB_LDAP_PASSWORD: ldap-bind-password
  MB_LDAP_USER_BASE: ou=people,dc=yourdomain,dc=com
  MB_LDAP_ATTRIBUTE_EMAIL: mail
  MB_LDAP_ATTRIBUTE_FIRSTNAME: givenName
  MB_LDAP_ATTRIBUTE_LASTNAME: sn

SAML and OpenID Connect (Pro/Enterprise)

The paid editions support SAML 2.0 and OIDC for SSO with providers like Okta, Azure AD, Google Workspace, and Keycloak. If you are running a self-hosted identity provider like Authentik or Keycloak, the OIDC integration works well.

Google Sign-In (free)

Even in the open source edition, you can enable Google Sign-In:

environment:
  MB_GOOGLE_AUTH_CLIENT_ID: your-google-client-id.apps.googleusercontent.com

This is the easiest SSO option for small teams already using Google Workspace.

Permissions and Data Access

Metabase has a granular permissions system:

A common setup: give the "Marketing" group access to the analytics database with the visual query builder only, while "Engineering" gets unrestricted SQL access to all databases.

Performance and Scaling

Caching

Enable query caching to reduce database load:

environment:
  MB_ENABLE_QUERY_CACHING: true
  MB_QUERY_CACHING_TTL_RATIO: 10
  MB_QUERY_CACHING_MIN_TTL: 60

This caches query results so repeated dashboard loads do not hit the database each time.

Resource requirements

Java tuning

Metabase runs on the JVM. For better performance, set memory limits:

environment:
  JAVA_OPTS: "-Xmx2g -Xms1g"

Adjust based on your available RAM. The default is often too conservative.

Backup and Recovery

What to back up

You do not need to back up Metabase itself — it is stateless and can be re-pulled from Docker Hub. All state lives in the PostgreSQL database.

Database backup

# Backup
docker exec metabase_postgres pg_dump -U metabase metabase > metabase-backup.sql

# Restore
cat metabase-backup.sql | docker exec -i metabase_postgres psql -U metabase metabase

Run this daily via cron. The application database is typically small (under 100 MB even for heavy use), so backups are fast.

Reverse Proxy Setup

For HTTPS access, put Metabase behind a reverse proxy.

Caddy:

analytics.yourdomain.com {
    reverse_proxy localhost:3000
}

Nginx:

server {
    server_name analytics.yourdomain.com;

    location / {
        proxy_pass http://localhost:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Upgrading

Metabase releases new versions roughly monthly. To upgrade:

docker compose pull metabase
docker compose up -d metabase

Metabase handles database migrations automatically on startup. Always back up the application database before upgrading — rollbacks require restoring the database to the pre-upgrade state.

Check the release notes before upgrading. Major version bumps (e.g., 0.49 to 0.50) occasionally include breaking changes to the API or embedding behavior.

Honest Trade-offs

Metabase is great if you:

Consider alternatives if you:

The bottom line: Metabase hits a sweet spot that most BI tools miss. It is simple enough for a marketing manager to build their own dashboard, powerful enough for an analyst to write complex SQL, and clean enough that the resulting dashboards look professional. The open source edition covers the majority of use cases, and self-hosting keeps your business data under your control.

Get free weekly tips in your inbox. Subscribe to Self-Hosted Weekly