From c20decee36b737469d45b14dd8599e5b9e5b122d Mon Sep 17 00:00:00 2001 From: geleeroyale Date: Fri, 15 Nov 2019 23:53:22 +0100 Subject: [PATCH] Added specifics for systemd services when using a keybase bridge --- _Footer.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 _Footer.md diff --git a/_Footer.md b/_Footer.md new file mode 100644 index 0000000..45eef13 --- /dev/null +++ b/_Footer.md @@ -0,0 +1,32 @@ +## Headless server install + systemd + +If you run matterbridge as a service in systemd and want to use a bridge with keybase, be sure to run the service as the default user via *user.slice*, since keybase also runs its services in *user.slice*. + +### Example service + +Create a matterbridge.service file in + +`/usr/lib/systemd/user/` + +-> + +``` +[Unit] +Description=matterbridge +After=network.target + +[Service] +ExecStart=/path-to-your-executable/matterbridge +Restart=on-failure +RestartSec=10s + +[Install] +WantedBy=multi-user.target +``` + +*Start service* - `systemctl --user start matterbridge.service` +*Stop service* - `systemctl --user stop matterbridge.service` +*Check Status* - `systemctl --user status matterbridge.service` + +*Start at System Startup* - `systemctl --user enable matterbridge.service` +**If you are using an SSH session, user services might shut down, use this to prevent:** `loginctl enable-linger` \ No newline at end of file