Install Metabase with Systemd on Ubuntu 22.04|20.04|18.04

Step 1: Install Java on Ubuntu 22.04|20.04|18.04|16.04

sudo apt -y update
sudo apt install -y default-jdk
$ java -version

openjdk version "11.0.11" 2021-04-20

OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)

OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

Step 2: Install and Configure the Database server ( MariaDB)

sudo mysql -u root -p
CREATE DATABASE metabase;

GRANT ALL PRIVILEGES ON metabase.* TO 'metabase'@'localhost' IDENTIFIED BY "StrongPassword";

FLUSH PRIVILEGES;

QUIT
'metabase'@'192.168.0.20'
'metabase'@'%'

Step 3: Install Metabase on Ubuntu 22.04/20.04/18.04/16.04

export VER=0.43.2

wget http://downloads.metabase.com/v$VER/metabase.jar

sudo mkdir -p /apps/java

sudo cp metabase.jar /apps/java
$ java -jar metabase.jar

01-14 21:24:56 DEBUG plugins.classloader :: Using NEWLY CREATED classloader as shared context classloader: clojure.lang.DynamicClassLoader@e044b4a

01-14 21:24:57 INFO metabase.util :: Loading Metabase...

01-14 21:24:57 INFO metabase.util :: Maximum memory available to JVM: 483.4 MB

01-14 21:25:01 INFO util.encryption :: Saved credentials encryption is DISABLED for this Metabase instance. 🔓

For more information, see https://metabase.com/docs/latest/operations-guide/encrypting-database-details-at-rest.html

.....

Step 4: Configure Metabase Systemd service

sudo groupadd -r appmgr
sudo useradd -r -s /bin/false -g appmgr appmgr
sudo chown -R appmgr:appmgr /apps/java
sudo vim /etc/systemd/system/metabase.service
[Unit]

Description=Metabase applicaion service

Documentation=https://www.metabase.com/docs/latest



[Service]

WorkingDirectory=/apps/java

ExecStart=/usr/bin/java -Xms128m -Xmx256m -jar metabase.jar

User=appmgr

Type=simple

Restart=on-failure

RestartSec=10



[Install]

WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl start metabase.service

sudo systemctl enable metabase.service
sudo systemctl status metabase

Step 5: Access Metabase Web User Interface

$ sudo ss -tunelp | grep 3000

tcp LISTEN 0 50 *:3000 *:* users:(("java",pid=14386,fd=18)) uid:998 ino:85041 sk:a v6only:0 <->
metabase-ubuntu-18.04-welcome-page-min
metabase-set-username-password-min-1024x475
metabase-set-database-min-934x1024
metabase-dashboard-min-1024x427

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
ComputingPost

ComputingPost

ComputingPost — Linux Howtos, Tutorials, Guides, News, Tips and Tricks.