---
title: "Self-host Metabase in 2026: dashboards and PostgreSQL, in France"
url: https://while.sh/en/guides/self-host-metabase/
author: "Aloïs Oddon, co-founder of Nextmap"
updated: 2026-11-19
---

# Self-host Metabase in France, with its PostgreSQL database, with your AI (2026)

Your dashboards deserve better than a forgotten server. Connected to while over MCP, your AI deploys Metabase in France, with its settings in a PostgreSQL database backed up every day, and private to your colleagues if you want.

> **The short version.** Over MCP, your AI deploys Metabase with while, in France, with its dashboards in a PostgreSQL database backed up every day. What matters, like deleting a database, waits for a person's approval.

## Prerequisites

- A new Metabase instance, or the database of a current instance.
- Your AI: Claude Code, Codex, Cursor or Gemini CLI.

## Step 1: Ask your AI for Metabase

> You, to your AI: Connect to while with my account (while.sh/agents), then deploy Metabase with its PostgreSQL database.

Your AI adds while's MCP server itself. If it asks you to, restart it. On the first call to while, a page opens in your browser. In Claude Code, if it doesn't open, type /mcp, choose while, then Authenticate. On that page, choose "A new app", then click Authorize.

## Step 2: Create your Metabase account

Your AI gives you the address of your Metabase, for example `https://metabase.while.cloud`. The first startup takes about five minutes. You then create the admin account there, then your first questions.

## What your AI does

It deploys the official Metabase image, without a Dockerfile (source 3), with this while.yaml:

```yaml titre="while.yaml"
apiVersion: while/v1
project: metabase
services:
  - name: web
    image: docker.io/metabase/metabase:latest
    port: 3000
    health:
      path: /api/health
      startup_timeout_seconds: 600
    command: ["sh", "-c", "MB_DB_TYPE=postgres MB_DB_CONNECTION_URI=\"$DATABASE_URL\" MB_JETTY_PORT=$PORT exec /app/run_metabase.sh"]
    scale:
      min: 1
      max: 1
    resources:
      cpu: 2000m
      memory: 1536Mi
databases:
  - name: main
    pool: session
```

Metabase keeps its settings, its questions and its dashboards in the PostgreSQL database (source 1). The startup command gives it that database's address and its port (sources 1 and 2). Three settings can't be guessed, and without them Metabase doesn't start:

- **`pool: session`, on the database.** Metabase's migrations take a lock that needs to keep the same connection to the database. Without this line, Metabase stops at startup.
- **`startup_timeout_seconds: 600`.** On its first startup, Metabase prepares its database for about three minutes. Without this line, while withdraws the version after 120 seconds.
- **`memory: 1536Mi`.** Metabase is a Java app: with the default memory, it falls over.

Two CPUs make startup shorter, and a single instance is enough: it fits within the Free plan's CPU quota. If your AI leaves out one of these settings, show it this guide.


<figure class="illus"><img src="/illustrations/guide-heberger-1200.webp" srcset="/illustrations/guide-heberger-768.webp 768w, /illustrations/guide-heberger-1200.webp 1200w" sizes="(min-width: 48rem) 46rem, 100vw" width="1536" height="1024" loading="lazy" decoding="async" alt="Self-host Metabase in France with no server to manage: the open-source tool and its PostgreSQL database backed up every day, served over HTTPS on while, put in production by your AI" /><figcaption>The open-source tool and its PostgreSQL database, backed up every day, in France, with no server to look after.</figcaption></figure>

## Connect Metabase to your app's database

> You, to your AI: Connect Metabase to our app's database, read-only.

Your AI gives Metabase read-only access to your app's database, even when it sits in another project of your organization. Metabase reads, and can never write.

## Restrict Metabase to your colleagues

> You, to your AI: Restrict Metabase to people in the company.

Your AI makes the service internal:

```yaml titre="while.yaml"
    access: internal
```

Then it asks for the Access role for your domain, @acme.com, on this app, and a person in your organization approves it.

Once your Google Workspace or Microsoft 365 is connected to while, on the Pro plan, your colleagues sign in with their usual account, then with Metabase's own sign-in.

## Move to your own domain

> You, to your AI: Put Metabase on stats.acme.com.

Your AI declares the domain, you add the DNS records it gives you, and the HTTPS certificate follows.

## Upgrade to the latest version of Metabase

> You, to your AI: Upgrade Metabase to the latest version.

Your AI deploys the latest Metabase image. If the new version disappoints, it rolls back to the previous one.

## Put Metabase back the way it was yesterday

> You, to your AI: Restore Metabase's database to yesterday at 6 pm.

Your AI prepares the restore, and you approve it: a safety backup is taken first, then the database goes back to the moment you asked for.

## Next steps

- [Restore your database to a precise moment](/en/guides/restore-postgresql/)
- [Restrict an internal tool to company accounts](/en/guides/internal-tool-company-sign-in/)
- [Deploy a Docker container](/en/guides/deploy-docker-container/)

## Sources

1. [Metabase, the application database (PostgreSQL)](https://www.metabase.com/docs/latest/installation-and-operation/configuring-application-database), 2026-11-02
2. [Metabase, environment variables](https://www.metabase.com/docs/latest/configuring-metabase/environment-variables), 2026-11-02
3. [Metabase, the Docker image](https://www.metabase.com/docs/latest/installation-and-operation/running-metabase-on-docker), 2026-11-02

## Questions

### Are my dashboards backed up?

Yes: they live in Metabase's PostgreSQL database, which is backed up every day and can go back to a precise moment.

### Can Metabase read my databases?

It reads your apps' databases on while, read-only, through a private connection. It can also read a database outside while, once internet access is opened and approved.

### How much memory does it need?

1.5 GiB: Metabase is a Java app, and with less, it falls over at startup.

### How long does the first startup take?

About five minutes: Metabase prepares its database before it opens its pages. Later startups are shorter.

### Where is my Metabase hosted?

In France, by Nextmap, a French company.
