How to Install ntfy (Push Notifications via HTTP) on AlmaLinux 9
Introduction
ntfy is an open-source notification service that lets you send push notifications to browsers, mobile devices, and scripts via simple HTTP requests.
This guide walks you through installing ntfy on AlmaLinux 9 using Docker Compose, with Nginx configured as a reverse proxy.
The setup ensures ntfy runs securely on localhost and is safely exposed to the internet via Nginx.
Step 1: Prerequisites
Before starting, make sure you have:
-
A VPS running AlmaLinux 9
-
Root access to the server
-
A domain name pointing to your server IP (for example:
ntfy.example.com)
Step 2: Connect to Your AlmaLinux 9 Server
Linux / macOS
ssh root@YOUR_SERVER_IP
Windows
Use PowerShell, Windows Terminal, or PuTTY:
After logging in, you should be authenticated as root.
Step 3: Install ntfy Using Docker Compose
3.1 Update the System
Updates all installed packages to their latest versions.
3.2 Install Required Dependencies
Installs tools required for managing repositories and secure downloads.
3.3 Add Docker Repository
Adds the official Docker repository compatible with AlmaLinux 9 and refreshes package metadata.
3.4 Install Docker and Docker Compose
Enable and start Docker:
Verify the installation:
3.5 Create ntfy Project Directory
3.6 Create Docker Compose Configuration
Paste the following content:
services: ntfy: image: binwiederhier/ntfy:latest container_name: ntfy restart: unless-stopped ports: - "127.0.0.1:2586:80" volumes: - /opt/ntfy/cache:/var/cache/ntfy - /opt/ntfy/config:/etc/ntfy command: serve
This configuration ensures ntfy:
-
Runs inside a Docker container
-
Is accessible only locally
-
Is safely exposed through Nginx
3.7 Create Cache and Configuration Directories
3.8 Configure the ntfy Server
Paste:
This configuration:
-
Enables reverse proxy support
-
Denies anonymous access by default
-
Allows controlled attachment uploads
3.9 Start ntfy
Step 4: Configure Nginx Reverse Proxy
4.1 Install and Enable Nginx
4.2 Create Nginx Configuration for ntfy
Paste:
4.3 Test and Reload Nginx
Final Step: Service Availability
At this point, ntfy is fully deployed and running on AlmaLinux 9 using Docker Compose, with Nginx acting as a reverse proxy.
The service is accessible directly via the server IP address.
Access URL
This deployment ensures that:
-
ntfy runs securely inside a Docker container
-
The service is bound to localhost only
-
Nginx proxies incoming traffic to ntfy
-
Authentication and attachment limits are enforced
No additional configuration is required to start using ntfy.
Conclusion
You have successfully installed ntfy on AlmaLinux 9 using Docker Compose and configured Nginx as a reverse proxy.
This setup provides:
-
A secure containerized ntfy deployment
-
Local-only service exposure
-
Reverse proxy support with upload handling and authentication
You can now proceed to:
-
Enable HTTPS with Let’s Encrypt
-
Create ntfy users and access tokens
-
Integrate ntfy with scripts, monitoring, or CI/CD pipelines
If you need the HTTPS setup, user/token configuration, or firewall/SELinux tuning, feel free to ask.