Documentation
Notifications / Send alerts as browser notifications

Send alerts as browser notifications

Receive Uptime Kotlin alerts as native Web Push notifications in your browsers, even when the tab is closed. No account or third-party app needed.

The Browser notifications type sends alerts as native notifications, using the Web Push standard. They show up on your computer or phone even when the Uptime Kotlin tab is closed, and clicking one opens the page of the monitor.

There is nothing to install and no third-party account: Uptime Kotlin generates its own keys on the first start and talks directly to the push service of each browser (Google for Chrome and Edge, Mozilla for Firefox, Apple for Safari).

Before you start

  • The interface must be served over HTTPS (or on localhost). On plain HTTP, the form shows a warning instead of the button.
  • The browser must support push notifications: recent Chrome, Edge, Firefox, Opera and Safari do. On iPhone and iPad, Safari only allows them for a site added to the Home Screen.

Add your browsers

  1. Open the interface in the browser that should receive the alerts.
  2. Choose Create notification and pick Browser notifications.
  3. Choose Add this browser and allow notifications when the browser asks.
  4. The browser appears in the list with a name such as Firefox · macOS, and the badge This browser. Rename it if you like, for example On-call laptop.

A channel can hold several browsers. To add another computer or a phone, open the channel from that device and choose Add this browser again. The cross next to a browser removes it from the channel.

Choose Test notification: a message titled Test notification is sent to the browsers of the list.

What you receive

Event Title of the notification
Failure API is DOWN
Reminder API is still DOWN (reminder #2)
Recovery API is UP, with how long it was down.

The body gives the error and the date of the check, in the zone of NOTIFICATIONS_DISPLAY_TIMEZONE. Failure and reminder notifications are sent with a high urgency and stay on screen until you dismiss them. Notifications of the same monitor replace each other instead of piling up.

A browser that is offline receives the notification when it comes back, within 24 hours.

Nothing shows up?

  • Notifications are blocked for this site: allow them in the settings of the browser, then reload the page.
  • Check that the system allows notifications for the browser (on macOS: System Settings › Notifications) and that Focus or Do Not Disturb is off.
  • When a browser unsubscribes, or its data is cleared, the push service rejects it: Uptime Kotlin removes it from the channel automatically. Open the channel from that browser and add it again.

Settings

NOTIFICATIONS_WEB_PUSH_SUBJECT is the contact given to the push services with each notification, a mailto: address or an https:// URL. It defaults to the URL of the project; set it to your own contact, with the same value on the application and the workers. See Configuration.

The keys of the instance are stored in the database, the private key encrypted with your ENCRYPTION_MASTER_KEY, and are re-encrypted when you rotate the master key. Keep the same database: new keys would make every saved browser invalid.

Suggest a change on GitHub