How to Install Metabase on Ubuntu 22.04

Metabase is an open-source business intelligence tool that lets you visualize data, build dashboards, and ask questions about data all through an intuitive web interface. It connects to various databases like PostgreSQL, MySQL, MongoDB, etc., and provides simple tools for analysis and reporting.

Here’s a step-by-step guide to get Metabase up and running:

Prerequisites

  • Launch the Ubuntu 22.04 instance on Neevcloud

  • Access the server using SSH.

  • Java 11 or higher installed.

  • Port 3000 is open for web access.

Update && Upgrade the system

First, ensure your package list is up to date to avoid any issues with outdated packages

sudo apt-get update -y
sudo apt-get upgrade -y

Install Java (Required for Metabase)

Metadabse runs on java, install openJDk.

sudo apt install -y openjdk-11-jdk

Verify Java is installed

sudo java -version

Download the Metabase JAR File

Now create a one-directory, and permit to execute the jar file.

sudo mkdir /app
sudo chmod 777 /app

Navigate to your directory and download the latest Metabase JAR file:

wget https://downloads.metabase.com/v0.48.5/metabase.jar

Running Metabase as a Systemd Service

To ensure Metabase starts automatically on reboot, configure it as a systemd service.

Create a systemd service file:

sudo vi /etc/systemd/system/metabase.service
[Unit]
Description=Metabase Server
After=network.target

[Service]
ExecStart=/usr/bin/java -jar /app/metabase.jar
WorkingDirectory=/app
Restart=always
User=root
Group=root

[Install]
WantedBy=multi-user.target

Adjust the file path if you downloaded Metabase to a different directory.

Reload systemd and start Metabase:

sudo systemctl daemon-reload
sudo systemctl enable metabase
sudo systemctl start metabase

Check service status:

Access the Metabase Web Interface

Once Metabase is running, open your browser and go to: http://your-server-ip:3000

Last updated