

sudo apt-get update
sudo apt-get install python3-venv
gunicorn -b 0.0.0.0:8000 demo:app
Here demo is filename and app is flask app name
Create gunicorn service, in following location (sudo nano
/etc/systemd/system/youowa-dev.service
)
# AWS - NS 1
[unit]
Description=Gunicorn instance for a YouOnWhatsApp Dev
After=network.target
[Service]
User=ubuntu
Group=www-data
WorkingDirectory=/home/ubuntu/youowa-dev
ExecStart=/home/ubuntu/youowa-dev/venv/bin/gunicorn -b localhost:8000 app:app
Restart=always
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload