Systemd Service#

If you have a native install of SolarThing, you will want to setup a systemd service to run SolarThing so that it automatically starts when you boot your device and so it runs seemlessly in the background.

Install systemd service#

Running ./run.sh ourselves is great and all, but we want SolarThing to run if the device restarts or if we logout.

To install the systemd service, run this command:

sudo /opt/solarthing/other/systemd/install.sh <NAME OF YOUR DIRECTORY HERE>

If you configured a rover, you can likely replace <NAME OF YOUR DIRECTORY HERE> with custom_rover like so:

sudo /opt/solarthing/other/systemd/install.sh custom_rover

If it was successful, you should see a message Reloaded systemctl.

Starting systemd service#

You have now installed the systemd service. The name of that service is the format: solarthing-<NAME OF YOUR DIRECTORY HERE>. So to start it, you may run:

sudo systemctl start solarthing-custom_rover

That starts SolarThing in the background. It should be running now! If you restart your device, SolarThing won’t start running. To enable it so that it starts on reboot, run this:

sudo systemctl enable solarthing-custom_rover

Next, you probably want to view your data: Viewing Your Data.