Railway Node.js SIGTERM Handler Not Running

Share
Workaround available Node.js Updated November 14, 2026How we research

Quick answer

If you start Node with npm, yarn or pnpm, the package manager swallows SIGTERM. Start Node directly with a custom start command.

Most likely fix: Start Node directly

How to fix it

Try these in order — the most common fix is first.

  1. 1. Start Node directly

    1. Open the service Settings tab
    2. Scroll to the Deploy section
    3. Change Custom Start Command from 'npm run start' to 'node index.js' (your real entry file)
    4. Redeploy
    Did this fix it?

Symptoms

Your SIGTERM handler never runs and the service is eventually force-quit, looking like a sudden crash.

Why it happens

  • npm/yarn/pnpm becomes the main process and intercepts the shutdown signal

This guide also covers

  • railway sigterm node
  • railway graceful shutdown
  • railway npm start sigterm

Still not working?

If Railway keeps failing, you're not alone. See every Railway problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

Other Railway errors

All 10 Railway errors and fixes →