// troubleshooting guide · metabase

Metabase Docker Data Lost After Restart

Status
Workaround available
platforms:
Self-hosted (Docker)
updated:
November 16, 2026
reports:
3
Method
how we research
Share

RUNBOOK · metabase/docker-data-lost3 FIXES

// quick answer

If the setup screen appears every time the container restarts, Metabase's application database lived inside the container. Mount a persistent volume, and for production move from H2 to PostgreSQL.

Most likely fix: Mount a persistent volume

How to fix it

// try these in order, the most common fix is first

  1. FIX 1Mount a persistent volume

    1. 01Stop the container
    2. 02Run it again with a volume mounted for the application database (the docs use the /metabase.db directory for H2)
    3. 03Confirm data survives a restart
    Did this fix it?
  2. FIX 2Move to PostgreSQL

    1. 01Create a PostgreSQL database for Metabase
    2. 02Set MB_DB_TYPE=postgres plus MB_DB_DBNAME, MB_DB_PORT, MB_DB_USER, MB_DB_PASS, MB_DB_HOST
    3. 03If you have an H2 file, run java -jar metabase.jar load-from-h2 /path/to/metabase.db (without .mv.db)
    Did this fix it?
  3. FIX 3Check the logs for a fresh H2 database

    1. 01Run docker logs CONTAINER_ID
    2. 02If it reports creating a new H2 database, your MB_DB_* variables are wrong
    3. 03Check them with docker inspect
    Did this fix it?

SANDBOX · metabase RUNS IN YOUR BROWSER

Try it: browse a sample shop and watch visitors, funnels and live data arrive

A hands-on Metabase-style sandbox, including the spots where users get stuck. See where problems like this one start. 1-2 minutes, nothing is saved.

Symptoms

After a Docker restart or redeploy, Metabase shows the setup wizard again and all questions, dashboards and users are gone.

Why it happens

  • C-01No persistent volume for the H2 application database
  • C-02Wrong MB_DB_* variables so Metabase silently creates a fresh H2 database
  • C-03Ephemeral storage on platforms like Railway or Kubernetes

// this guide also covers

  • metabase docker data lost
  • metabase setup screen every restart
  • metabase docker persistent volume
  • metabase h2 to postgres

Still not working?

If Metabase keeps failing, you're not alone. See every Metabase problem users report or the alternatives people switch to.

Done fighting Metabase? Our small team builds your own Metabase alternative, or any software you need: web, mobile, games, desktop. Price agreed together.

Talk to us

Watch Metabase Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

The same problem in other apps

All missing or lost data guides →

Other Metabase errors

All 14 Metabase errors and fixes →