Metabase - Getting Started Guide
Metabase is an open-source business intelligence platform that lets you explore data, build dashboards and share insights - without writing SQL. Connect your databases (PostgreSQL, MySQL, MongoDB and others), ask questions through a visual query builder and turn the answers into interactive charts and dashboards.
Step 1 - Verify Metabase Works
Your server's IP address and root password are shown on the Server Details page in your client panel. Open your browser and go to:
http://your.server.ip
Metabase may take 30-60 seconds to start after the server boots. If you see a connection error or "502 Bad Gateway", wait a moment and refresh the page. When it loads, you'll see the setup wizard.
If you placed the server behind a VyOS router on a private network, either configure port forwarding (ports 80 and 443) to access Metabase from the internet, or connect over a VPN and reach it on the server's private IP.
Step 2 - Complete the Setup Wizard
The setup wizard will guide you through the initial configuration:
Language
Select your preferred language and click Next.
Admin Account
Create your administrator account - enter your first name, last name, email, company name (optional) and password. These are your credentials for logging in to Metabase.
Usage Info
Metabase asks what you plan to use it for. Select an option or skip.
Add Your Data
Connect an existing database you want to analyze (PostgreSQL, MySQL, MongoDB, etc.). If you don't have one ready yet, skip this step - Metabase will provide a sample database to explore. You can add your databases later.
Usage Data Preferences
Choose whether to send anonymous usage statistics to Metabase.
All Set Up
Setup is complete. Click Take me to Metabase to open the dashboard.
Log in with the email and password you created in the Admin Account step.
Step 3 - Configure Domain and SSL (Optional)
To use Metabase with your own domain and HTTPS:
- Create an A record in your DNS settings pointing your domain to the server IP
- Wait for DNS propagation (usually a few minutes to a few hours)
- Connect via SSH and update the Nginx configuration:
ssh root@your.server.ip
# Update Nginx server_name with your domain
sed -i 's/server_name _;/server_name your-domain.com;/' /etc/nginx/sites-available/metabase
nginx -t && systemctl reload nginx
# Obtain a free Let's Encrypt SSL certificate
certbot --nginx -d your-domain.com
Certbot will automatically configure Nginx for HTTPS and set up certificate auto-renewal.
Post-Installation
Connecting Databases
To add a data source after initial setup:
- Click the gear icon (top right) → Admin settings → Databases → Add database
- Select the database type (PostgreSQL, MySQL, MongoDB, SQLite, etc.)
- Enter the connection details (host, port, database name, credentials)
- Click Save - Metabase will sync the schema automatically
For databases on external servers, make sure the firewall allows connections from your Metabase server IP.
Fail2Ban - Brute-Force Protection
Your server comes with Fail2Ban pre-configured to protect SSH from brute-force attacks.
| Rule | Max Attempts | Ban Duration |
|---|---|---|
| SSH | 5 failed logins | 10 minutes |
Useful commands:
# Check banned IPs
fail2ban-client status sshd
# Unban an IP
fail2ban-client set sshd unbanip 1.2.3.4
If you accidentally lock yourself out, connect via VNC console in your client panel and unban your IP.
Service Management
Metabase runs as a systemd service. Useful commands:
# Check service status
systemctl status metabase
# Restart Metabase
systemctl restart metabase
# View logs
journalctl -u metabase -f
# Nginx reverse proxy
systemctl status nginx
systemctl reload nginx
Updates
To update Metabase to the latest version:
# Stop the service
systemctl stop metabase
# Download the latest JAR (backup the current one first)
cd /opt/metabase
cp metabase.jar metabase.jar.bak
curl -L -o metabase.jar https://downloads.metabase.com/latest/metabase.jar
# Start the service
systemctl start metabase
To update system packages via SSH:
apt update && apt upgrade -y
Backups
Metabase stores all its data (questions, dashboards, settings) in an H2 database. To back it up:
# Stop Metabase before backing up
systemctl stop metabase
# Copy the database file
cp /opt/metabase/metabase.db.mv.db /root/metabase-backup-$(date +%F).db
# Start Metabase again
systemctl start metabase
For production use with large datasets, consider migrating from H2 to PostgreSQL.
Software Included
| Component | Version |
|---|---|
| Ubuntu | 24.04 LTS |
| Metabase | 0.52.5 |
| Java | 21 |
| Nginx | 1.24 |
| Certbot | 2.9.0 |
| Fail2Ban | 1.0.2 |
Troubleshooting
| Problem | Solution |
|---|---|
| Page won't load after boot | Metabase takes 30-60 seconds to start. Wait and refresh. Check status: systemctl status metabase |
| 502 Bad Gateway in browser | Metabase is not running. Restart it: systemctl restart metabase. Check logs: journalctl -u metabase --no-pager -n 50 |
| Out of memory errors | Metabase requires at least 2 GB RAM. Check with free -h. Consider upgrading your server plan |
| Cannot connect to external database | Verify the database host, port and credentials. Ensure the remote database firewall allows connections from your server IP |
| Forgot Metabase admin password | Reset via SSH: java -jar /opt/metabase/metabase.jar reset-password EMAIL |
| Blocked by Fail2Ban | Use VNC console in your client panel to unban your IP |
| Forgot root password | Use the VNC console in your client panel to reset it |