This article provides a step-by-step guide detailing how to install and run Netdata on AlmaLinux VPS—a powerful, real-time performance monitoring tool for systems and applications.
✅ What is Netdata?
Netdata is an open-source monitoring agent that provides real-time performance metrics for systems, applications, containers, and more—displayed through an interactive web dashboard. It’s lightweight, highly efficient, and ideal for resource monitoring on servers like VPSes.
🛠️ Prerequisites
- AlmaLinux 8 or AlmaLinux 9 VPS
- Root or sudo access
- Internet access
- Optional: Firewall access if remote monitoring is required
How to Install and Run Netdata on AlmaLinux VPS
To install and run Netdata on AlmaLinux VPS, follow the steps below:
-
Step-by-Step Installation Guide
-
Update Your System
sudo dnf update -y sudo dnf install epel-release -y
-
Install Required Dependencies
sudo dnf install git curl gcc make autoconf autogen automake pkgconfig zlib-devel libuuid-devel libmnl-devel cmake libuv-devel libyaml-devel openssl-devel -y
-
Add the Netdata User (Optional but Recommended)
sudo useradd -r -U netdata
-
Clone Netdata Installer from GitHub
curl https://get.netdata.cloud/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --no-updates --stable-channel --disable-telemetry sudo systemctl enable --now netdata
This script installs Netdata and its dependencies automatically. It’s safe and the recommended method from the Netdata team.
-
-
Verify Installation
After installation, check that the Netdata service is running:
sudo systemctl status netdata
Expected output:
Active: active (running)
If not running, start and enable Netdata:
sudo systemctl enable --now netdata
-
Install SSL via Certbot and Nginx
-
Install Nginx and Certbot
sudo dnf install nginx -y sudo systemctl enable --now nginx
Install Certbot and its Nginx plugin:
sudo dnf install epel-release -y sudo dnf install certbot python3-certbot-nginx -y
-
Configure Nginx as Reverse Proxy for Netdata
Create Nginx site config for your domain:
sudo nano /etc/nginx/conf.d/netdata.conf
Paste this (replace
monitor.yourdomain.com
):server { listen 80; server_name monitor.yourdomain.com; location / { proxy_pass http://127.0.0.1:19999/; proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
Then reload Nginx:
sudo nginx -t && sudo systemctl reload nginx
Verify by visiting:
http://monitor.yourdomain.com
-
Obtain SSL Certificate via Certbot
Run Certbot to secure your domain:
sudo certbot --nginx -d monitor.yourdomain.com
- Follow the prompts
- Certbot will configure SSL and reload Nginx
Once complete, visit:
https://monitor.yourdomain.com
-
Auto-Renewal (Recommended)
Certbot adds automatic renewal via cron or systemd, but you can test it:
sudo certbot renew --dry-run
-
-
Force HTTP to HTTPS Redirection
-
Redirect HTTP to HTTPS
Edit the Nginx Netdata config:
sudo nano /etc/nginx/conf.d/netdata.conf
Update it to include a redirect block:
# Redirect all HTTP traffic to HTTPS server { listen 80; server_name monitor.yourdomain.com; return 301 https://$host$request_uri; } # HTTPS block (created by Certbot or manually) server { listen 443 ssl http2; server_name monitor.yourdomain.com; ssl_certificate /etc/letsencrypt/live/monitor.yourdomain.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/monitor.yourdomain.com/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; location / { proxy_pass http://127.0.0.1:19999/; proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
Save and reload Nginx:
sudo nginx -t && sudo systemctl reload nginx
-
Update Firewall Rules (Firewalld)
Allow HTTP (80) and HTTPS (443):
sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https sudo firewall-cmd --reload
-
-
Access Netdata Dashboard
By default, Netdata serves on port 19999. To access:
http://your-server-ip:19999
-
Configure Firewall (If Running Firewalld)
If
firewalld
is active, allow port 19999:sudo firewall-cmd --permanent --add-port=19999/tcp sudo firewall-cmd --reload
-
Configuring Netdata
Edit Main Configuration
sudo nano /etc/netdata/netdata.conf
Change the
bind to
directive if you want to expose Netdata to external IPs:[web] bind to = 0.0.0.0
After changes, restart Netdata:
sudo systemctl restart netdata
-
Enable Basic Authentication (Nginx Proxy)
If exposing Netdata publicly, it’s strongly recommended to set up authentication behind a reverse proxy like Nginx or Apache.
📦 Uninstall Netdata
sudo /usr/libexec/netdata/netdata-uninstaller.sh --yes
📈 What You Can Monitor with Netdata
- CPU, memory, disk I/O
- Network traffic and errors
- Running processes and resource usage
- MySQL, Nginx, Apache, Docker, and more via plugins
🧠 Troubleshooting
- Logs are located at
/var/log/netdata/
- Configs:
/etc/netdata/
- Web files:
/usr/share/netdata/web/
Now that you know how to install and run Netdata on AlmaLinux VPS, let’s learn how to integrate Netdata with Prometheus and Grafana on your AlmaLinux VPS:
🔗 Overview of the Integration
- Netdata → collects real-time metrics
- Prometheus → scrapes metrics from Netdata for storage and querying
- Grafana → visualizes those metrics using queries from Prometheus
SEE ALSO: Top 10 Best Grafana Dashboards for Service Monitoring
-
Enable Netdata’s Prometheus Exporter
- Open Netdata’s
stream.conf
andhealth.d/prometheus.conf
:sudo nano /etc/netdata/netdata.conf
- Find or add the following in the
[web]
section:[web] enable_prometheus = yes prometheus_port = 19999
Prometheus can scrape metrics from:
http://<your-server-ip>:19999/api/v1/allmetrics?format=prometheus
- Restart Netdata:
sudo systemctl restart netdata
- Open Netdata’s
-
Install Prometheus on AlmaLinux
-
Create Prometheus User & Directories
sudo useradd --no-create-home --shell /bin/false prometheus sudo mkdir /etc/prometheus /var/lib/prometheus
-
Download and Install Prometheus
curl -LO https://github.com/prometheus/prometheus/releases/download/v2.52.0/prometheus-2.52.0.linux-amd64.tar.gz tar xvf prometheus-2.52.0.linux-amd64.tar.gz cd prometheus-2.52.0.linux-amd64 sudo cp prometheus promtool /usr/local/bin/ sudo cp -r consoles console_libraries /etc/prometheus/
-
Configure Prometheus
Create or edit
/etc/prometheus/prometheus.yml
:global: scrape_interval: 15s scrape_configs: - job_name: 'netdata' static_configs: - targets: ['localhost:19999']
-
Create Systemd Service File
sudo nano /etc/systemd/system/prometheus.service
Paste:
[Unit] Description=Prometheus Wants=network-online.target After=network-online.target [Service] User=prometheus ExecStart=/usr/local/bin/prometheus \ --config.file=/etc/prometheus/prometheus.yml \ --storage.tsdb.path=/var/lib/prometheus/ \ --web.console.templates=/etc/prometheus/consoles \ --web.console.libraries=/etc/prometheus/console_libraries [Install] WantedBy=default.target
-
Start Prometheus
sudo systemctl daemon-reexec sudo systemctl daemon-reload sudo systemctl enable --now prometheus
Test it:
http://<your-server-ip>:9090
-
-
Install Grafana on AlmaLinux
-
Add Grafana Repo
sudo tee /etc/yum.repos.d/grafana.repo<
-
Install Grafana
sudo dnf install grafana -y sudo systemctl enable --now grafana-server
Access Grafana at:
http://<your-server-ip>:3000
Default login:
Username:admin
Password:admin
-
-
Connect Grafana to Prometheus
- Log into Grafana
- Go to Settings > Data Sources > Add data source
- Choose Prometheus
- Set URL:
http://localhost:9090
- Click Save & Test
-
Import Netdata Dashboard
- Go to Dashboards > Import
- Use dashboard ID:
1860
(Community Netdata Dashboard) - Select Prometheus as data source
✅ Done!
You’ve now:
- Installed and configured Netdata
- Set up Prometheus to scrape Netdata
- Connected Grafana to Prometheus
- Imported Netdata dashboards
Conclusion
You now know how to install and run Netdata on AlmaLinux VPS. You also know how to integrate Netdata with Prometheus and Grafana.