From c6912f5425d86e236b08bafbb5a22d9970b33640 Mon Sep 17 00:00:00 2001 From: zoe-bat <60606719+zoe-bat@users.noreply.github.com> Date: Sun, 12 Dec 2021 15:48:02 +0100 Subject: [PATCH] add example systemd service (#341) --- example/gotosocial.service | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 example/gotosocial.service diff --git a/example/gotosocial.service b/example/gotosocial.service new file mode 100644 index 000000000..9bc06afb5 --- /dev/null +++ b/example/gotosocial.service @@ -0,0 +1,23 @@ +[Unit] +Description=GoToSocial Server + +[Service] + +# make sure this user and group exist and have read and write permissions in your GoToSocial folder. +# if they do not exist yet create them with "sudo useradd -r gotosocial" +# then give them permission with "chown -R gotosocial:gotosocial /gotosocial" (path to your gotosocial folder) +# you can adjust the users name according to your setup +User=gotosocial +Group=gotosocial + +Type=exec +Restart=on-failure + +# change if your path to the GoToSocial binary is different +ExecStart=/gotosocial/gotosocial --config-path config.yaml server start +WorkingDirectory=/gotosocial + +[Install] +WantedBy=default.target + +# After you are done editing this file move it to "/etc/systemd/system/gotosocial.service" and enable the service with "sudo systemctl enable --now gotosocial.service"