From 95a2742b7ae247f24221e6d817f20d3cc04de71d Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 21 Jan 2020 14:08:26 -0500 Subject: [PATCH] add an example systemd service file --- docs/cryptpad.service | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docs/cryptpad.service diff --git a/docs/cryptpad.service b/docs/cryptpad.service new file mode 100644 index 000000000..54adf12e9 --- /dev/null +++ b/docs/cryptpad.service @@ -0,0 +1,23 @@ +[Unit] +Description=CryptPad API server + +[Service] +ExecStart=/home/cryptpad/.nvm/versions/node/v12.14.0/bin/node /home/cryptpad/cryptpad/server.js +# modify to match the location of your cryptpad repository +WorkingDirectory=/home/cryptpad/cryptpad + +Restart=always +# Restart service after 10 seconds if node service crashes +RestartSec=2 + +# Output to syslog +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=cryptpad +User=cryptpad +Group=cryptpad +# modify to match your working directory +Environment='PWD="/home/cryptpad/cryptpad/cryptpad"' + +[Install] +WantedBy=multi-user.target