For Django
Django hosting, done properly
Free to sign up. No egress fees on any product.
Why Django on Edge
PaaS convenience at VPS prices
Gunicorn or Uvicorn on real VMs
Run any WSGI or ASGI server (Gunicorn, Uvicorn, Granian or Daphne) on a VM sized to fit. RAM and CPU you can predict.An S3 storage backend
Point django-storages at Edge Storage and use it for both media and collected static files. It behaves exactly like AWS S3.Postgres on a private network
Run Postgres on the same VM or its own, joined by a free private network. Or keep your existing managed provider.Thumbnails without the queue
Skip sorl-thumbnail and its cache table. Request ?width=320&height=320&fit=cover from the CDN and it does the rest.Global CDN, zero egress
/static/ and /media/ cache in 988 locations. High hit rates on the files people actually load, and no bandwidth bill.Agent-deployable
Ask your coding agent to deploy the project to a domain. The agent API provisions the VM, sets up DNS and adds the CDN.
Reference architecture
How Django maps to Edge
Browsers
resolved by Edge DNS
app.acme.io
pages pass through to Gunicorn
static.acme.io
/static/ and /media/ from the bucket
gunicorn :8000
acme.wsgi · 4 workers · Nginx
acme-static
django-storages · S3Storage
postgres :5432
PostgreSQL 16 · its own VM
- Compute
Runs Gunicorn (WSGI) or Uvicorn (ASGI) behind Nginx, and Postgres on its own VM.
- Storage
Backs django-storages for both the default and staticfiles storages.
- CDN
Caches /static/ and /media/ URLs worldwide.
- Image optimisation
On-the-fly thumbnails, crops and AVIF/WebP from uploaded media.
- DNS
Anycast DNS for the apex, www and admin subdomains.
- Shield
Checks auth and contact forms with one HTTP call from a view.
- Assist
One template include adds answers grounded in your site's content.
Deploy
From startproject to live in five steps
- 01
Create the app and database VMs
The python script installs Python 3.12, pip, Gunicorn and Nginx. The postgresql script sets up PostgreSQL 16. Join both to a private network so the database never faces the internet.
shell$ edge compute create --name django --size s-2vcpu-4gb \ --image ubuntu-24 --region london --script python $ edge compute create --name db --size s-2vcpu-4gb \ --image ubuntu-24 --region london --script postgresql \ --script-param db_name=acme - 02
Point django-storages at Edge Storage
Use the STORAGES setting (Django 4.2 and later). A custom domain makes static and media URLs go through the CDN.
settings.pyS3 = "storages.backends.s3.S3Storage" STORAGES = { "default": {"BACKEND": S3, "OPTIONS": {"location": "media"}}, "staticfiles": {"BACKEND": S3, "OPTIONS": {"location": "static"}}, } AWS_S3_ENDPOINT_URL = "https://storage.edge.network" AWS_S3_REGION_NAME = "us-east-1" AWS_STORAGE_BUCKET_NAME = "acme-static" AWS_S3_CUSTOM_DOMAIN = "static.acme.io" AWS_ACCESS_KEY_ID = os.environ["EDGE_ACCESS_KEY"] AWS_SECRET_ACCESS_KEY = os.environ["EDGE_SECRET_KEY"] - 03
Run Gunicorn under systemd
Nginx from the python script proxies to 127.0.0.1:8000. Swap in Uvicorn workers for ASGI.
/etc/systemd/system/gunicorn.service[Unit] Description=Gunicorn for acme After=network.target [Service] User=www-data WorkingDirectory=/srv/acme ExecStart=/srv/acme/.venv/bin/gunicorn acme.wsgi:application \ --workers 4 --bind 127.0.0.1:8000 Restart=always [Install] WantedBy=multi-user.target - 04
Ship a release
Pull, install, migrate, collect, restart. Wrap it in a CI job once it works by hand.
shell$ git pull && .venv/bin/pip install -r requirements.txt $ .venv/bin/python manage.py migrate --noinput $ .venv/bin/python manage.py collectstatic --noinput $ sudo systemctl restart gunicorn - 05
Front it with the CDN
One deployment, two hostnames: the app goes to the VM, static and media come from the bucket.
shell$ edge cdn create --name acme $ edge cdn domains add cdn-61f0a8 \ --domain app.acme.io --origin https://<vm-ip> $ edge cdn domains add cdn-61f0a8 --domain static.acme.io \ --origin-type storage --storage-bucket acme-static --jit-image
Prefer to hand it off? Give the job to your AI agent or have our engineers do it.
What it costs
Two VMs, one bucket, no dyno maths
- The private network between VMs is free
- No egress fees on static files or media
- Thumbnails included with the CDN
- Billed hourly from a prepaid balance, with optional hard caps
Estimated monthly bill on Edge
Production app · 4.5M requests a month · 65 GB of media
- App VM$19.24Standard VM · 2 vCPU · 4 GiB · Gunicorn + Nginx
- Database VM$19.24Standard VM · 2 vCPU · 4 GiB · PostgreSQL 16
- CDN$1.004.5M requests: first 500k free, 4M × $0.25 per million
- Storage$0.9065 GB of static and media: first 5 GB free, 60 GB × $0.015
- DNS$0.00Apex, www and admin records
- Egress$0.00
FAQ
Django on Edge, answered
WSGI or ASGI?
Where should Postgres run?
How do I deploy?
Does the admin work behind the CDN?
How does this compare with Heroku?
Drop-in services
Add these without touching the stack
- Edge ShieldBot protection
POST /siteverify → score: 94Validate the humanity score in a form view with one requests call. No CAPTCHA widget in your templates.
Free for most sites. No puzzles, no widget to style.Explore - Edge AssistAI answers
<script src="…/assist.js">One template include gives every page an answer box grounded in your content.
Free tier: 250 answered questions a monthExplore
Ship Django on Edge
Bring an existing project or start with django-admin startproject. We'll help you size the VMs.
Free tiers hard-cap. Nothing bills until you add a card.