Trying to access https://n8n-production-XXXX.up.railway.app/ and getting 503 error: "Database is not ready!" Have not used in several weeks

Trying to access https://n8n-production-XXXX.up.railway.app/ and getting 503 error: “Database is not ready!” Have not used in several weeks.

Hi @lobstersoft

This is a Railway deployment issue, not an n8n bug.

The error “503 – Database is not ready!” means that n8n cannot connect to its database.
Since the instance was inactive for several weeks, Railway likely suspended or deleted the database service or its connection variables.

Common causes:

  • PostgreSQL service is stopped, suspended, or deleted
  • DB_HOST, DB_PORT, DB_DATABASE, DB_USER, or DB_PASSWORD are missing or invalid
  • Railway put the database to sleep due to inactivity

How to fix:

  1. Open the Railway project
  2. Verify the database service is running
  3. Check that all DB_ environment variables* are present and correct
  4. Restart the n8n service
  5. If the database was deleted, you must restore from backup or create a new database

Key point:
n8n cannot start without a reachable database, so it returns 503 until the DB is available.

Seeing this message in n8n logs: [license SDK] cert is invalid because it has expired: (autorenewalsEnabled: true, expiredAt: Mon Jan 26 2026 07:52:19 GMT+0000 (Coordinated Universal Time), issuedAt: Fri Jan 16 2026 07:52:19 GMT+0000 (Coordinated Universal Time))

Railway or n8n issue?

That message is from n8n’s license system and is not what’s causing the 503.

It just means the local license certificate expired and n8n is trying to auto-renew it. Even if the license is expired, n8n still starts; it does not block the server or return 503 because of that.

The 503 “Database is not ready!” happens before the license check matters and indicates n8n cannot connect to the database.

So this is a Railway/database availability issue, not an n8n license problem.