How to send Proxmox notifications to ntfy with authentication
I recently configured notifications from my Proxmox cluster to my ntfy self-hosted instance. If you're using ntfy authentication, the process is not immediately obvious, so I'm documenting it here for the future.
Generate the authentication token
This is the critical step.
First, generate the Base64 encoded token for your ntfy authentication. Open a terminal and run:
echo -n 'username:password' | base64
Replace username and password with your ntfy credentials. Save the output.
Add the webhook endpoint
In the Proxmox web interface:
- Go to Datacenter → Notifications → Notification Targets
- Click Add
- Select Webhook
- Fill in the following:
Endpoint Name: ntfy
Enable: ✓
Method/URL: https://<ntfy-server-url>/{{ secrets.topic }}
Headers:
Markdown: Yes
Authorization: Basic {{ secrets.token }}
Body:
{{ message }}
Secrets:
token: Your Base64 encoded token from earlier
topic: <your-topic-name-to-get-notifications>
- Click OK
Update the default matcher
- Go to Datacenter → Notifications → Notification Matchers
- Click on default-matcher
- In the Targets to notify section, enable your ntfy target
- Disable the mail-to-root if you don't want to get emails as well
- Click OK
Test it
Go to your Notification Targets again, select your ntfy target, and click on Test. You should receive a notification on the topic you configured before.
That's it. No more annoy emails and you'll get notified by ntfy when something happens with your Proxmox server.
If you want to receive both emails and notifications just leave the mail-to-root tick enabled on the default-matcher section in Proxmox.