[Unit]
Description=Paperless webserver
After=network.target
After=redis.service
Wants=network.target

[Service]
User={{ paperless_user }}
Group={{ paperless_user }}
WorkingDirectory={{ paperless_root_dir }}/app/src
ExecStart={{ paperless_root_dir }}/venv/bin/gunicorn -c {{ paperless_root_dir }}/app/gunicorn.conf.py paperless.asgi:application
PrivateTmp=yes
PrivateDevices=yes
ProtectSystem=full
ProtectHome=yes
NoNewPrivileges=yes
MemoryLimit=1024M
SyslogIdentifier=paperless-webserver
Restart=on-failure
StartLimitInterval=0
RestartSec=30

[Install]
WantedBy=multi-user.target
