๐Ÿš€ 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.

4 thoughts on “๐Ÿš€ How to Install and Configure Node Exporter on Debian VPS

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

  2. […] See: ๐Ÿš€ How to Install and Configure Node Exporter on Debian VPS […]

  3. […] This dashboard provides an in-depth view of your Linux server metrics using the Prometheus Node Exporter. It includes panels for CPU usage, memory usage, network IO, disk IO, file system stats, and […]

Comments are closed.

lg