Cloud Deployment & DevOps

Deployments that are repeatable, secure and boring

I deploy and operate Python applications on Linux servers. That includes Ubuntu VPS setup, Nginx as a reverse proxy, Gunicorn and Uvicorn application servers, Docker and systemd for process management, SSL certificates, DNS, SSH hardening and CI/CD pipelines, documented so anyone on the team can ship.

What you get

  • One documented, repeatable way to deploy
  • HTTPS everywhere with automatic certificate renewal
  • Services that restart on failure and survive reboots
  • Production issues that can be traced and fixed quickly

Production is part of the product

Most outages I see are not caused by clever bugs. They come from deployment steps someone forgot, a process that did not restart after a reboot, an expired certificate or a secret committed to the repository. Good DevOps work removes those failure modes.

My default stack for Python applications is deliberately conventional:

  • Ubuntu with key-only SSH, a firewall and unattended security updates
  • Nginx as the reverse proxy, TLS terminator and static file server
  • Gunicorn for WSGI apps or Uvicorn for ASGI apps with WebSockets
  • systemd units (or Docker when environments must be identical) for the app, Celery workers and schedulers
  • SSL with automatic renewal and DNS configured with the right records from day one
  • CI/CD that runs tests before anything reaches production

I have deployed and run production backends this way, including Ubuntu, Nginx and Gunicorn deployments of Django services, and I handle production deployment and troubleshooting on a live SaaS product.

For a step-by-step walkthrough, read Deploying Django to production with Gunicorn, Nginx and systemd.

How I work

  1. 01

    Audit

    Review how the app is built and run today, including secrets, processes, ports and the manual steps that cause outages.

  2. 02

    Standardise

    Define one build artifact and one way to start each process, whether systemd units or containers, with configuration in the environment.

  3. 03

    Secure

    TLS, firewall rules, SSH key-only access, least-privilege service users and security headers at the proxy.

  4. 04

    Automate

    A pipeline runs tests and deploys, and the runbook documents everything that is still manual.

Typical deliverables

  • Ubuntu server provisioning and SSH hardening
  • Nginx reverse proxy, static files and TLS configuration
  • Gunicorn (WSGI) or Uvicorn (ASGI) application servers
  • systemd services or Docker containers for app, workers and schedulers
  • SSL certificates and DNS configuration
  • CI/CD pipeline for tests, builds and deployments
  • Runbook covering deploys, rollbacks and common incidents

Related work

Related articles

Frequently asked questions

What is the best way to deploy a Django app?

For many teams, a solid default is an Ubuntu server with Nginx as the reverse proxy and TLS terminator, Gunicorn running the Django app under systemd, static files served by Nginx, PostgreSQL as the database and Celery workers as separate services. Containers make sense when you need identical environments across machines.

Should I use Gunicorn or Uvicorn?

Use Gunicorn for synchronous WSGI apps such as a classic Django deployment. Use Uvicorn for ASGI apps such as FastAPI or Django Channels, where WebSockets or async views are involved. Gunicorn can also manage Uvicorn workers for ASGI apps.

Do I need Kubernetes?

Usually not at the start. A well-configured VPS or a few servers with systemd or Docker serve most products for a long time. Orchestration becomes worthwhile when the number of services, teams or regions makes manual operations the bottleneck.

Other services