# Self-host ntfy

> A simple pub-sub push notification service you can send alerts to from any script or app.

- Page: https://levelrail.com/templates/ntfy/
- JSON: https://levelrail.com/templates/ntfy.json
- Category: Communication
- Licence: Apache-2.0 (Permissive license)
- Source: https://github.com/binwiederhier/ntfy
- Upstream docs: https://docs.ntfy.sh

## Requirements
- Memory: about 128 MiB
- amd64: published, arm64: tested
- Needs configuration before start: no
- Pinned image tag: v2.11.0

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| ntfy | binwiederhier/ntfy | v2.11.0 | 80 | ntfy_cache -> /var/cache/ntfy; ntfy_data -> /etc/ntfy |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| ntfy | NTFY_BEHIND_PROXY | preset |
| ntfy | NTFY_LISTEN_HTTP | preset |

## Deploy

### CLI

```bash
levelrail-cli templates deploy ntfy --name my-ntfy
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/ntfy/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy ntfy on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id ntfy for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image binwiederhier/ntfy:v2.11.0 is what you deploy there.

Self-host ntfy, ntfy docker compose file, deploy ntfy on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
