mollysocket/mollysocket.service

36 lines
892 B
Desktop File

[Unit]
Description=MollySocket
After=network-online.target mollysocket-vapid.service
Wants=mollysocket-vapid.service
[Service]
Type=simple
Environment="RUST_LOG=info"
Environment="MOLLY_CONF=/etc/mollysocket/conf.toml"
# /etc/mollysocket/vapid.key is generated by mollysocket-vapid.service,
# you can also store the key in plaintext:
# by replacing the 2 following lines with
# Environment=MOLLY_VAPID_PRIVKEY=[...] output of `mollysocket vapid gen`
LoadCredentialEncrypted=vapid.key:/etc/mollysocket/vapid.key
Environment=MOLLY_VAPID_KEY_FILE=%d/vapid.key
User=mollysocket
Group=mollysocket
ConfigurationDirectory=mollysocket::ro
StateDirectory=mollysocket
UMask=0007
ProtectHome=true
ProtectSystem=true
ExecStart=ms server
KillSignal=SIGINT
Restart=on-failure
# Configures the time to wait before service is stopped forcefully.
TimeoutStopSec=5
[Install]
WantedBy=multi-user.target