1

I have installed syncthing on my Raspberry Pi but it does not start automatically.
How can I run it automatically after a reboot?

2 Answers 2

0

The folder /usr/share/applications contains shortcuts to all installed programs.
All shortcuts which are copied to the folder /home/pi/.config/autostart will be started automatically after a reboot.

The following command copies the needed shortcut to the autostart folder:

cp /usr/share/applications/syncthing-start.desktop /home/pi/.config/autostart

Hint: In my case I use the standard user pi. If you use a different user name then you have to adopt it to /home/different-username

0

As a longer time syncthing user, configuring a new (debian based) system, I'm happy to see the syncthing documentation has been updated. See https://docs.syncthing.net/users/autostart.html for details on autostarting syncthing.

From history and experience I do know you donnot want to run syncthing as a system service. Syncthing needs to be user-based. On debian systems (like RPi linux is) you can use the debian way to start services on user base so yes, it does run as soon as the system starts. But you need to run a service/deamon for every user.

My way for the current user:

sudo systemctl enable syncthing@${USER}.service
sudo systemctl start syncthing@${USER}.service
sudo systemctl status syncthing@${USER}.service
sudo journalctl -e -u syncthing@${USER}.service

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.