Ntfy

Install Ntfy using Docker on Ubuntu 24.04

Ntfy is a self-hosted push notification service that lets you send messages to phones, browsers, or command-line clients with ease. It supports simple HTTP requests, MQTT, and CLI commands, making it perfect for system alerts, application events, and IoT integrations. Running Ntfy in a Docker container provides a fast, consistent deployment on any modern Linux server. With Ubuntu 24.04 LTS (Noble Numbat), you gain a stable, secure, and long-supported foundation—ideal for personal setups or production-grade environments.

 

Architecture Overview

Layer Component Purpose
OS Ubuntu 24.04 LTS Modern, secure base with long-term updates
Runtime Docker Engine Runs the Ntfy container for consistent deployment
Application Ntfy Push notification server with web UI and REST API
Storage Host Volumes Persistent cache and configuration
Network Port 80 Exposes Ntfy web UI and API

 

Why Use Ntfy?

  • Instant Notifications – Send messages to clients in real time with just a single HTTP POST.

  • Self-Hosted Privacy – Keep your topics and messages under your full control.

  • Simple API – Publish and subscribe using cURL, CLI, or MQTT.

  • Lightweight & Efficient – Runs in a single Docker container with minimal resource usage.

  • Cross-Platform Clients – Works with Android, iOS, desktop, and browser-based apps.

 

Step-by-Step Installation

1. Connect to Your Server

Log in to your Ubuntu 24.04 server via SSH:

 
ssh root@your-server-ip

2. Update and Install Prerequisites

Update system packages:

 
apt update && apt upgrade -y

Install required dependencies:

 
apt install -y apt-transport-https ca-certificates curl gnupg lsb-release python3-pip

3. Install Docker

Install Docker from Ubuntu’s repositories:

 
apt install -y docker.io systemctl enable --now docker

Verify the installation:

 
docker --version

4. Prepare Persistent Directories

Create directories for cache and configuration to ensure data survives container restarts:

 
mkdir -p /var/cache/ntfy mkdir -p /etc/ntfy chmod 755 /var/cache/ntfy /etc/ntfy

5. Pull and Run the Ntfy Container

Download the official Ntfy image:

 
docker pull binwiederhier/ntfy

Run the container:

 
docker run -d \ --name ntfy \ -p 80:80 \ -v /var/cache/ntfy:/var/cache/ntfy \ -v /etc/ntfy:/etc/ntfy \ -e TZ=UTC \ --restart unless-stopped \ binwiederhier/ntfy serve

Explanation of key parameters

  • -p 80:80 exposes the Ntfy web interface and API on port 80.

  • -v /var/cache/ntfy stores the persistent message cache.

  • -v /etc/ntfy stores configuration files.

  • --restart unless-stopped ensures Ntfy restarts automatically after a reboot.

6. Access the Web Interface

Open a browser and visit:

 
http://<your-server-ip>

The Ntfy dashboard will appear, ready for you to create topics and send messages.

 

  • 0 Users Found This Useful
這篇文章有幫助嗎?

相關文章

ERPNext v15

Last Updated: 31 August 2025Applies to: Ubuntu 24.04 LTS (fresh server recommended)Skill Level:...

Open-EMR v7.0.3

Last Updated: 31 August 2025Applies to: Ubuntu 24.04 LTS (fresh server recommended)Skill Level:...

ERPNext v14

Last Updated: 31 August 2025Applies to: Ubuntu 24.04 LTS (fresh server recommended)Skill Level:...

WordPress

1. Overview WordPress is the most popular open-source blogging system and CMS on the Web. It...

Joomla

How to Install Joomla on Ubuntu 24.04   Joomla is a free and open-source content management...