- Create the project
- Production settings
- List the packages
- Push to GitHub
- Launch and configure
- Deploy
- Create an admin user
- Go live on your domain
1. Create the project
mkdir mysite && cd mysite
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install django gunicorn
django-admin startproject myproject .
python manage.py runserver # http://127.0.0.1:80002. Production settings
In myproject/settings.py read secrets from the environment and set the static folder:
import os
SECRET_KEY = os.environ.get('SECRET_KEY', 'dev-only-change-me')
DEBUG = os.environ.get('DEBUG') == '1'
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', 'localhost,127.0.0.1').split(',')
CSRF_TRUSTED_ORIGINS = ['https://' + h for h in ALLOWED_HOSTS if h not in ('localhost', '127.0.0.1')]
STATIC_ROOT = BASE_DIR / 'staticfiles'3. List the packages
Every package your app uses must be in requirements.txt — the server installs exactly what is listed.
pip freeze > requirements.txt4. Push to GitHub
Make sure .gitignore contains .venv/, __pycache__/ and .env, then push (see Put your code on GitHub).
5. Launch and configure
Launch an app → Python → version (match the one on your computer) → plan → domain → pay. Then App settings → Framework Django. Change myproject in the start command if your project folder has another name. Add variables with + Add variable: SECRET_KEY (a long random string), ALLOWED_HOSTS = yourdomain.com,www.yourdomain.com, and your database settings. Save all.
6. Deploy
Connect the repository under Git deployments and press Deploy now. Each deploy installs requirements.txt into a fresh virtual environment, then runs collectstatic and migrate.
7. Create an admin user
Open Terminal in the dashboard:
cd ~/web/yourdomain.com/app
source .venv/bin/activate
python manage.py createsuperuser
deactivateGo live on your domain
Point the domain's @ and www A records to the IP shown in Domains, wait for Points here, then Issue free SSL → Always use HTTPS → Save changes.
Stuck? Our engineers answer support tickets around the clock. Contact us, or create an account and open a ticket from the dashboard — the same guides are there too.