Monitor your SaaS on Railway — public health check
Railway runs your API container or web service with a generated public URL (*.up.railway.app) or a custom domain. External uptime monitoring needs that URL plus a GET /health (or /api/health) that returns 200 without authentication — the same contract every PaaS guide in this series uses.
StillOnline probes from the public internet, hosts a status page, and alerts you when the check fails. Pair this guide with the generic Health check quickstart. Next.js on Vercel: Vercel monitoring.
Quick answer
On Railway, expose GET /health on a service with Public Networking, verify curl to https://….up.railway.app/health (or your custom domain), then add that HTTPS URL as a StillOnline HTTP check. StillOnline runs external probes and a status page—it does not run inside your Railway project. Free: one URL; watch the web service, not a background worker.
1. Expose a health route in your service
Add a route your framework mounts at /health (or behind /api if that is how you deploy). Keep it fast and unauthenticated so StillOnline’s GET probes succeed.
Express (Node) example:
app.get("/health", (_req, res) => {
res.status(200).json({ status: "ok", service: "my-saas" });
});
FastAPI (Python) example:
@app.get("/health")
def health():
return {"status": "ok"}
Bind the app to process.env.PORT (Railway injects it). Deploy from GitHub or railway up.
Optional: ping Postgres with SELECT 1 when DATABASE_URL is set — return 503 if you want StillOnline to mark down when the DB is unreachable (same trade-off as Vercel guide).
2. Confirm the public Railway URL
StillOnline cannot reach private networking. Enable Public Networking on the service customers hit, then copy the HTTPS hostname.
In the Railway service → Settings → Networking → enable Public Networking. Copy the HTTPS URL, e.g. https://my-saas-production.up.railway.app.
From your laptop:
curl -sS -w "\n%{http_code}\n" https://my-saas-production.up.railway.app/health
You want body JSON and trailing 200. If you see 502, the process is not listening on PORT yet. If 404, the path does not match your framework mount (/api prefix, etc.).
3. Custom domain (recommended before launch)
Default *.up.railway.app hostnames can change when you recreate services. Point api.yourproduct.com CNAME to Railway, wait for TLS, then curl the custom host — that is the URL you monitor long-term.
4. Register StillOnline
Paste the same URL you curled into StillOnline. StillOnline is hosted SaaS — we do not run inside your Railway project.
- Start free.
- Project with a public status slug.
- HTTP check →
https://api.yourproduct.com/health(or Railway default host), GET, status 200, interval 5 min. - Embed the status page link for customers in docs or onboarding.
- Pro+: automate with stillonline-mcp (MCP article).
| Plan | What you get |
|---|---|
| Free | 1 URL, public status page, 24h history |
| Pro ($9) | 10 URLs, private pages, API/MCP, 90d history |
See Pricing.
Owner alerts: enable email, Telegram, or Slack in account settings when checks fail or recover — one channel on Free, all three on Pro / Ultimate. Guides: Telegram · Slack.
5. Railway-specific ops notes
Sleeping services, brief outages during deploys, and mixing web with workers confuse external monitors if you pick the wrong target.
- Sleep / scale to zero — if your plan sleeps idle services, external monitors show downtime while asleep; keep one replica or disable sleep for production APIs.
- Migrations — brief 502 during deploy is normal; tune check intervals or accept a short red period.
- Workers vs web — monitor the web service users hit, not a background worker with no HTTP server.
- Multiple services — Free = one URL; combine behind a gateway health or upgrade to Pro.
Compare alternatives: Best uptime 2026 · vs Uptime Kuma if you considered self-hosting instead.
FAQ
Can StillOnline monitor a Railway service with only private networking?
No. StillOnline probes from the public internet. Enable Public Networking on the Railway service (or expose health via a tunnel) before adding the check. Same rule as OpenClaw health URLs.
Should StillOnline use *.up.railway.app or a custom domain on Railway?
Prefer your custom domain in the StillOnline check and in customer docs—Railway default hostnames can change when you recreate services. The status page link stays on StillOnline (stillonline.tech/.../s/...).
Can StillOnline use POST or auth headers for Railway health?
StillOnline checks on Free use GET without custom headers—expose a public GET /health (or /api/health). Authenticated POST-only routes are not supported on the default check type.
Railway project has API and worker—what should StillOnline monitor?
Monitor the web HTTP service users hit. Background workers need logs/metrics elsewhere; do not point StillOnline at a queue consumer unless it serves HTTP health.
How does StillOnline monitoring differ on Railway vs Vercel?
Both need the same thing: a public HTTPS health URL. Railway uses a long-running container; Vercel uses a serverless route—see Vercel guide vs this post. StillOnline only HTTP-gets the URL you register.
Further reading
Health URL for SaaS — 5-min quickstart
Add a public GET /health or /api/health endpoint, verify it returns 200, and register an external StillOnline check with a status page — Free plan limits included.
Vercel uptime monitoring: health + status
Add app/api/health on Next.js App Router, deploy to Vercel, and monitor with StillOnline — example route, curl checks, Free vs Pro limits. StillOnline.
Vercel vs Railway vs Fly: what to monitor
Compare what indie SaaS should monitor on Vercel, Railway, and Fly.io — one checklist, links to platform guides, StillOnline health URL and status page.
Telegram alerts when your service goes down
Get Telegram DM alerts when an HTTP check fails, recovers, or stays up 24h. Link the StillOnline bot in settings — no BotFather or webhook URL needed.
Slack Alerts When Your Service Goes Down — StillOnline Setup
Get Slack notifications when HTTP checks fail, recover, or hit 24h uptime. Incoming Webhook setup and StillOnline owner alerts—step by step on StillOnline.
MCP status monitoring for AI agents
Step-by-step MCP setup in popular AI agent IDEs to read service uptime, list checks, and fetch public status — wizard, per-client config, Pro API key.