Skip to content

Instantly share code, notes, and snippets.

View haasr's full-sized avatar

Ryan Haas haasr

View GitHub Profile
@haasr
haasr / gist:954fafc50f847a16690e95cc05a6bfed
Last active October 6, 2023 12:45
Guide: Set Up Secure Django Website using Ubuntu + Nginx, Certbot, Fail2Ban, UFW
Set Up Secure Django Website: Ubuntu + Nginx, Postgres DB, Certbot, Fail2Ban, UFW
*********************************************************************************
Using Ubuntu 22.04 deployed on DigitalOcean. Some steps (most of the SSH
key configuration) apply more to DigitalOcean. I also used Ubuntu 18.04
but Python version had to be updated to 3.9.7 or many dependencies had
to be deprecated.
In this setup process, my static files are stored in AWS. If your static
storage is configured another way, set the STATIC_ROOT in settings.py.