Skip to main content
As with Prometheus, starting node_exporter directly runs it in the foreground and does not enable it to start automatically on boot. To have systemd manage node_exporter (so you can use commands like systemctl start node_exporter and have it start on boot), follow the steps below. Overview of the steps
  • Download and extract the node_exporter binary (if you haven’t already).
  • Move the binary to /usr/local/bin.
  • Create a dedicated (non-login) user for node_exporter.
  • Ensure the node_exporter binary is owned by that user.
  • Add a systemd service unit for node_exporter.
  • Reload systemd, start, enable, and verify the service.
  • Verify metrics are exposed at /metrics.
Commands and service unit
  1. Change into the node_exporter directory (after downloading and extracting):
  1. Copy the node_exporter binary to /usr/local/bin:
  1. Create a dedicated user for running node_exporter:
  1. Make the node_exporter binary owned by the node_exporter user:
It’s good practice to run exporters as a non-privileged, system user (no shell and no home). This reduces the blast radius if the exporter is compromised.
  1. Create the systemd service unit at /etc/systemd/system/node_exporter.service. The unit tells systemd to wait for the network to be online before starting the service and ensures it becomes part of the normal multi-user startup:
  1. Reload systemd to pick up the new unit, start the service, and enable it at boot:
  1. Verify the service is running:
You should see an active (running) state in the status output.
  1. Confirm node_exporter is exposing metrics (default port 9100) by curling the metrics endpoint:
You should see plain-text Prometheus metrics returned. Prometheus can now be configured to scrape this target (add localhost:9100 or the appropriate host:port to your Prometheus scrape targets). That’s all — node_exporter is now managed by systemd, runs as a dedicated user, and will start automatically on boot.

Watch Video