Start here: complete step-by-step guides

Django app: from startproject to live, step by step

Create a Django project, prepare settings for production, push to GitHub and deploy with the Django preset.

  1. Create the project
  2. Production settings
  3. List the packages
  4. Push to GitHub
  5. Launch and configure
  6. Deploy
  7. Create an admin user
  8. 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:8000

2. 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.txt

4. 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
deactivate

Go 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.

Next step

Move your site, or your whole cloud estate

Shared hosting you can buy in two minutes. Infrastructure and managed services quoted by an engineer within one business day.