Deploy Django using UWSGI + Nginx in AWS Lightsail with Ubuntu 20.14 LTS



In this article, our goal is to deploy and set up a Django application for production-ready and can access the Internet using UWSGI Nginx in AWS Lightsail.

AWS Lightsail Instance

To prepare to create something in VPS AWS Lightsail, we need to create Instance first.

  1. Choose Instance Location (for me is Singapore, but you can choose need to depend on your need/customer location), Instance Image (Linux), and OS (Ubuntu 20.04 LTS).


Install OS Requirements

Terminal command

Create Virtual Environment

Virtual Environment can create separated Environment with OS, so we are not disturbed or change Environment in the OS.

Install & Set up Django

Install Django with pip

Install & Set up UWSGI

We have installed UWSGI in our machine before, so we can start test run serve using UWSGI to our Application,


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store