Awesome tutorial, thanks for making this!
I ended up using this for setting up sia.pixeldrain.com.
I modified the service file slightly, to fit my requirements better:Description=Sia Daemon After=network.target [Service] Type=simple ExecStart=/home/sia/Sia/siad -M gctwr ExecStop=/home/sia/Sia/siac stop WorkingDirectory=/home/sia/Sia/ Restart=always RestartSec=10 User=sia Nice=2 [Install] WantedBy=multi-user.target Alias=siad.service
The nice value is so it doesn't end up eating all resources of the pixeldrain server. It also causes siad to get eaten first if the server happens to run OOM.
This also contains a clean shutdown sequence for Sia, to reduce risks of data corruption when the server needs to reboot.
The type=simple line indicates that this is not a forking service, and that it should be started in a new process.
And I added After=network.target to make sure it doesn't start before the network driver is initialized.
I learned a lot about systemd from this, thanks for that :)