Django + Nginx, and Gunicorn: doesn't create gunicorn.sock

Solution 1:

You aren't far off, you simply forgot to separate your section header and your file in the socket file's config.

Like this:

[Unit]
Description=gunicorn socket
[Socket]
ListenStream=/run/gunicorn.sock
[Install]
WantedBy=sockets.target

Note that this is just a simple typo on your end - section headers belong on their own lines and then the config underneath that header on separate lines.

If this still doesn't work, consult the SystemD manual to see when that function was put into place to make sure that your SystemD supports those config options.