Deploy Flask
Production deployment guides for Flask on Ubuntu with Nginx, Gunicorn, Docker, and HTTPS.
These deployment guides cover the common Flask production paths used on VPS servers and small cloud instances. The baseline stack for this site is Ubuntu, Nginx, Gunicorn, and systemd.
Use the Nginx + Gunicorn guide for a normal Linux server, switch to the Docker guide if you want containerized deployment, and add HTTPS once the base HTTP stack is working correctly.
Deploy Flask with Nginx + Gunicorn
Baseline production deployment with systemd, Gunicorn, and Nginx reverse proxying.
Flask + Docker Production Setup
Container-based production setup with Docker, Compose, and Gunicorn.
Set Up HTTPS for Flask
Enable TLS with Nginx and Let's Encrypt after the base deployment is working.
Ubuntu VPS Deployment
Step-by-step guide for deploying Flask on a fresh Ubuntu VPS.
PostgreSQL Setup
Configure PostgreSQL for your production Flask application.
CI/CD Pipeline
Automate your Flask deployments with a CI/CD pipeline.
Recommended Order
Deploy the app first, verify Gunicorn and Nginx locally, then add HTTPS. If you are using Docker, make sure the container boots cleanly before introducing a reverse proxy or certificates.