DigitalOceanFlask icon indicating copy to clipboard operation
DigitalOceanFlask copied to clipboard

installing a Flask webapp on a Digital Ocean (or Linode, etc.) Ubuntu box

Installing a Flask webapp on a Digital Ocean VPS (or Linode, etc.)

Here I sum up how to install a Flask webapp on a Digital Ocean VPS that has Ubuntu Linux on it. The following topics will be covered:

  • server configuration
  • the big picture
  • Nginx
  • a simple Flask app in a virtual environment served by gunicorn
  • gunicorn is started automatically upon boot

Originally I wrote these notes for Ubuntu 14.04, but later it was updated for Ubuntu 16.04. Both versions are available:

  • Ubuntu 14.04 -- gunicorn is started with upstart
  • Ubuntu 16.04 -- gunicorn is started with systemd