mirror of https://github.com/mautrix/docs.git
793 B
793 B
Bridge setup with systemd
{{ #include ../selector.html }}
- Create a user for the bridge:
$ sudo adduser --system mautrix-$bridge --home /opt/mautrix-$bridge
- Set up the bridge with the normal virtualenv setup. Make sure you use that user and home directory for the bridge.
- Create a systemd service file at
/etc/systemd/system/mautrix-$bridge.service
:[Unit] Description=mautrix-$bridge bridge [Service] # N.B. If you didn't create a user with the correct home directory, set this # to the directory where config.yaml is (e.g. /opt/mautrix-$bridge). WorkingDirectory=~ ExecStart=/opt/mautrix-$bridge/bin/python -m mautrix_$bridge User=mautrix-$bridge [Install] WantedBy=multi-user.target