Problem to run metabase in Linux Virtual Server

I’m still new in metabase, currently I want to run my metabase on my virtual linux server, i had install metabase jar and currently using postgresql as it database server, and i did some configuration as below:

For metabase.env

MB_PASSWORD_COMPLEXITY=normal
MB_PASSWORD_LENGTH=8

MB_JETTY_HOST=localhost
MB_JETTY_PORT=3000

MB_DB_TYPE=postgres
MB_DB_HOST=localhost
MB_DB_PORT=5432

MB_DB_DBNAME=metabasedb
MB_DB_USER=metabase
MB_DB_PASS=StrongPassword

MB_EMOJI_IN_LOGS=true

For metabase.service

[Unit]
Description=Metabase server
After=syslog.target
After=network.target

[Service]
EnvironmentFile=/var/metabase/metabase.env
User=metabase
Group=metabase
Type=simple
ExecStart=/usr/bin/java -jar /var/metabase/metabase.jar
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=metabase

[Install]
WantedBy=multi-user.target

When i start the service, everything is running fine, but when i want to access the metabase interface on the my browser using localhost:3000, it not display the metabase interface.

p/s:this setup are follow some guided based on this link : https://www.alibabacloud.com/blog/database-visualization-using-metabase-part-1---install-metabase-on-ubuntu-1604_592155

Hi @fiqmanan
So you are running Metabase on the server, and telling it to only listen on itself (localhost), which means you can only access Metabase from the server itself.
You need to either setup a reverse-proxy (Nginx, Caddy, Apache, etc) as the accessing webserver, or set MB_JETTY_HOST=0.0.0.0, which means Metabase will listen on all interfaces on the server and then you need to access it in your browser by http://<ip-of-your-server>:3000 (if you have a server firewall, then you need to allow the port).
The documentation explains most of this:
https://www.metabase.com/docs/latest/operations-guide/running-metabase-on-debian.html

1 Like

ok. Thanks it work.