Appearance
Are you an LLM? You can read better optimized documentation at /app-recipes/metabase.md for this page in Markdown format
Metabase
A quick guide to deploying a self-hosted Metabase instance on Deploio and connecting it to PostgreSQL or MySQL databases.
Before you start
Metabase needs a persistent application database to store its users, dashboards, configuration, etc.
TIP
Use a Deploio PostgreSQL database for this. Do not rely on Metabase's embedded H2 database for a production deployment.
WARNING
Metabase is a Java application and needs at least 1 GB of memory. Allocate more if you expect substantial usage or larger workloads.
1. Create the Metabase application database
Create a PostgreSQL database in Deploio. See Configuring your database for details. In the Deploio Cockpit, open the database's Access section and note its FQDN, database name, username, password, and port.
2. Deploy Metabase
Create an application in Deploio using the official Metabase container image. See Configuring your application for details. If your deployment uses a Dockerfile, commit it to a Git repository or subdirectory configured as the application's source. For example, the Metabase Deploio Repository includes a Metabase Dockerfile.
bash
# Example: Creating a Metabase app
nctl create app metabase --project metabase \
--git-url=https://github.com/renuo/metabase-deploio \
--git-revision=main \
--dockerfile \
--size=standard-2 \
--port=3000 \
--env="MB_DB_TYPE=postgres;MB_DB_HOST=<fqdn-from-access>;MB_DB_PORT=5432;MB_DB_DBNAME=<database-name>;MB_DB_USER=<database-user>" \
--sensitive-env="MB_DB_PASS=<database-password>"Configure these environment variables on the application. Use the credentials for the Database created in step 1:
| Environment Variables | Value |
|---|---|
| MB_DB_DBNAME | Database name |
| MB_DB_HOST | FQDN from access |
| MB_DB_PASS | Database password |
| MB_DB_PORT | Port (5432) |
| MB_DB_TYPE | postgres |
| MB_DB_USER | Database User (same as name) |
3. Add a data source in Metabase
PostgreSQL Database Setup
- In Metabase, open Admin settings → Databases and select Add database.
- Select PostgreSQL and enter a display name.
- In the Deploio Cockpit, open the PostgreSQL database you want to connect and go to Access. Use its FQDN as the host, along with its database name, username, password, and port (usually
5432). - Enable Use a secure connection (SSL) and save the connection.
- Verify that Metabase can connect.
MySQL Database Setup
- In Metabase, open Admin settings → Databases and select Add database.
- Select MySQL and enter a display name.
- In the Deploio Cockpit, open the MySQL database and go to Access. Use its FQDN as the host, along with its database name, username, password, and port (usually
3306). - Enable Use a secure connection (SSL) and provide the server CA certificate from Access → Certificate Authority.
- Save the connection and verify that Metabase can connect.
Troubleshooting connection issues
If Metabase can't connect to your database because of SSL certificate errors, try one or both of the following options to the Additional JDBC connection string options field of the data source.
| Option | What it does |
|---|---|
disableSslHostnameVerification=true | Skips the check that the server's hostname matches the name in its SSL certificate. Use it if the error mentions a hostname mismatch. |
trustServerCertificate=true | Accepts the server's certificate without validating it against a trusted root certificate. Use it if the error mentions an untrusted or unknown certificate. |
WARNING
These options make the connection less strict. The traffic stays encrypted, but Metabase no longer verifies that it is talking to the right server. For MySQL, prefer providing the server CA certificate (see above), and only fall back to these options if that doesn't work.