matrix-synapse.service 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Example systemd configuration file for synapse. Copy into
  2. # /etc/systemd/system/, update the paths if necessary, then:
  3. #
  4. # systemctl enable matrix-synapse
  5. # systemctl start matrix-synapse
  6. #
  7. # This assumes that Synapse has been installed by a user named
  8. # synapse.
  9. #
  10. # This assumes that Synapse has been installed in a virtualenv in
  11. # the user's home directory: `/home/synapse/synapse/env`.
  12. #
  13. # **NOTE:** This is an example service file that may change in the future. If you
  14. # wish to use this please copy rather than symlink it.
  15. [Unit]
  16. Description=Synapse Matrix homeserver
  17. # If you are using postgresql to persist data, uncomment this line to make sure
  18. # synapse starts after the postgresql service.
  19. # After=postgresql.service
  20. [Service]
  21. Type=notify
  22. NotifyAccess=main
  23. ExecReload=/bin/kill -HUP $MAINPID
  24. Restart=on-abort
  25. User=synapse
  26. Group=nogroup
  27. WorkingDirectory=/home/synapse/synapse
  28. ExecStart=/home/synapse/synapse/env/bin/python -m synapse.app.homeserver --config-path=/home/synapse/synapse/homeserver.yaml
  29. SyslogIdentifier=matrix-synapse
  30. # adjust the cache factor if necessary
  31. # Environment=SYNAPSE_CACHE_FACTOR=2.0
  32. [Install]
  33. WantedBy=multi-user.target