Self-host Metabase with Postgres with Levelrail
Metabase business intelligence with its own application data kept in a bundled Postgres database instead of the built in file, so dashboards and questions survive upgrades and scale past a single user. Create the admin on first open.
- Authormetabase
- LicenceAGPL-3.0-or-later
- Memory1.5 GiB
- Services2
How to self-host Metabase with Postgres
-
Pull the images
2 images are pulled on your server.
Show images
postgres:17.11-alpinemetabase/metabase:v0.65.4.1
-
Create the app
2 services start in a single Compose app, with 1 named volume mount for your data, on port 3000.
-
Fill in the secrets
2 secrets are generated and stored encrypted, 8 settings are preset, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
After the first start
- Open the page, create the admin account, then connect the databases you want to explore.
Metabase with Postgres requirements
- Memory
- About 1.5 GiB
- Architectures
- amd64 unknown, arm64 unknown
- Ports
- 3000
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- AGPL-3.0-or-later, network copyleft (agpl) license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Metabase with Postgres. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the Metabase with Postgres docs page.
Deploy Metabase with Postgres your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy Metabase with Postgres from the CLI
levelrail-cli templates install metabase-postgres --name my-metabase-postgres Deploy Metabase with Postgres with the API
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
https://levelrail.example.com/api/v1/service-templates/metabase-postgres/install \
-d '{
"name": "my-metabase-postgres"
}' Metabase with Postgres configuration
Metabase with Postgres services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| db | postgres:17.11-alpine | none | pgdata -> /var/lib/postgresql/data |
| metabase | metabase/metabase:v0.65.4.1 | 3000 | none |
Metabase with Postgres environment variables
| Variable | Service | Value |
|---|---|---|
| POSTGRES_DB | db | Preset by the template |
| POSTGRES_PASSWORD | db | Generated at deploy |
| POSTGRES_USER | db | Preset by the template |
| JAVA_OPTS | metabase | Preset by the template |
| MB_DB_DBNAME | metabase | Preset by the template |
| MB_DB_HOST | metabase | Preset by the template |
| MB_DB_PASS | metabase | Generated at deploy |
| MB_DB_PORT | metabase | Preset by the template |
Show all 10 variables
- MB_DB_TYPEmetabasePreset by the template
- MB_DB_USERmetabasePreset by the template
Ports and volumes
- Ports
- 3000
- Volumes
- 1 named mount: pgdata -> /var/lib/postgresql/data
Metabase with Postgres FAQ
How much memory does Metabase with Postgres need?
The catalog lists about 1.5 GiB of memory for Metabase with Postgres across its 2 services.
Does Metabase with Postgres run on arm64?
For Metabase with Postgres, arm64 support is not confirmed; amd64 is unknown.
What licence is Metabase with Postgres under?
Metabase with Postgres is licensed under AGPL-3.0-or-later, which is network copyleft, so source sharing also applies when it is offered as a hosted service.
Does Metabase with Postgres need configuration before it starts?
No. The template fills in its own defaults and generates secrets at deploy time.
Which database does Metabase with Postgres bundle?
The template includes Postgres, running as its own service.
Which ports does Metabase with Postgres use?
Metabase with Postgres listens on port 3000 inside the stack.
Where does Metabase with Postgres keep its data?
In a named volume: pgdata mounted at /var/lib/postgresql/data.
Can I deploy Metabase with Postgres on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Metabase with Postgres, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image postgres:17.11-alpine, metabase/metabase:v0.65.4.1 is what you deploy there.