An app that restarts in a loop is one of the most common first-week problems. This tutorial sends a crashloop alert to an ntfy topic, so the message reaches your phone. The same channel works for any alert kind in the CLI reference.
Before you start
- A running Levelrail instance and the CLI logged in to it (installing).
- An app you want to watch. This tutorial uses
web.
- An ntfy topic. You can use a public server or your own. If the topic needs a token, keep the token ready.
Step 1: Build the ntfy URL
The URL is the ntfy server, the topic name, and the token in an auth query parameter:
Levelrail reads the token from the auth parameter and removes it from the URL before it calls the server. It sends the token in an Authorization header. The token is stored encrypted and is not shown again. If the topic is public, leave out ?auth=TOKEN.
Step 2: Create the channel and send a test message
Replace <id> with the id that channels create printed. The test sends a real message, so check your phone now, not after the first outage.
deliveries lists the sends for this channel, newest first. A failed send shows its error here.
Step 3: Create the crashloop alert
The alert fires when the app restarts at least 3 times within 10 minutes. The window format accepts a duration such as 10m. Confirm that your version accepts it with apps alerts create --help (pending run on a real host).
Step 4: Check that the alert reaches the channel (pending run)
Make the app fail on purpose in a test environment, for example by deploying an image whose command exits at once. Then:
- Wait for the restart threshold to pass.
- Check your phone for the alert.
- Check
levelrail-cli channels deliveries <id> for the send.
Which channels receive a crashloop alert, and whether the channel must be attached to the alert explicitly, has not been confirmed on a real host. Treat this step as pending run.
Quiet hours
If the channel should stay silent overnight, set quiet hours on it.
Use quiet hours only for a channel that is not the only way you learn about a failure. A dead server does not raise a crashloop alert at all, so pair this tutorial with Get a ping when your server stops.
Where to go next
Last modified on November 2, 2026