Syncthing not auto starting on startup, linux mint

I’ve been using syncthing for years. I have it configured to autostart in the “start apps” menu of linux mint: this creates a /.config/autostart/syncthing.desktop file that is as follows:

[Desktop Entry] Type=Application Exec=/usr/bin/syncthing serve --logfile=default Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name[ca_ES]=syncthing Name=syncthing Comment[ca_ES]=syncthing Comment=syncthing X-GNOME-Autostart-Delay=0

This worked for me till today.

If I manually execute /usr/bin/syncthing serve --logfile=default everything works ok

I am using syncthing version 1.27.10

If someone knows why it is not auto staring, it would be a great help. Thanks!

(I’m assuming you meant to say ~/.config/autostart/, but if it’s not the case, then it’s the reason why the autostart isn’t working.)

The .desktop file above looks normal. Do you have any other personal autostart items in ~/.config/autostart/? Are they autostarting?

Note that when pasting text, there’s a handy “Preformatted text” feature that helps preserve any formatting to make it easier for everyone to read plus it avoids confusion caused by a jumble of text:

Discourse.toolbar.preformatted_txt..629x103

Thanks for your reply, gadget!

Yes, I meant ~/.config/autostart/, sorry about it! And yes, I have several other autostart items that are starting correctly, like vino server and some other scripts. What could I have a look at? Any ideas?

Since Syncthing is not a graphical application it would also make sense to start it via systemd as user unit. This has the advantage that you can leverage systemd features like the journal. With the Syncthing package of Arch Linux and openSUSE this works out of the box; not sure about Mint, though.

Otherwise it would be great to know what desktop environment you’re using. (Not everyone who might be able to help knows what DE Linux Mint uses and probably it also provides several DEs to chose form.)

1 Like

In situations like this, it’s a process of elimination, starting with the most obvious things and drilling down from there…

Not that I’m making a bunch of assumptions including that there isn’t flaky hardware (e.g. bad storage media), desktop environment (Cinnamon?), shell environment (Bash?), Linux experience, etc.

After having verified that other autostart items are working and that ~/.config/autostart/syncthing.desktop is actually updated whenever its settings are changed via the autostart configuration tool, my next step would be to see if there’s an error causing the failure to autostart.

In syncthing.desktop, modify the Exec= parameter to capture any console output:

Exec=/usr/bin/syncthing serve --logfile=default &> /tmp/syncthing.log

Log out / reboot, log back on, then check the contents of /tmp/syncthing.log.

It’d be very helpful knowing what changes were made between the day autostarting Syncthing was working and when it stopped (e.g. system updates, changes to Syncthing settings, etc.).

Oh! I have retaken this issue today and now it seems to work ok, tried several times and it started ok every time. Syncthing version is the same, 1.27.10. I don’t know what to say, there really was a period of some days/weeks during which it did not work… Well, should it happen again I will follow your advices. Thanks Martchus and Gadget for your help!!!

1 Like