python 3.7 was originally used in this project. VGlensWeb/settings.py: ALLOWED_HOSTS = ['optic-store.sinfrontera.net'] STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static/') MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media/') DEBUG = False * Django setup (run from /var/www/sinfronteras/optic-store): source .venv/bin/activate python manage.py migrate python manage.py collectstatic --noinput python manage.py createsuperuser # optional deactivate * Install systemd service (Gunicorn creates the socket in the project dir): sudo cp deploy/optic-store.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable optic-store.service sudo systemctl start optic-store.service sudo systemctl status optic-store.service * Install Nginx site: sudo cp deploy/optic-store.nginx /etc/nginx/sites-available/optic-store.net sudo ln -s /etc/nginx/sites-available/optic-store.net /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx After code or config changes: cd /var/www/sinfronteras/optic-store source .venv/bin/activate python manage.py collectstatic --noinput # if static files changed deactivate sudo systemctl daemon-reload sudo systemctl restart optic-store.service sudo systemctl restart nginx If you change the project directory name or path, update: - /etc/systemd/system/optic-store.service - /etc/nginx/sites-available/optic-store.net