[Unit]
Description=Algernon web server
Wants=redis.service
After=redis.service network-online.target

[Service]
Type=simple
User=root
Group=users
ExecStart=/usr/bin/algernon --letsencrypt --accesslog=/var/log/access.log -c --domain --server --cachesize 67108864 --log /var/log/algernon.log /srv
Restart=on-failure
RestartSec=5s
Environment=HOME=/run/algernon

# Sandboxing
PrivateTmp=true
PrivateDevices=true
ProtectSystem=full
ProtectHome=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=true
LockPersonality=true
SystemCallArchitectures=native
NoNewPrivileges=true
RuntimeDirectory=algernon
RuntimeDirectoryMode=700

[Install]
WantedBy=multi-user.target
