Merge pull request #18 from benjaminfrank/systemd-socket-port-80

Enable non-root port 80 via systemd
This commit is contained in:
Quinn Casey 2022-02-28 11:17:50 -08:00 committed by GitHub
commit 049a2dde96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 0 deletions

View File

@ -419,6 +419,10 @@ writing. Windows is not and will never be supported.
``consumer`` script to watch the input folder, and the ``scheduler``
script to run tasks such as email checking and document consumption.
The ``socket`` script enables ``gunicorn`` to run on port 80 without
root privileges. For this you need to uncomment the ``Require=paperless-webserver.socket``
in the ``webserver`` script and configure ``gunicorn`` to listen on port 80 (see ``paperless/gunicorn.conf.py``).
You may need to adjust the path to the ``gunicorn`` executable. This
will be installed as part of the python dependencies, and is either located
in the ``bin`` folder of your virtual environment, or in ``~/.local/bin/`` if

View File

@ -3,6 +3,7 @@ Description=Paperless webserver
After=network.target
Wants=network.target
Requires=redis.service
#Requires=paperless-webserver.socket
[Service]
User=paperless

View File

@ -0,0 +1,9 @@
[Unit]
Description=Paperless Webserver Socket
[Socket]
ListenStream=80
NoDelay=true
[Install]
WantedBy=sockets.target