Installing Grafana on Ubuntu gives a server-hosted web UI for dashboards, alerts, and data source connections. The supported APT repository from Grafana Labs keeps the package tied to normal Ubuntu package updates instead of a one-off downloaded .deb file.
The repository method installs the Grafana OSS package named grafana and creates the grafana-server.service systemd unit. The same repository also provides grafana-enterprise; choose only one edition on a host so later upgrades come from the same package line.
A completed install should report a Grafana version, show grafana-server active in systemd, and return the sign-in page from http://127.0.0.1:3000/login. Expose port 3000 to other clients only after the active firewall, login policy, and HTTPS plan match the server environment.
$ sudo apt update
$ sudo apt install apt-transport-https ca-certificates wget gnupg curl
curl is used later to verify that the local Grafana login page responds.
$ sudo mkdir -p /etc/apt/keyrings
$ sudo wget -O /etc/apt/keyrings/grafana.asc https://apt.grafana.com/gpg-full.key
$ sudo chmod 644 /etc/apt/keyrings/grafana.asc
$ echo "deb [signed-by=/etc/apt/keyrings/grafana.asc] https://apt.grafana.com stable main" | sudo tee /etc/apt/sources.list.d/grafana.list deb [signed-by=/etc/apt/keyrings/grafana.asc] https://apt.grafana.com stable main
$ sudo apt update Get:1 https://apt.grafana.com stable InRelease [7661 B] Reading package lists... Done
$ sudo apt install grafana Reading package lists... Done Building dependency tree... Done The following NEW packages will be installed: grafana ##### snipped ##### Setting up grafana (13.0.2) ...
Install grafana-enterprise instead when Enterprise plugins or licensed Enterprise features are planned. Grafana Labs publishes both packages from the same repository.
$ grafana server -v Version 13.0.2 (commit: 3fcdbc5a, branch: release-13.0.2)
The exact version changes as Grafana Labs publishes new releases. Look for a Version line from the package you installed.
$ sudo systemctl daemon-reload
$ sudo systemctl enable --now grafana-server
$ systemctl is-active grafana-server active
$ curl --silent --include http://127.0.0.1:3000/login HTTP/1.1 200 OK Cache-Control: no-store Content-Type: text/html; charset=UTF-8 X-Content-Type-Options: nosniff X-Frame-Options: deny X-Xss-Protection: 1; mode=block ##### snipped #####
Open http://server.example.com:3000/login from a browser after allowing port 3000 through the active firewall. The first local admin credentials are admin / admin unless /etc/grafana/grafana.ini sets different values.
Related: How to configure HTTPS for Grafana