Install Metabase with Systemd on Ubuntu
1
2
mkdir metabase && cd metabase
wget https://downloads.metabase.com/v0.38.3/metabase.jar
1
2
3
4
5
6
7
sudo apt -y install openjdk-11-jdk openjdk-11-jre
sudo groupadd -r metabase
sudo useradd -r -s /bin/false -g metabase metabase
sudo chown -R metabase:metabase metabase/
sudo touch /var/log/metabase.log
sudo touch /etc/default/metabase
sudo chmod 640 /etc/default/metabase
1
nano /etc/systemd/system/metabase.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[Unit]
Description=Metabase server
After=syslog.target
After=network.target
[Service]
WorkingDirectory=/home/you_username/projects/
ExecStart=/usr/bin/java -jar /home/you_username/projects/metabase/metabase.jar
EnvironmentFile=/etc/default/metabase
User=metabase
Type=simple
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=metabase
SuccessExitStatus=143
TimeoutStopSec=120
Restart=always
1
sudo service metabase status
1
2
sudo touch /etc/rsyslog.d/metabase.conf
sudo nano /etc/rsyslog.d/metabase.conf
1
2
if $programname == 'metabase' then /var/log/metabase.log
& stop
1
sudo systemctl restart rsyslog.service
1
2
3
sudo systemctl daemon-reload
sudo systemctl start metabase.service
sudo systemctl enable metabase.service
Acess it on http://yourhost:3000