Setup systemd service to automatically run wiki on boot

### Setup systemd service to automatically run wiki on boot

Create a config file in /home/{user}/config.json. user is `wiki` if you've been following this guide. put the following in it for farm mode: { "farm": true, "debug": false }

`sudo vim /etc/systemd/system/wiki.service` then paste the following in: (remember, in vim you press `i` to enter insert mode. then paste as usual. then press `escape` then `:x` then enter to save and exit)

[Unit] Description=Wiki Service Wants=network-online.target After=network-online.target [Service] Type=simple User=wiki ExecStart=/usr/bin/sudo -H -u wiki /home/wiki/.nvm/versions/node/v18.18.1/bin/node /home/wiki/.nvm/versions/node/v18.18.1/bin/wiki --conf /home/wiki/config.json Restart=always [Install] WantedBy=multi-user.target ~