Skip to content

Deploy a Django app on OrbixPanel

Django deploys as a Python server app. OrbixPanel creates a virtual environment, installs your requirements.txt, and serves the app with gunicorn behind a reverse proxy.

What OrbixPanel runs

Because your repo has a manage.py and a project package, it’s detected as Django and started with:

Terminal window
gunicorn <yourproject>.wsgi:application --bind 0.0.0.0:$PORT

<yourproject> is auto-detected (the folder containing wsgi.py). gunicorn is installed automatically if it isn’t already in your requirements — though adding it explicitly is good practice.

Prepare your repo

  1. A real requirements.txt (include gunicorn, psycopg2-binary for Postgres).
  2. In settings.py:
    import os
    ALLOWED_HOSTS = [os.environ.get("DOMAIN", "*")]
    DEBUG = False
    DATABASES = {...} # read host/user/password from env
    STATIC_ROOT = BASE_DIR / "staticfiles"
  3. Keep SECRET_KEY, DB credentials, etc. in environment variables.

Migrations & static files

OrbixPanel does not run Django management commands for you. After the first deploy, run them once from the web terminal:

Terminal window
.venv/bin/python manage.py migrate
.venv/bin/python manage.py collectstatic --noinput

Serve the collected static files via your web server config or a package like WhiteNoise (simplest for a single server).

Deploy

Apps → Deploy from Git → repo + branch → Deploy → add domain + SSL.

Troubleshooting

  • 502 after deploy → gunicorn couldn’t bind, or wsgi.py import failed — check the deploy log.
  • DisallowedHost → add your domain to ALLOWED_HOSTS.
  • CSS missing → run collectstatic and configure static serving.

Running OrbixPanel? Django deploys from Git with gunicorn set up for you. OrbixPanel.com → — the free, self-hosted, AI-powered hosting control panel.