Added systemd docs
@@ -78,7 +78,7 @@ Installing the devtools is simple and no additional entries need to be added for
See the examples below to understand how to install the deb and rpm packages.
!!! Note
- If installing using the updater script (see the section *Installing with Other Linux Distros*) that all the binaries are downloaded together, i.e., there is not a separate devtools archive file or package.
+ If installing using the updater script (see the section *Installing with Other Linux Distros*), then all the binaries are downloaded together, i.e., there is not a separate devtools archive file or package.
# Installing with Debian
Nodes have been verified on Ubuntu 18.04. Other Debian-based distros should work as well (use apt-get install rather than apt install).
@@ -170,6 +170,61 @@ chmod 544 update.sh
When the installer runs, it will pull down the latest update package from S3 and install it. The `-n` option above tells the installer to not auto-start the node. If the installation succeeds the node will need to be started manually described later in this [guide](#start-node).
+# Installing algod as a systemd service
+
+If installing using the updater script, there are several shell scripts that are bundled into the tarball that will are helpful in running `algod`. One of those is the `systemd-setup.sh` script to create a system or user `systemd` service.
+
+Here is the usage string:
+
+```
+Usage: ./systemd-setup.sh username [group|--user]
+```
+
+### Installing system-wide
+
+To install `algod` as a system-wide service, run the script with root privileges:
+
+```
+sudo ./systemd-setup.sh algorand algorand
+```
+
+This will create the service in `/lib/systemd/system/algorand@.service`. This will have used the template `algorand@.service.template` downloaded in the same tarball to create the service. It includes a lot of helpful information at the top of the file and is worth perusing.
+
+After installing, the script will also make `systemd` aware that the script is present on the system. However, if making changes after installation, be sure to run the following command to register those changes:
+
+```
+systemctl daemon-reload
+```
+
+All that's left now is to start the service using `systemctl`. If preferred, it can also be enabled to start on system startup.
+
+```
+systemctl start algorand@$(systemd-escape $ALGORAND_DATA)
+
+```
+
+### Installing as a user
+
+To install `algod` as a user service:
+
+```
+./systemd-setup.sh kilgore-trout --user
+```
+
+This will create the service in `$HOMEDIR/.config/systemd/user/algorand@.service`. This will have used the template `algorand@.service.template-user` downloaded in the same tarball to create the service. It includes a lot of helpful information at the top of the file and is worth perusing.
+
+After installing, the script will also make `systemd` aware that the script is present on the system. However, if making changes after installation, be sure to run the following command to register those changes:
+
+```
+systemctl --user daemon-reload
+```
+
+All that's left now is to start the service using `systemctl`. If preferred, it can also be enabled to start on system startup.
+
+```
+systemctl --user start algorand@$(systemd-escape $ALGORAND_DATA)
+
+```
# Configure Telemetry
Algod is instrumented to provide telemetry which is used for insight into the software's performance and usage. Telemetry is disabled by default and so no data will be shared with Algorand Inc. Enabling telemetry provides data to Algorand to improve the software and help to identify issues. Telemetry can be enabled by following the commands below replacing &lt;name&gt; with your desired hostname (e.g. 'SarahsLaptop').
