Skip to content

Instantly share code, notes, and snippets.

@LiamPerson
Created June 17, 2025 13:25
Show Gist options
  • Save LiamPerson/e5d55281cd3d801048898a120b57305a to your computer and use it in GitHub Desktop.
Save LiamPerson/e5d55281cd3d801048898a120b57305a to your computer and use it in GitHub Desktop.
Python Synapse (Matrix) Systemd service module
[Unit]
Description=Synapse service (inside venv)
After=network.target
[Service]
Type=forking
User=nasdac
WorkingDirectory=/mnt/ttbnvme/synapse
ExecStart=/bin/bash -c 'source /mnt/ttbnvme/synapse/bin/activate && synctl start'
ExecStop=/bin/bash -c 'source /mnt/ttbnvme/synapse/bin/activate && synctl stop'
PIDFile=/mnt/ttbnvme/synapse/homeserver.pid
Restart=on-failure
LimitNOFILE=16384
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment