Skip to main content
This guide shows how to install Prometheus Alertmanager and run it as a systemd service so you can manage it with standard commands like systemctl start alertmanager, systemctl enable alertmanager, and systemctl status alertmanager. The steps assume you have downloaded and extracted an Alertmanager release tarball. Follow the steps in order. Note: Replace the version in the examples below if you want to install a different Alertmanager release.
We run Alertmanager under a dedicated, non-login system user and place configuration in /etc/alertmanager while keeping runtime data in /var/lib/alertmanager. This separation improves security and makes upgrades easier.

1) Download and extract Alertmanager

Example using v0.24.0 (replace the version string to install another release):
Tip: After extraction, you can run ./alertmanager --version to confirm the binary version before installing it.

2) Create a dedicated system user and directories

Create a non-login system user for Alertmanager, move your configuration into /etc/alertmanager, and create a storage directory for runtime data:
Ensure the alertmanager.yml and /etc/alertmanager permissions are not world-writable. Sensitive notification credentials (e.g., Slack or PagerDuty keys) in the config must be protected.

3) Install the binaries

Copy the Alertmanager executable and the amtool helper to a system-wide binary path, make them executable, and set ownership:
Notes:
  • Installing to /usr/local/bin keeps these binaries in the default PATH for administrative users.
  • You can verify installation with: which alertmanager && alertmanager --version.

4) Create the systemd unit

Create the systemd service unit at /etc/systemd/system/alertmanager.service with this content:
After saving the unit file, reload systemd so it recognizes the new service:
Why these flags:
  • --config.file points to the centralized config at /etc/alertmanager/alertmanager.yml.
  • --storage.path tells Alertmanager where to persist silences and other runtime data.

5) Start and enable the service

Start Alertmanager now and enable it to start automatically at boot:
Check status and follow logs:
If the service fails to start, view recent logs for the current boot with:
Common issues:
  • Syntax errors in alertmanager.yml will prevent startup — check the logs for parse errors.
  • Permission errors indicate the service user cannot read the config or write to the storage path.

Quick reference: created resources

Troubleshooting checklist

  • Confirm the binary is executable and accessible: ls -l /usr/local/bin/alertmanager.
  • Validate config syntax (look for YAML indentation errors).
  • Check journal logs for startup errors: sudo journalctl -u alertmanager -b.
  • Verify user permissions: sudo -u alertmanager /usr/local/bin/alertmanager --config.file=/etc/alertmanager/alertmanager.yml --storage.path=/var/lib/alertmanager (runs the binary as the alertmanager user for testing).

Summary

By following these steps you have:
  • Created a dedicated, non-login alertmanager system user.
  • Placed configuration in /etc/alertmanager/alertmanager.yml.
  • Configured runtime storage at /var/lib/alertmanager.
  • Installed Alertmanager and amtool to /usr/local/bin.
  • Created and enabled a systemd unit at /etc/systemd/system/alertmanager.service.
Alertmanager is now managed by systemd and will start automatically on boot.

Watch Video

Practice Lab