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.
- Change into the node_exporter directory (after downloading and extracting):
- Copy the node_exporter binary to
/usr/local/bin:
- Create a dedicated user for running node_exporter:
- 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.
- 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:
- Reload systemd to pick up the new unit, start the service, and enable it at boot:
- Verify the service is running:
- Confirm node_exporter is exposing metrics (default port 9100) by curling the metrics endpoint:
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.