From a8e37fa0c821d8ea1032a83f4aa0c5169508c4b8 Mon Sep 17 00:00:00 2001 From: Liam <22931076+Biyoni@users.noreply.github.com> Date: Tue, 5 Jan 2021 02:40:52 +0000 Subject: Create systemd guide --- docs/systemd.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/systemd.md (limited to 'docs/systemd.md') diff --git a/docs/systemd.md b/docs/systemd.md new file mode 100644 index 0000000..f68ff2c --- /dev/null +++ b/docs/systemd.md @@ -0,0 +1,22 @@ +### Service config for systemd +The file chibisafe-example.service is to be moved to `/etc/systemd/system/chibisafe.service` + +You will need to edit the parameters: +- `User` to be the username/uid of your chibisafe instance +- `WorkingDirectory` to the **FULL** path to your chibisafe, `/home/chibisafe/chibisafe` for example. +- `EnvironmentFile` the same as the above, with the addition of `/.env`, `/home/chibisafe/chibisafe/.env` + +```[Unit] +Description=chibisafe, easy to use file uploader +After=network.target + +[Service] +Type=simple +User=chibisafe +WorkingDirectory=/home/chibisafe/chibisafe +EnvironmentFile=/home/chibisafe/chibisafe/.env +ExecStart=/usr/bin/npm run start +Restart=always + +[Install] +WantedBy=multi-user.target``` -- cgit v1.2.3 From c2afd2c2dc4efda1b41f0320e243f2f264e26b8d Mon Sep 17 00:00:00 2001 From: Liam <22931076+Biyoni@users.noreply.github.com> Date: Tue, 5 Jan 2021 02:41:39 +0000 Subject: Update systemd.md --- docs/systemd.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/systemd.md') diff --git a/docs/systemd.md b/docs/systemd.md index f68ff2c..6700bb8 100644 --- a/docs/systemd.md +++ b/docs/systemd.md @@ -6,6 +6,8 @@ You will need to edit the parameters: - `WorkingDirectory` to the **FULL** path to your chibisafe, `/home/chibisafe/chibisafe` for example. - `EnvironmentFile` the same as the above, with the addition of `/.env`, `/home/chibisafe/chibisafe/.env` +Example below. + ```[Unit] Description=chibisafe, easy to use file uploader After=network.target -- cgit v1.2.3 From 05137aad9cbd5dea49090f4f9663b33bd13daa2d Mon Sep 17 00:00:00 2001 From: Liam <22931076+Biyoni@users.noreply.github.com> Date: Tue, 5 Jan 2021 04:56:47 +0000 Subject: Update systemd.md --- docs/systemd.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/systemd.md') diff --git a/docs/systemd.md b/docs/systemd.md index 6700bb8..8804573 100644 --- a/docs/systemd.md +++ b/docs/systemd.md @@ -6,6 +6,10 @@ You will need to edit the parameters: - `WorkingDirectory` to the **FULL** path to your chibisafe, `/home/chibisafe/chibisafe` for example. - `EnvironmentFile` the same as the above, with the addition of `/.env`, `/home/chibisafe/chibisafe/.env` +### If you are using n/nvm you will also need to update the path to npm in `ExecStart` +- For n this will likely be `/home/username/n/bin/npm` +- You can also find this by running `whereis npm` in your terminal and copy the path from the output. + Example below. ```[Unit] -- cgit v1.2.3