Apprise-API
If you’ve ever wanted a single unified way to send notifications across multiple services — from basic email to push notifications on your phone — then you’ll love Apprise-API. This Docker image creates a RESTful API for Apprise, a powerful library that supports over 60+ services including Discord, Telegram, Slack, Pushbullet, and even obscure ones like Gotify or Rocket.chat!
Why Use Apprise-API?
Apprise by itself is a command-line tool or Python library. But with Apprise-API, you get an always-running container that can accept HTTP POST requests for multi-platform notifications. This is a perfect addition for home automation setups, personal dashboards, status alerting from uptime monitors, and so much more. Wrap it with some basic authentication and you’ve got a versatile notifications microservice!
Setting Up Apprise-API with Docker Compose
LinuxServer.io maintains a fantastic image that’s lightweight and works out-of-the-box. Here’s a simple example docker-compose.yml
to get you going:
version: '3.8'
services:
apprise-api:
image: lscr.io/linuxserver/apprise-api:latest
container_name: apprise-api
environment:
- PUID=1000 # Change to match your user id
- PGID=1000 # Change to match your group id
- TZ=Europe/London # Change to your time zone
ports:
- 8000:8000
restart: unless-stopped
Save this as docker-compose.yml
, navigate to the folder and run:
docker-compose up -d
Your Apprise-API service is now running on port 8000!
Using Apprise-API
Once up, sending a notification is as simple as using a tool like curl
or Postman to send a POST request to:
http://:8000/notify
With a basic JSON payload like this:
{
"urls": "discord://your_webhook_url",
"title": "Test Notification",
"body": "This is a test message sent using Apprise-API."
}
You can add multiple services in the urls
field separated by spaces. It’s incredibly easy to integrate into bash scripts, Home Assistant automations, or monitoring tools like Uptime Kuma.
Security Considerations
Since the API is unauthenticated by default, be cautious about exposing it directly to the Internet. Consider adding a reverse proxy like NGINX with basic auth or using firewalls and VPN tunnels to protect access.
For more setup options and environment variables, the detailed documentation can be found at LinuxServer.io Apprise-API Docs.
Conclusion
Apprise-API takes the headache out of notifications. It’s simple to configure, highly compatible, and a great tool for any self-hoster who likes staying on top of what’s going on in their homelab. Whether it’s alerting you to a system error or letting you know when a backup finishes, Apprise-API has you covered.
Happy selfhosting, and I will see you in the next post!
Leave a Reply