DEV Community

Cover image for How I Self-Host Metabase & Why Your Team Should Too
Paschal Ogu
Paschal Ogu

Posted on • Edited on

How I Self-Host Metabase & Why Your Team Should Too

If you have not yet explored Metabase, this is for you.

I have had this piece sitting in my drafts for a long time because I kept asking myself a simple question: Do businesses really need yet another tool?

The answer, for me, ended up being yes.

Metabase is one of those rare tools that feels equally friendly to non-technical teammates and powerful enough for someone who wants to write SQL, model data, and build dashboards that actually get used.

What is Metabase?

Metabase is an open-source business intelligence tool that helps people explore, visualize, and understand data. If you are working in a startup, it usually shows up in moments like these:

  • Ops wants a daily view of signups, churn, or cashflow.
  • Sales wants a clean dashboard they can check without waiting on engineering.
  • Product wants quick answers without spinning up a full analytics pipeline.

Image below shows sample dashboard built with metabase:
Metabase Dashboard

Why I think this matters — especially for startups

Most startups struggle because their data is scattered, hard to query, and only a few people can make sense of it. Metabase helps by making data visible to the wider team, reducing the time it takes to answer basic questions, and building a habit of checking numbers before making decisions.

A few Metabase features I like

Here are some of the highlights, with links to the official Metabase docs:

  • Set up quickly: Set up in five minutes — Unlike most BI tools that require lengthy onboarding or dedicated IT support, Metabase gets you from zero to exploring data in minutes with a straightforward guided setup.

  • Self-serve analytics: Let anyone ask questions — The question builder lets non-technical teammates pull their own insights without writing a single line of SQL, reducing the bottleneck on data and engineering teams.

  • Power user mode: SQL editor — For those who prefer working directly with the database, the built-in SQL editor gives full flexibility without ever leaving the tool.

  • Beautiful dashboards: Dashboards — Metabase makes it easy to combine charts, metrics, and tables into clean, shareable dashboards that look good without any design effort.

  • Automated sharing: Dashboard subscriptions — Schedule dashboards to be delivered by email or Slack on a recurring basis, keeping stakeholders informed without anyone manually sending reports.

  • Proactive monitoring: Alerts — Get notified when a metric crosses a threshold so you catch problems or opportunities as they happen, not in a weekly review.'

Cloud vs self-hosted

Metabase can be used in two main ways:

  • Cloud — You pay Metabase to host it for you.
  • Self-hosted — You run it on your own server.

In this post I focus on self-hosting because you keep full control of your data, you can place it close to your database, and it is a great option for teams already running services on a VPS or AWS.

Self-hosting Metabase with Docker

What you will need

  • A laptop or VM with Docker installed
  • An SQL client (MySQL Workbench or DbGate works fine)

What we are going to do

  1. Run a MySQL database in Docker
  2. Load sample data into MySQL
  3. Run Metabase in Docker
  4. Connect Metabase to MySQL
  5. Build your first question and dashboard

Step 1: Run MySQL in Docker

docker run \
  --name test-mysql \
  -v my-mysql-data:/var/lib/mysql \
  -e MYSQL_ROOT_PASSWORD=strong_password \
  -e MYSQL_USER=customuser \
  -e MYSQL_PASSWORD=custompassword1 \
  -e MYSQL_DATABASE=mydatabase \
  -p 3306:3306 \
  -d mysql
Enter fullscreen mode Exit fullscreen mode

Here is what each flag does:

  • --name test-mysql — names the container so you can reference it later
  • -v my-mysql-data:/var/lib/mysql — creates a Docker volume so data persists if the container restarts
  • -e MYSQL_ROOT_PASSWORD — sets the root password
  • -e MYSQL_USER / -e MYSQL_PASSWORD — creates a non-root user
  • -e MYSQL_DATABASE=mydatabase — creates a database on first start
  • -p 3306:3306 — exposes MySQL on port 3306
  • -d mysql — runs the official MySQL image in detached mode

To confirm the container started correctly:

docker logs test-mysql
Enter fullscreen mode Exit fullscreen mode

Step 2: Download and import sample data

Download the MySQL sample database from mysqltutorial.org, unzip it, and import the SQL dump using MySQL Workbench or DbGate. You should be able to preview all the tables after the import completes.

Step 3: Run Metabase

docker run -d -p 3000:3000 --name metabase metabase/metabase
Enter fullscreen mode Exit fullscreen mode

Give it a minute or two to boot, then open your browser at http://localhost:3000 or http://your-ip-address:3000. Follow the setup wizard — choose your language and create your admin account.

Metabase Welcome Screen

Step 4: Connect Metabase to MySQL

Metabase is able to connect to host of databases below:
Metabase connection option

When Metabase prompts for database connection details, use:

Field Value
Port 3306
Database name mydatabase
Username customuser
Password the password you set above

metabase-connected

payment-metabase-table

Step 5: Build something small

Once the connection works, try this:

  1. Ask a simple question — for example, total payment per month.
  2. Save it.
  3. Add it to a new dashboard.
  4. Share the dashboard link with your team.
  5. Create notification to alert your team of important events.

This is the moment Metabase starts paying for itself.

Metabase Notification

Closing thoughts

I like Metabase because it is practical. It gets a team from "we have data" to "we can actually use it" without a heavy setup or a dedicated data engineer.

Do you need help self-hosting Metabase for your organization? Feel free to reach out to me on LinkedIn and on Twitter @Paschal_ik

If you found this useful, you can buy me a coffee — I'd always appreciate you.

Top comments (0)