Metabase: Self-Hosted Business Intelligence That Non-Technical People Can Actually Use
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.
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:
- Cost — The open source edition is free. You pay only for your server.
- Data privacy — Queries run directly against your database. No business data leaves your network.
- No user limits — Cloud pricing scales per user. Self-hosted has no seat restrictions.
- Customization — Full control over configuration, embedding, and integration with internal tools.
- Performance — Place Metabase on the same network as your database for minimal query latency.
Reasons to consider Metabase Cloud instead:
- You have no one to manage infrastructure
- You need official SLA and support
- Your team is small (under 5 users) and the cost is acceptable
- You want automatic updates without maintenance windows
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.
- Strengths: Excellent SQL editor, good visualization options, wide data source support
- Weaknesses: No visual query builder, stagnant development, limited dashboard interactivity
- Verdict: If your entire team writes SQL comfortably, Redash works. Otherwise, Metabase is the better choice. Redash's uncertain future makes it a harder recommendation for new deployments.
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.
- Strengths: Tight dbt integration, modern interface, growing community
- Weaknesses: Requires dbt, smaller ecosystem, fewer integrations
- Verdict: If your data stack is built around dbt, Lightdash is worth evaluating. For general-purpose BI without a specific data stack, Metabase is more flexible.
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:
- Language selection — Metabase supports 30+ languages
- Admin account — Create the first admin user
- Database connection — Connect to the database you want to analyze (not the Metabase application database)
- 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
- PostgreSQL — First-class support, most popular choice
- MySQL / MariaDB — Full support
- SQL Server — Full support
- MongoDB — Good support for document queries
- SQLite — Works for small datasets
- BigQuery — For Google Cloud data warehouses
- Snowflake — For Snowflake data warehouses
- Redshift — For AWS data warehouses
- Presto / Trino — For distributed query engines
- ClickHouse — Via community driver
- DuckDB — Via community driver
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:
- Select the
orderstable - Add a Summarize step: Sum of
amount, grouped byproduct.categoryandcreated_at(by month) - Add a Filter:
created_atis in the last 12 months - 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:
- Autocomplete for table and column names
- Variables that turn into filter widgets (
{% raw %}{{date_range}}{% endraw %}becomes a date picker) - Snippets for reusable SQL fragments shared across the team
- Results caching to avoid hammering the database with repeated queries
Assembling dashboards
Dashboards combine multiple questions (charts, tables, numbers) into a single view:
- Click New > Dashboard
- Add saved questions or create new ones inline
- Arrange and resize cards with drag-and-drop
- Add filter widgets that apply across all cards (date ranges, category selectors)
- 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):
- Choose a dashboard
- Set a schedule (daily, weekly, monthly)
- Pick recipients
- Metabase renders the dashboard as images and sends them via email
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:
- Public embedding — Simple iframe embedding (open source edition)
- Signed embedding — Secure, parameterized embedding with JWT tokens (requires Pro/Enterprise)
- Full-app embedding — Embed the entire Metabase interface within your app (requires Pro/Enterprise)
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:
- Groups — Users belong to one or more groups
- Database permissions — Per-group access to each connected database (no access, granular, unrestricted)
- Table permissions — Hide specific tables from specific groups
- Column permissions — Restrict access to sensitive columns (e.g., salary, SSN)
- Row-level restrictions — Filter data based on user attributes (Pro/Enterprise)
- Query permissions — Control whether a group can write SQL or is limited to the visual builder
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
- Small team (under 10 users): 2 GB RAM, 2 CPU cores
- Medium team (10-50 users): 4 GB RAM, 4 CPU cores
- Large team (50+ users): 8+ GB RAM, 4+ CPU cores, consider horizontal scaling
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
- The PostgreSQL application database (contains all dashboards, questions, users, settings)
- The
docker-compose.ymland environment configuration
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:
- Have a mix of technical and non-technical people who need data access
- Want dashboards that non-engineers can build and maintain
- Need a quick path from database to interactive dashboard
- Run PostgreSQL, MySQL, or another standard SQL database
- Want a self-hosted alternative to Looker, Mode, or Tableau
Consider alternatives if you:
- Need extremely custom visualizations (Superset or Grafana offer more chart types)
- Run a pure dbt shop and want tight model integration (Lightdash)
- Only have SQL-proficient users and want minimal overhead (Redash)
- Need real-time streaming dashboards (Grafana with Prometheus/InfluxDB)
- Want embedded analytics as a core product feature (evaluate the Pro/Enterprise tier)
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.
