Last active
January 22, 2026 21:15
-
-
Save stympy/841d734f8c44a9c4772975b55fa513bf to your computer and use it in GitHub Desktop.
systemd config for Honeybadger CLI agent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| chmod -R go-rw /etc/honeybadger | |
| useradd --system --home /var/lib/honeybadger --shell /usr/sbin/nologin honeybadger | |
| mkdir -p /var/lib/honeybadger /var/log/honeybadger | |
| chown -R honeybadger:honeybadger /var/lib/honeybadger /var/log/honeybadger | |
| systemctl daemon-reexec | |
| systemctl daemon-reload | |
| systemctl enable honeybadger | |
| systemctl start honeybadger |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| HONEYBADGER_API_KEY=hbp_... | |
| HONEYBADGER_ENV=production |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /etc/systemd/system/honeybadger.service | |
| [Unit] | |
| Description=Honeybadger CLI Agent | |
| After=network-online.target | |
| Wants=network-online.target | |
| [Service] | |
| Type=simple | |
| User=honeybadger | |
| Group=honeybadger | |
| ExecStart=/opt/honeybadger/hb agent | |
| Restart=on-failure | |
| RestartSec=5 | |
| EnvironmentFile=/etc/honeybadger/honeybadger.env | |
| # Hardening (safe defaults) | |
| NoNewPrivileges=true | |
| PrivateTmp=true | |
| ProtectSystem=strict | |
| ProtectHome=true | |
| ReadWritePaths=/var/lib/honeybadger /var/log/honeybadger | |
| # Logging | |
| StandardOutput=journal | |
| StandardError=journal | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment