Skip to content

Grafana on a VPS

Metrics and logs dashboards

Category
Dev / Tools
Author
Grafana Labs
License
AGPL-3.0
Version
13.2.3

The script is free · VPS from $2.79 per month · installs in about 60 seconds

Install over SSH

root@vps:~# command -v docker >/dev/null || curl -fsSL https://get.docker.com | sh; docker volume create grafana-storage && docker run -d --name=grafana --restart unless-stopped -p 3000:3000 -v grafana-storage:/var/lib/grafana grafana/grafana

  • SystemUbuntu 24.04 · x86_64ok
  • Sourcegithub.com/grafana/grafanaok
  • Version13.2.3ok
  • Port3000/tcplisten

✓ Grafana 13.2.3 installed · about 60 seconds

root@vps:~#

Install command from the library. Output is shortened and may differ on your server.

What it is

  • Dashboards
  • Metrics
  • Alerts
  • Prometheus

Grafana is a platform for dashboards and charts. It connects to Prometheus, PostgreSQL, MySQL, Loki and dozens of other sources and shows server, application and business metrics on one screen.

On your own VPS, Grafana is a convenient way to bring monitoring for all your servers and services into one place and set up alerts to Telegram or email.

The command runs Grafana OSS from the official grafana/grafana image; data is stored in a Docker volume.

  • Dashboards with charts, tables and maps
  • Data sources: Prometheus, Loki, PostgreSQL, MySQL and more
  • Alerts to Telegram, Slack and email
  • Thousands of ready-made dashboards on grafana.com
  • Users, teams and access permissions

Recommended plan

For Grafana: at least 1 vCPU, 2 GB RAM and 10 GB NVMe.

Minimum to run
1 vCPU · 1 GB RAM · 10 GB disk
Systems
Ubuntu 22.04 · Ubuntu 24.04 · Debian 12

How to install

Three steps in the bot or one command over SSH; installation takes about 60 seconds.

  1. 01

    Choose a plan in the bot

    Open @ExpressHost_bot and pay for a VPS. The server will be ready in about 60 seconds.

  2. 02

    Add Grafana

    At the “Add-ons” step pick the script from the library, or run it later: Server settings → Scripts.

  3. 03

    Open http://server-IP:3000, log in as admin / admin and set a new password

    The bot will send the server address and login details to the chat.

Manually over SSH

Connect to the server as root and run the command. Supported systems: Ubuntu 22.04, Ubuntu 24.04, Debian 12.

Install command
command -v docker >/dev/null || curl -fsSL https://get.docker.com | sh; docker volume create grafana-storage && docker run -d --name=grafana --restart unless-stopped -p 3000:3000 -v grafana-storage:/var/lib/grafana grafana/grafana

Ports

Grafana ports
PortProtocolPurpose
3000tcpWeb interface

After installation

  1. 1.Open http://server-IP:3000, log in as admin / admin and set a new password
  2. 2.Add a data source: Connections → Data sources
  3. 3.Import a ready-made dashboard by ID from grafana.com/grafana/dashboards

Grafana FAQ

Didn’t find an answer? Message @ExpressHost_SupportBot.

Does Grafana collect metrics itself?

No, it only displays them. Metrics are collected by Prometheus, Netdata, Loki or a database, and Grafana connects to them.

How do I update Grafana?

Run docker pull grafana/grafana, then recreate the container with the same command. Dashboards and settings stay in the grafana-storage volume.

Where is the data stored?

In the grafana-storage Docker volume (the /var/lib/grafana folder inside the container).

Grafana installs at checkout — in the bot.