To create a systemd command for a Django server using Gunicorn to serve the project over some port, follow these steps:
-
Create a gunicorn configuration file. In your project directory, create a file named
gunicorn.pywith the following contents:bind = "0.0.0.0:8000" workers = 4
-
Install
Gunicornin your project environment if not yet installed.