defter 0.5.4

Self-hosted Zotero sync and file storage server, with metadata in SQLite and attachments in S3.
[Unit]
Description=defter self-hosted Zotero sync and file storage server
Documentation=https://codeberg.org/front-matter/defter
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=defter
Group=defter

# Settings, including where the API keys and S3 credentials are (see env.example).
EnvironmentFile=/etc/defter/env
ExecStart=/usr/local/bin/defter start

# /var/lib/defter, created and owned by the service user; defter finds it
# through $STATE_DIRECTORY without --data-dir.
StateDirectory=defter
StateDirectoryMode=0750

Restart=on-failure
RestartSec=10

# Every open library holds a few files: its database, write-ahead log and
# read connections.
LimitNOFILE=65536

# Harden the service
NoNewPrivileges=true
PrivateTmp=true
PrivateDevices=true
ProtectSystem=strict
ProtectHome=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=true
LockPersonality=true

[Install]
WantedBy=multi-user.target