System-wide Syncthing Autostart with Systemd

This is the ‘something is wrong’ I think :slight_smile: The service doesn’t start on boot. I’ve got two laptops in front of me at the moment, if I boot and log in to the desktop on one, and just boot to the login screen on the other, checking the Syncthing web UI indicates the one that just boots to login is disconnected and never appears. As soon as I log in on that machine, Syncthing connects and sync starts.

I’ve changed the UI to be accessible on 0.0.0.0:8384 on both laptops now to see if I can view the UI over the LAN. If I don’t log in on the target machine I get “Server not found”. As soon as I log in I get the Syncthing UI available over the LAN.

I’ve removed all Syncthing systemd services, reimplemented them using root, mozzie and testuser users and no matter which I use Syncthing is accessible after log in via any user, but not before.

Checking journald, which is a performance in itself, it seems to confirm Syncthing is only starting up after log in. Given how pathetic systemd is at logging and how difficult it is to find the right journald for the right user I’m wondering if this is more a systemd issue than Syncthing. There’s no errors/warnings from journald but I had a similar problem with getting tinc-vpn running and after several OS reinstalls/ and days crawling forums I gave up eventually. Most other services I’ve set up haven’t been a problem, even with starting VM’s and containers at boot with custom services.