Hostxpeed
Login Get Started →
Server Management

How to Set Up Grafana Dashboard

6 min read
27 views
Jun 12, 2026

Prerequisites

Before installing Grafana, make sure you have:

  • SSH access to your VPS
  • Root or sudo privileges
  • Prometheus or another data source (see Article 29)

Step 1: Install Grafana

Connect to your VPS:

ssh hxroot@YOUR_SERVER_IP -p 22
sudo apt install -y software-properties-common
sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
sudo apt update
sudo apt install grafana -y

Step 2: Start and Enable Grafana

sudo systemctl enable grafana-server
sudo systemctl start grafana-server

Step 3: Configure Firewall

sudo ufw allow 3000/tcp

Step 4: Access Grafana Web Interface

Open browser at http://YOUR_VPS_IP:3000.

Login with: admin / admin (you will be prompted to change password).

Step 5: Add a Data Source (Prometheus)

  1. Click Configuration (gear icon) → Data Sources
  2. Click Add data source → Select Prometheus
  3. Set URL to http://localhost:9090
  4. Click Save & Test

Step 6: Import a Pre-made Dashboard

The easiest way to get started is to import from Grafana.com:

  1. Click DashboardsImport
  2. Enter Dashboard ID: 1860 (Node Exporter Full)
  3. Select Prometheus as data source
  4. Click Import

Other useful dashboard IDs:

  • 11179 – Linux Server Metrics
  • 11074 – Nginx Metrics
  • 7362 – MySQL Overview

Step 7: Create a Custom Dashboard

  1. Click CreateDashboardAdd new panel
  2. In Query field, enter PromQL, e.g., node_cpu_seconds_total{mode="user"}
  3. Choose visualization type (Time series, Gauge, Table, etc.)
  4. Click Apply
  5. Repeat for CPU, memory, disk, network
  6. Save dashboard (Ctrl+S)

Step 8: Set Up Alerts in Grafana

Grafana can send alerts to email, Telegram, Slack, etc.

  1. Create a panel with a query that should be monitored
  2. Go to Alert tab
  3. Set conditions (e.g., when value > 85 for 5 minutes)
  4. Configure notification channel (Email, Webhook)
  5. Save dashboard

Step 9: Secure Grafana with HTTPS (Optional)

Edit /etc/grafana/grafana.ini:

[server]
protocol = https
cert_file = /etc/ssl/certs/grafana.crt
cert_key = /etc/ssl/private/grafana.key

Restart Grafana.

Step 10: Enable Anonymous Access (For public read-only dashboards)

In /etc/grafana/grafana.ini:

[auth.anonymous]
enabled = true
org_role = Viewer

Restart Grafana.

✅ Grafana is ready. You now have a professional monitoring dashboard for your VPS.

Was this article helpful?