[Unit]
Description=Lemonade Server (user)
Documentation=https://lemonade-server.ai/docs/
After=network-online.target

[Service]
Type=simple
WorkingDirectory=%h
# Optional env file for HF_TOKEN / LEMONADE_API_KEY / LEMONADE_ADMIN_API_KEY.
# %E expands to $XDG_CONFIG_HOME (default ~/.config). `systemctl --user edit
# lemond` drop-ins work too.
EnvironmentFile=-%E/lemonade/lemond.conf
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/lemond
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=5s
KillSignal=SIGINT

# Security hardening
PrivateTmp=yes
NoNewPrivileges=yes
ProtectSystem=full
RestrictRealtime=yes
RestrictNamespaces=yes
LockPersonality=yes

[Install]
WantedBy=default.target
