[Unit] Description=MollySocket After=network-online.target [Service] Type=simple Environment="RUST_LOG=info" Environment="MOLLY_CONF=/opt/mollysocket/prod.toml" WorkingDirectory=/opt/mollysocket/ # TODO: set VAPID key # Option 1, with systemd-creds # SetCredentialEncrypted=[...] output of `mollysocket vapid gen | systemd-creds encrypt --name=ms_vapid -p - -` # Environment=MOLLY_VAPID_KEY_FILE=%d/ms_vapid # # Option 2, key stored in plaintext # Environment=MOLLY_VAPID_PRIVKEY=[...] output of `mollysocket vapid gen` User=mollysocket Group=mollysocket UMask=0007 ExecStart=/opt/mollysocket/ms server KillSignal=SIGINT Restart=on-failure # Configures the time to wait before service is stopped forcefully. TimeoutStopSec=5 [Install] WantedBy=multi-user.target