Get phone alerts when your Railway service crashes
Hugin Alerts delivers a push notification to your phone within seconds of a Railway crash or resource issue. Add one HTTP call to your app code — that's all it takes to never miss a production incident.
Last updated:
What you can monitor with Railway
Setup guide
Get started in minutes
How Railway notifications work
Railway supports deploy notifications through its integrations. But for crashes, resource issues, and custom events, there's no built-in webhook system. Instead, you add a simple HTTP call to your application code — on startup, in error handlers, after cron jobs. The question is: where do you send those notifications?
Get a notification endpoint from Hugin Alerts
Hugin Alerts is a service that receives HTTP requests and turns them into push notifications on your phone. Install the app and tap "Get started" — you get a unique ingest key immediately. No sign-up, no email, no credit card.
Add the Hugin key to Railway
Store your ingest key as an environment variable in Railway so your application can use it.
# Railway Dashboard → Your Service → Variables → Add
# Key: HUGIN_KEY
# Value: your-ingest-key-here
# This is also available via the Railway CLI:
railway variables set HUGIN_KEY=your-ingest-key-here Send notifications from your app
Add notification calls at key points — startup (to detect restarts), error handlers (to catch crashes), and after cron jobs.
// Add to your application entry point (e.g., index.ts)
const HUGIN_KEY = process.env.HUGIN_KEY;
// Notify on startup
if (HUGIN_KEY) {
fetch('https://api.huginalerts.com/v1/events', {
method: 'POST',
headers: {
'Authorization': `Bearer ${HUGIN_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
system: 'railway',
event: 'service_started',
description: `Service started on Railway — ${process.env.RAILWAY_SERVICE_NAME || 'unknown'}`,
}),
}).catch(() => {});
}
// Notify on uncaught errors
process.on('uncaughtException', async (err) => {
if (HUGIN_KEY) {
await fetch('https://api.huginalerts.com/v1/events', {
method: 'POST',
headers: {
'Authorization': `Bearer ${HUGIN_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
system: 'railway',
event: 'crash',
description: `Service crashed: ${err.message}`,
}),
}).catch(() => {});
}
process.exit(1);
}); Examples
Ready-to-use examples
Deployment success notification
Get notified when your Railway deployment goes live.
curl -X POST https://api.huginalerts.com/v1/events \
-H "Authorization: Bearer YOUR_INGEST_KEY" \
-H "Content-Type: application/json" \
-d '{
"system": "railway",
"event": "deploy_success",
"description": "API server deployed to Railway — build #147"
}' Service crash notification
Know instantly when your Railway service goes down.
curl -X POST https://api.huginalerts.com/v1/events \
-H "Authorization: Bearer YOUR_INGEST_KEY" \
-H "Content-Type: application/json" \
-d '{
"system": "railway",
"event": "crash",
"description": "API server crashed — OOMKilled: memory limit exceeded"
}' Cron job completion notification
Track your Railway cron service runs.
curl -X POST https://api.huginalerts.com/v1/events \
-H "Authorization: Bearer YOUR_INGEST_KEY" \
-H "Content-Type: application/json" \
-d '{
"system": "railway",
"event": "cron_complete",
"description": "Nightly database backup completed — 2.3 GB exported"
}' Frequently asked questions
How do I get push notifications when my Railway service crashes?
Does Railway have built-in webhook support for crashes?
How do I detect crash loops on Railway?
Does this work with Docker deployments on Railway?
Can I monitor Railway cron jobs with Hugin Alerts?
How do I add the Hugin key to Railway?
What is Hugin Alerts?
Start getting Railway alerts now
Set up takes less than a minute. No sign-up, no email, no credit card.
Get started for free