[Unit] Description=Nexus Chitfund Django Application (gunicorn) After=network.target mysql.service [Service] User=www-data Group=www-data WorkingDirectory=/var/www/html/nexus_chitfund_web # gunicorn keeps its control socket under $HOME Environment=HOME=/var/www/html/nexus_chitfund_web/logs ExecStart=/var/www/html/nexus_chitfund_web/venv/bin/gunicorn \ --workers 3 --timeout 60 --bind 0.0.0.0:8000 \ --access-logfile /var/www/html/nexus_chitfund_web/logs/gunicorn-access.log \ --error-logfile /var/www/html/nexus_chitfund_web/logs/gunicorn-error.log \ config.wsgi:application Restart=always RestartSec=5 [Install] WantedBy=multi-user.target