Open Source
All templates and components

App template

ntfy

A push notification server where topics need an account and messages stay on a volume.

Memory when idle
about 20 MiB
CI measures it once the app is ready and before any traffic. Leave room for more.
Tested on
x86 servers

Introduction

ntfy sends push notifications to your phone or desktop from scripts and apps, through plain HTTP requests. You publish a message to a topic, and every client that subscribes to the topic gets it.

This template runs one ntfy server behind your domain. Every topic needs an account, and messages and users are kept on a 5 GiB volume. A user named admin is created at every start.

Values you provide

You don’t fill in anything when you deploy.

Made for you

These values are generated at deploy and kept in a Kubernetes Secret, shown as Secret/key.

  • ntfy-secrets/admin-password

Getting started

  1. In Zeabur OSS, open the ntfy service. When Overview shows its replica as ready, the service is up. Its domain is on the Networking tab under Public domains. It is the domain you entered in the install form, for example ntfy.example.com.

  2. Sign in as admin. Get the password from the ntfy service: open Variables, click ntfy-secrets under From config files and secrets, and click the eye icon next to admin-password. Without Zeabur OSS, read Secret ntfy-secrets, key admin-password, with kubectl:

    kubectl -n <namespace> get secret ntfy-secrets -o jsonpath='{.data.admin-password}' | base64 -d
    
  3. Every topic denies access by default, so an app that publishes or subscribes must sign in with this account or with an access token. See Configuration.

Configuration

Change the admin password

ntfy applies the Secret at every start. To change the password, open Variables on the ntfy service, click ntfy-secrets under From config files and secrets, and enter a new value for admin-password. Review and apply, then click Restart at the top of the service page.

Add a user

Click Terminal at the top of the ntfy service page. Run ntfy user add, then give the user access to a topic with ntfy access. rw means the user can publish and subscribe:

ntfy user add <username>
ntfy access <username> <topic> rw

See Access control in the ntfy docs.

Create an access token

An access token lets an app publish or subscribe without your password. Create one in the web app, in the Account section after you sign in. You can also click Terminal at the top of the ntfy service page and run:

ntfy token add --label=<label> admin

Send the token as a Bearer token:

curl -H "Authorization: Bearer tk_..." -d "Hello" https://ntfy.example.com/mytopic

See Publishing in the ntfy docs.

Troubleshooting

The page shows 502 or does not load

Open the ntfy service in Zeabur OSS. Check that Overview shows its replica as ready, then read the Logs tab. If the replica is not ready, open Deployments and switch to Events. If Events show OOMKilled, the service ran out of memory. Raise Maximum memory under Settings → Compute. If the domain or the certificate stays pending, see Troubleshooting on the domains page.

See Adjust replicas, resources, and health checks and View logs, events, and usage, and open a terminal in the Zeabur OSS docs.

A client cannot publish or subscribe

The template denies access to every topic by default. Make the client sign in with a user name and password or an access token. For a user other than admin, also run ntfy access to give it access to the topic. See Access control in the ntfy docs.

Resources

Each service is guaranteed the first amount and can use up to the second.

  • ntfy

    Ports

    8080

    CPU

    0.05 cores to 1 core

    Memory

    64 MiB to 512 MiB

Technical details

This release

Version
v2.38.1
Licence
Apache-2.0 OR GPL-2.0-only
Homepage
ntfy.sh

Tested in CI

CI installs these exact files on a new cluster, waits until they are ready, then records the idle memory.

DistributionPlatformKubernetesPassedIdle memory
kindlinux/amd64v1.37.015 MiB

Security

The container runs as UID 1000 with a read-only filesystem, no Kubernetes token and all extra system privileges removed. Outbound traffic is not limited. Anonymous users cannot read or write topics.

Known risks

  1. Risk

    By default, ntfy lets anyone publish to and read any topic.

    How it is handled

    This template sets auth-default-access to deny-all. The admin user can read and write all topics. To create users, access rules and tokens, run ntfy user, ntfy access and ntfy token in the Pod.

  2. Risk

    Instant delivery to the iOS app, Firebase, web push, email and calls are off.

    How it is handled

    Android and web clients receive messages over their own connection. To use upstream-base-url or another sender, set it in the ntfy configuration.

  3. Risk

    Attachments use disk space on the volume.

    How it is handled

    The attachment cache is limited to 2G in total and 15M per file. The message cache keeps 12 hours of messages.

What the cluster needs

Zeabur OSS suggests the components a cluster is missing. Without it, install them first.