How to deploy a Django app on our shared hosting
This is the usual path for a Django project. Flask is the same, with a shorter step 5. Our support team will walk you through it on WhatsApp if it is your first time.
1. Get the project ready. List your packages in requirements.txt with pip freeze, move secrets such as SECRET_KEY and database passwords into environment variables, set DEBUG = False and add your domain to ALLOWED_HOSTS.
2. Create the database. In the control panel, create a MySQL database and user, and put the details in your Django DATABASES setting through environment variables. Install the mysqlclient or PyMySQL driver.
3. Create the Python app. Open Setup Python App, choose a Python version, set the application root (a folder outside public_html) and the URL, and save. The panel creates a virtual environment and a passenger_wsgi.py entry file for you.
4. Upload code and install packages. Clone your repository over SSH or upload a zip, activate the app’s virtual environment with the command shown in the panel, and run pip install -r requirements.txt.
5. Point the entry file at Django. Edit passenger_wsgi.py so it imports your project’s WSGI application (for Flask, import your app object). Then run python manage.py migrate and python manage.py collectstatic.
6. Serve static files and restart. Point STATIC_ROOT at a folder inside your website’s public directory, or use WhiteNoise, restart the app from the panel and open your domain. The Django admin, forms and SSL should all be working.
On a VPS we usually set Django up with Gunicorn as a systemd service, Nginx as the reverse proxy serving static files, and a free Let’s Encrypt certificate. FastAPI follows the same pattern with Uvicorn workers.