Run at System Startup

For now please refer to Raspberry Pi systemd page.


cat /lib/systemd/system/my-iot.service
Description = my-iot
BindsTo =
After =

ExecStart = /home/pi/bin/my-iot --silent --suppress-log-timestamps my-iot/my-iot.toml my-iot/secrets.toml
WorkingDirectory = /home/pi
StandardOutput = journal
StandardError = journal
Restart = always
User = pi

WantedBy =
sudo systemctl enable my-iot
sudo systemctl status my-iot
sudo systemctl start my-iot
sudo systemctl stop my-iot
sudo systemctl restart my-iot


journalctl -u my-iot -f

See also: How To Use Journalctl to View and Manipulate Systemd Logs.