Skip to content
Free website migration on every plan, done by our team.Learn more ›
Servers

How to host a Python app (Django or Flask)

Host a Django or Flask app on shared hosting with a Python app manager or on a VPS with Gunicorn, Nginx, a database and free SSL, plus a production checklist.

Short answer: Small Python apps can run on some shared hosting with a Python app manager. For production Django or Flask apps, use a VPS: run the app with Gunicorn, put Nginx in front for your domain and SSL, use a proper database and manage it as a system service.

Option 1: shared hosting

Some cPanel servers include Setup Python App, which creates a virtual environment and connects your app to the web server. Ask us whether your plan supports it.

Option 2: a VPS

  1. Secure the server. See first 10 things to do on a VPS.
  2. Create a virtual environment and install your requirements.
  3. Run the app with Gunicorn.
  4. Create a systemd service so it starts automatically.
  5. Configure Nginx as a reverse proxy with free SSL. See Nginx as a reverse proxy.

Production checklist

  • DEBUG off in Django, with allowed hosts set.
  • Static files served by Nginx.
  • Secrets in environment variables.
  • Database backups off the server. See the 3-2-1 rule.

Our Cloud VPS starts from $5.00 a month.

Frequently asked questions

Which database should I use?

PostgreSQL or MariaDB are common choices. See MySQL vs MariaDB.

How much RAM does Django need?

A small app runs on 1 to 2 GB; more with background workers. See choosing a VPS plan.

Ready when you are

Host it where it performs

NVMe speed, offshore privacy and a written SLA — live in minutes on AuroxHost.