Skip to content
Snippets Groups Projects
Unverified Commit 35e13477 authored by Richard van der Hoff's avatar Richard van der Hoff Committed by GitHub
Browse files

Update the example systemd config to use a virtualenv (#4273)

If you're installing as a system package, the system package should have set up
the systemd config, so it's more useful to give an example of running in a
virtualenv here.
parent c7401a69
No related branches found
No related tags found
No related merge requests found
Update the example systemd config to use a virtualenv
# This assumes that Synapse has been installed as a system package # Example systemd configuration file for synapse. Copy into
# (e.g. https://www.archlinux.org/packages/community/any/matrix-synapse/ for ArchLinux) # /etc/systemd/system/, update the paths if necessary, then:
# rather than in a user home directory or similar under virtualenv. #
# systemctl enable matrix-synapse
# systemctl start matrix-synapse
#
# This assumes that Synapse has been installed in a virtualenv in
# /opt/synapse/env.
#
# **NOTE:** This is an example service file that may change in the future. If you # **NOTE:** This is an example service file that may change in the future. If you
# wish to use this please copy rather than symlink it. # wish to use this please copy rather than symlink it.
...@@ -10,12 +15,16 @@ Description=Synapse Matrix homeserver ...@@ -10,12 +15,16 @@ Description=Synapse Matrix homeserver
[Service] [Service]
Type=simple Type=simple
Restart=on-abort
User=synapse User=synapse
Group=synapse Group=nogroup
WorkingDirectory=/var/lib/synapse
ExecStart=/usr/bin/python2.7 -m synapse.app.homeserver --config-path=/etc/synapse/homeserver.yaml WorkingDirectory=/opt/synapse
ExecStop=/usr/bin/synctl stop /etc/synapse/homeserver.yaml ExecStart=/opt/synapse/env/bin/python -m synapse.app.homeserver --config-path=/opt/synapse/homeserver.yaml
# EnvironmentFile=-/etc/sysconfig/synapse # Can be used to e.g. set SYNAPSE_CACHE_FACTOR
# adjust the cache factor if necessary
# Environment=SYNAPSE_CACHE_FACTOR=2.0
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment