> ## Documentation Index
> Fetch the complete documentation index at: https://midway.hazyio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ntfy notifications

> Connect Midway to ntfy with a server URL and topic

## Set up ntfy

1. Install [ntfy from Google Play](https://play.google.com/store/apps/details?id=io.heckel.ntfy).
2. In the app, add a topic and choose a topic name.
3. Subscribe to that topic.
4. Open the three-dot menu in the top-right corner and select **Subscription settings**.
5. Scroll to **About** and copy the server URL.

<Warning>
  On public ntfy servers such as `ntfy.sh`, topics and their notifications are
  public to anyone who knows or guesses the topic name. Use the [Hazyio password
  generator](https://gen.hazyio.com/password-generator/) to create a long,
  hard-to-guess topic name and keep it private. Make sure it is no more than 64
  characters and contains only letters, numbers, underscores, or dashes.

  Do not include sensitive information in notification messages. For actual
  access restrictions, use an authenticated, access-controlled ntfy server or
  self-host ntfy with authentication configured.
</Warning>

## Add ntfy to Midway

Run the Midway setup command. Paste the server URL copied from **About**, then enter the topic name you created:

```bash theme={null}
midway init
```

By default, Midway sends notifications to all configured methods. To restrict delivery, define `notification.send_to` and include `Ntfy`; configured methods left out of the list will not receive notifications. With `pick_from: All`, Midway sends through every method listed there:

```yaml theme={null}
notification:
	send_to:
		- Ntfy
	pick_from: All
```

`pick_from` can further select a subset of the methods in `send_to` for each notification.

You can also add the values directly to `midway.yaml` under `tokens.ntfy`:

```yaml theme={null}
tokens:
	ntfy:
		server_url: "https://ntfy.sh"
		topic: "YOUR_PRIVATE_TOPIC"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.