🚀 how to install and configure node exporter on debian vpsThis article will provide a guide for how to install and configure Node Exporter on Debian VPS.

What is Node Exporter?

Node Exporter is a Prometheus exporter that collects and exposes hardware and OS-level metrics from Linux and Unix-like systems. It runs as a background service and makes these metrics available over HTTP, typically at http://localhost:9100/metrics, where Prometheus scrapes them for monitoring and alerting.

🔍 What It Monitors

Node Exporter gathers system-level metrics such as:

  • CPU usage
  • Memory usage
  • Disk I/O and space
  • Network statistics
  • Filesystem metrics
  • System load and uptime
  • Hardware sensor data (if available)
  • Systemd service states

✅ Key Features

  • Lightweight & efficient: Minimal overhead, ideal for all server types.
  • Easy integration: Works seamlessly with Prometheus and Grafana.
  • Modular collectors: Can enable or disable specific metric collectors.
  • Secure options: Supports TLS and basic auth (via reverse proxy or exporter wrappers).

🔧 Common Use Case

✅ Prerequisites

Launch 100% ssd debian vps from $2. 49/mo!

🛠️ How to Install and Configure Node Exporter on Debian VPS

To install and configure Node Exporter on Debian VPS, follow the steps below:

  1. 🧩 Create a Dedicated User

    It’s best practice to run Node Exporter as a non-privileged system user.

    sudo useradd --no-create-home --shell /usr/sbin/nologin node_exporter
  2. 📥 Download Node Exporter

    1. Find the latest version from the official releases page:
      https://github.com/prometheus/node_exporter/releases
    2. Download and extract:
      cd /tmp wget https://github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.9.1.linux-amd64.tar.gz tar -xzf node_exporter-1.9.1.linux-amd64.tar.gz

      Replace 1.9.1 with the latest version if needed.

    3. Move the binary to a system path:
      sudo mv node_exporter-1.8.1.linux-amd64/node_exporter /usr/local/bin/ sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter
  3. ⚙️ Create a Systemd Service

    Create a systemd service file to manage Node Exporter as a system service.

    sudo nano /etc/systemd/system/node_exporter.service

    Paste the following:

    [Unit] Description=Prometheus Node Exporter Wants=network-online.target After=network-online.target [Service] User=node_exporter Group=node_exporter Type=simple ExecStart=/usr/local/bin/node_exporter [Install] WantedBy=multi-user.target

    Save and exit.

  4. 🔄 Start and Enable the Service

    sudo systemctl daemon-reexec sudo systemctl daemon-reload sudo systemctl start node_exporter sudo systemctl enable node_exporter

    Check status:

    sudo systemctl status node_exporter
  5. 🔓 Allow Port in Firewall

    By default, Node Exporter exposes metrics on port 9100.

    If ufw is enabled:

    sudo ufw allow 9100/tcp
  6. 🔍 Test Node Exporter

    Open your browser or use curl to check if it’s running:

    http://:9100/metrics

    You should see a long list of metrics in plain text.

  7. 🧲 Configure Prometheus to Scrape Node Exporter

    If you’re using Prometheus, add the target in prometheus.yml:

     - job_name: 'node_exporter' static_configs: - targets: [':9100']

    Reload Prometheus or restart the service:

    sudo systemctl restart prometheus

✅ Bonus: Secure Node Exporter with NGINX + Lets Encrypt

To secure Node Exporter with TLS (HTTPS), you’ll need to wrap it behind a reverse proxy like NGINX (since Node Exporter doesn’t support TLS natively). We’ll use Certbot to get a Let’s Encrypt SSL certificate.

✅ Prerequisites

To secure Node Exporter with TLS using NGINX + Let’s Encrypt, follow the steps below:

  1. 🧱 Install NGINX

    sudo apt update sudo apt install nginx -y

    Enable and start:

    sudo systemctl enable nginx sudo systemctl start nginx
  2. 🧩 Configure Reverse Proxy for Node Exporter

    Create a new NGINX config:

    sudo nano /etc/nginx/sites-available/node_exporter

    Paste this config (replace domain name):

    server { listen 80; server_name metrics.example.com; location / { proxy_pass http://localhost:9100/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } }

    Enable the site:

    sudo ln -s /etc/nginx/sites-available/node_exporter /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx
  3. 🔐 Install Certbot and Get SSL Certificate

    Install Certbot:

    sudo apt install certbot python3-certbot-nginx -y

    Request SSL:

    sudo certbot --nginx -d metrics.example.com

    When prompted, choose to redirect HTTP to HTTPS.

  4. 🔄 Auto-Renew SSL Certificate

    Let’s Encrypt certs are valid for 90 days. Add a cron job to auto-renew:

    sudo systemctl list-timers | grep certbot

    Certbot installs a timer automatically. To test:

    sudo certbot renew --dry-run
  5. ✅ Test Access Over HTTPS

    Visit:

    https://metrics.example.com

    You should see Node Exporter’s /metrics output over a secure HTTPS connection.

🧪 Verify Metrics in Prometheus

  1. Visit Prometheus web UI:
    http://prometheus.example.com:9090
  2. Run a query like:
node_cpu_seconds_total

You should see live metrics.

Launch 100% ssd debian vps from $2. 49/mo!

Conclusion

You now know how to install and configure Node Exporter on Debian VPS.

Related:

Avatar of editorial staff

Editorial Staff

Rad Web Hosting is a leading provider of web hosting, Cloud VPS, and Dedicated Servers in Dallas, TX.

One thought on “🚀 How to Install and Configure Node Exporter on Debian VPS

  1. […] Exporter: Install and configure Node Exporter for detailed system-level […]

Comments are closed.

lg