Start Syncthing at boot using screen

I’ve read many post where people try to debug syncthing but can’t because they use whatever way to make it start at boot…

I like to be able to monitor my process both from the system and using SSH. To do it the easy way I use crontab and screen!

This will work for debian and many other distros

First off install screen : # apt-get install screen Then add a crontab ($ crontab -e) to start it at boot:

@reboot screen -d -m syncthing

Whenever you wish to look at syncthing output, you use “screen -r” in CLI. To get out, you press CTRL+A + D. It can be used for virtually anything.

Easy, simple and efficient.

Admins: feel free to remove if it is not welcomed.

Thanks for sharing this, but why don’t you use the provided systemd scripts? Since debian uses systemd now you get everything just out of the box with:

$ systemctl --user start syncthing.service

For logs:
$ journalctl --user-unit=syncthing.service -e

or

# systemctl start syncthing@youruser.service

For logs:
$ journalctl -u syncthing@youruser.service -e

Not all my systems are on Jessie (Actually there is just one that we use to prepare the migration process)… There is also some limitation we impose ourselves over logs retention.

Using screen keep it simple even for average joes plus it have so much uses… It also keep it simple for ST team whenever someone comes for debug.

This is is intended for beginners more than advanced users…

1 Like