ATStatus
ATStatus WikiLoading documentation...

Push Notifications

Real-time browser alerts for status changes

Push notifications allow your status page visitors to receive instant browser notifications when incidents occur or component status changes — even when they're not actively viewing the page.

Mobile Support
Desktop Browsers
Privacy Focused
Real-time Alerts

How Push Notifications Work

┌─────────────────────────────────────────────────────────────┐
│                 Push Notification Flow                       │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│  1. User visits status page                                  │
│            │                                                 │
│            ▼                                                 │
│  2. Browser asks: "Allow notifications?"                     │
│            │                                                 │
│            ▼                                                 │
│  3. User clicks "Allow" → Subscription created               │
│            │                                                 │
│            ▼                                                 │
│  4. ATStatus stores push subscription                        │
│            │                                                 │
│            ▼                                                 │
│  5. When incident occurs:                                    │
│     ATStatus → Push Service → User's Browser                │
│            │                                                 │
│            ▼                                                 │
│  6. User sees notification (even if browser minimized)       │
│                                                              │
└─────────────────────────────────────────────────────────────┘

Enabling Push Notifications

Step 1: Generate VAPID Keys

Push notifications use VAPID (Voluntary Application Server Identification) keys for authentication. Generate these keys once:

# Using npx (recommended)
npx web-push generate-vapid-keys

# Output:
# Public Key: BM0h...
# Private Key: abc123...

Step 2: Configure Environment Variables

Add the keys to your .env file:

# Push Notification Configuration
VAPID_PUBLIC_KEY=BM0h...your-public-key...
VAPID_PRIVATE_KEY=abc123...your-private-key...
VAPID_SUBJECT=mailto:admin@yourdomain.com
VariableDescription
VAPID_PUBLIC_KEYPublic key shared with browsers
VAPID_PRIVATE_KEYPrivate key (keep secret!)
VAPID_SUBJECTContact email (required by push services)

Step 3: Enable in Admin Settings

  1. Navigate to Admin → Settings → Notifications
  2. Enable Push Notifications
  3. Configure notification triggers (optional)
  4. Click Save
HTTPS Required

Push notifications only work over HTTPS. They will not function on http://URLs (except localhost for development).

Notification Triggers

Configure which events trigger push notifications:

EventDefaultDescription
New Incident✓ EnabledWhen a new incident is created
Incident Update✓ EnabledWhen incident status changes
Incident Resolved✓ EnabledWhen incident is marked resolved
Component Down○ DisabledWhen component status becomes outage
Component Recovered○ DisabledWhen component returns to operational
Maintenance Starting○ DisabledWhen scheduled maintenance begins

User Experience

Subscribing

When push notifications are enabled, visitors see a subscribe button on the status page. Clicking it triggers the browser's permission prompt.

Chrome/Edge
Shows a dropdown permission prompt. Users click "Allow" to subscribe.
Firefox
Shows a permission bar at top. Users click "Allow" to subscribe.
Safari
Requires macOS Ventura+ for web push. Shows system permission dialog.
Mobile
Works on Android Chrome. iOS Safari support added in iOS 16.4+.

Unsubscribing

Users can unsubscribe by:

  • Clicking the subscribe button again (toggles)
  • Revoking notification permission in browser settings
  • Clearing browser data

Notification Content

Push notifications include:

  • Title: Incident title or component name
  • Body: Status update message
  • Icon: Your status page logo
  • Badge: Small notification badge icon
  • Action: Click to open status page
// Example notification payload
{
  "title": "🔴 Major Outage: API Service",
  "body": "We are investigating reports of API errors...",
  "icon": "/logo.png",
  "badge": "/badge.png",
  "data": {
    "url": "https://status.example.com/incidents/inc_123"
  }
}

Service Worker

Push notifications require a service worker. ATStatus includes a pre-configured service worker at /sw-push.js that handles:

  • Receiving push events
  • Displaying notifications
  • Handling notification clicks
  • Background sync for offline support
PWA Integration

The service worker integrates with ATStatus's PWA features. Users who install the status page as a PWA will receive notifications even more reliably.

Privacy Considerations

No Personal Data Collection
Push subscriptions only store an endpoint URL and keys — no personal information.
User Control
Users must explicitly opt-in and can unsubscribe at any time.
End-to-End Encryption
Notification content is encrypted between your server and the user's browser.
No Third-Party Tracking
Notifications go through browser vendors (Google, Mozilla, Apple) — not third-party services.

Troubleshooting

Notifications Not Appearing

  • Check VAPID keys are correctly set in .env
  • Verify HTTPS is configured (required for push)
  • Check browser notification permissions
  • Ensure service worker is registered (check DevTools → Application)
  • Check browser-specific restrictions (Focus Mode, DND, etc.)

Permission Denied

  • User may have blocked notifications for your domain
  • Check browser settings → Site Settings → Notifications
  • User needs to manually reset permission

Mobile Not Working

  • iOS requires Safari 16.4+ and the site must be added to Home Screen
  • Android Chrome works on supported sites
  • Check device notification settings for the browser app

Browser Support

BrowserDesktopMobile
Chrome✓ Full Support✓ Android
Edge✓ Full Support✓ Android
Firefox✓ Full Support✓ Android
Safari✓ macOS 13+✓ iOS 16.4+ (PWA only)
Opera✓ Full Support✓ Android