This is a simple example of how to deploy ntfy to Fly.io.
Create a Fly.io account and install cli:
- Install the Fly CLI.
- Sign up with
fly auth signupor login withfly auth login.
- Clone this repo
git clone https://github.com/joshuabrink1/ntfy-fly.git; cd ntfy-fly - Run
fly launchto generate the fly.toml (do not deploy). - In fly.toml, set the internal_port to
80. - In server.yml, set the base_url to your app name.
If your app name is
examplethen the base_url should behttps://example.fly.dev - Deploy with:
fly deploy --build-secret ADMIN_USER=username --build-secret ADMIN_PASS=password Send message to the topic notify using admin auth username:password:
ntfy send -u username:password https://example.fly.dev/notify "example message"Subscribe to the topic notify using auth user:password:
ntfy subscribe -u user:password https://example.fly.dev/subscribe/notifySet the NTFY_USER environment variable:
export NTFY_USER=username:password
ntfy send https://example.fly.dev/notify "example message"