my backend is not deploying
navneetyadav010
FREEOP

2 months ago

Your PostgreSQL database is running fine — the problem is only with building the Django backend code. The fix I already gave you (removing nixpacks.toml and updating railway.json) should solve this. Download the EduSmart-Backend-Fixed.zip, push it to GitHub, and Railway will retry automatically.

$10 Bounty

1 Replies

Status changed to Awaiting Railway Response Railway 2 months ago


Anonymous
HOBBY

2 months ago

It would help to see the exact build logs, because “backend not deploying” in Railway is usually a build or start command issue rather than a database problem.

For Django on Railway, common failure points are:

  1. Missing start command Make sure you have one of these configured:
  • Procfile: web: gunicorn project_name.wsgi
  • OR railway.json: "startCommand": "gunicorn project_name.wsgi"
  1. Dependencies not installed Ensure requirements.txt includes:
  • gunicorn
  • psycopg2-binary (for PostgreSQL)
  1. Incorrect Python detection Railway uses Nixpacks — it detects Python automatically, but only if:
  • requirements.txt is present
  • OR runtime.txt is defined
  1. Environment variables Make sure:
  • DATABASE_URL is set from Railway PostgreSQL
  • DEBUG=False
  • ALLOWED_HOSTS includes your Railway domain
  1. Migrations not applied Add this to start command if needed: python manage.py migrate && gunicorn project_name.wsgi

Instead of replacing configs blindly, check the deploy logs in Railway → they usually point exactly to the failing step (build vs start vs runtime).

If you can share the error log, I can pinpoint the exact issue.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...