Server 500 Error in Django – Gunicorn starts but app doesn't respond
kx24
FREEOP

a year ago

HI!! I'm deploying a Django app on Railway. The container starts successfully, Gunicorn launches without errors and listens on port 8080, but when I access the public domain, I get a 500 error on all routes.

Key details:

  • The app doesn't use a database—only forms (forms.py) and SMTP configuration.
  • Migrations were applied successfully (auth, admin, sessions, etc.).
  • Static files are located in landingpage/static/landing, and I ran collectstatic --noinput.
  • STATICFILES_DIRS, STATIC_ROOT, and ALLOWED_HOSTS are configured according to Railway's official guide.
  • My Procfile contains: web: gunicorn servelecpage.wsgi:application --bind 0.0.0.0:8080
  • WSGI_APPLICATION in settings.py is set to 'servelecpage.wsgi.application', and the wsgi.py file correctly defines the application variable.
  • The environment variable ALLOWED_HOSTS is set to proyectosweb-production.up.railway.app, but I also tested with ["*"].
  • Logs show no errors—just a clean Gunicorn startup.
Solved$10 Bounty

Pinned Solution

irazvan2745
FREE

a year ago

SMTP is only available on the PRO plan and above, maybe thats why its erroring

Also, did you configure the proxy correctly?

3 Replies

Railway
BOT

a year ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


irazvan2745
FREE

a year ago

SMTP is only available on the PRO plan and above, maybe thats why its erroring

Also, did you configure the proxy correctly?


kx24
FREEOP

a year ago

That was exactly the issue. I’m not planning to upgrade to the Pro plan at this time, so I’ll explore other deployment platforms. Thanks again for the support — I had assumed Railway included SMTP access by default.

My goal is to build scalable projects, ranging from simple landing pages to more complex, production-ready applications. If you have any platform recommendations that support SMTP out of the box, I’d really appreciate them.

All the best


Status changed to Solved brody 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...