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):./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 theamtool helper to a system-wide binary path, make them executable, and set ownership:
- Installing to
/usr/local/binkeeps 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:
--config.filepoints to the centralized config at/etc/alertmanager/alertmanager.yml.--storage.pathtells 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:- Syntax errors in
alertmanager.ymlwill 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
alertmanagersystem user. - Placed configuration in
/etc/alertmanager/alertmanager.yml. - Configured runtime storage at
/var/lib/alertmanager. - Installed Alertmanager and
amtoolto/usr/local/bin. - Created and enabled a systemd unit at
/etc/systemd/system/alertmanager.service.