Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit fa3d0d9

Browse files
committed
Modify systemd unit file reference to align with installation instruction (#6369)
* commit 'ba7af15d4': Modify systemd unit file reference to align with installation instruction (#6369)
2 parents 237f3fe + ba7af15 commit fa3d0d9

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

changelog.d/6369.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update documentation and variables in user contributed systemd reference file.

contrib/systemd/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Setup Synapse with Systemd
2+
This is a setup for managing synapse with a user contributed systemd unit
3+
file. It provides a `matrix-synapse` systemd unit file that should be tailored
4+
to accommodate your installation in accordance with the installation
5+
instructions provided in [installation instructions](../../INSTALL.md).
6+
7+
## Setup
8+
1. Under the service section, ensure the `User` variable matches which user
9+
you installed synapse under and wish to run it as.
10+
2. Under the service section, ensure the `WorkingDirectory` variable matches
11+
where you have installed synapse.
12+
3. Under the service section, ensure the `ExecStart` variable matches the
13+
appropriate locations of your installation.
14+
4. Copy the `matrix-synapse.service` to `/etc/systemd/system/`
15+
5. Start Synapse: `sudo systemctl start matrix-synapse`
16+
6. Verify Synapse is running: `sudo systemctl status matrix-synapse`
17+
7. *optional* Enable Synapse to start at system boot: `sudo systemctl enable matrix-synapse`

contrib/systemd/matrix-synapse.service

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
# systemctl enable matrix-synapse
55
# systemctl start matrix-synapse
66
#
7+
# This assumes that Synapse has been installed by a user named
8+
# synapse.
9+
#
710
# This assumes that Synapse has been installed in a virtualenv in
8-
# /opt/synapse/env.
11+
# the user's home directory: `/home/synapse/synapse/env`.
912
#
1013
# **NOTE:** This is an example service file that may change in the future. If you
1114
# wish to use this please copy rather than symlink it.
@@ -23,7 +26,7 @@ User=synapse
2326
Group=nogroup
2427

2528
WorkingDirectory=/opt/synapse
26-
ExecStart=/opt/synapse/env/bin/python -m synapse.app.homeserver --config-path=/opt/synapse/homeserver.yaml
29+
ExecStart=/home/synapse/synapse/env/bin/python -m synapse.app.homeserver --config-path=/home/synapse/synapse/homeserver.yaml
2730
SyslogIdentifier=matrix-synapse
2831

2932
# adjust the cache factor if necessary

0 commit comments

Comments
 (0)