I’ve installed Syncthing from Apt repositories on both Ubuntu 22.04 (Syncthing v1.18) and 24.04 (v1.27). For both cases, the default systemd unit file template /lib/systemd/system/syncthing@.service uses the line ExecStart=/usr/bin/syncthing serve --no-browser --no-restart --logflags=0.
While struggling to start Syncthing as a system service on 22.04, I found that it constantly automatically exited as soon as I started it. ChatGPT suggested that the serve subcommand is to blame, that serve is no longer a standalone subcommand from at least Syncthing 1.18, and that syncthing serve causes the process to exit immediately with status 1. I don’t know whether ChatGPT is accurate here, but I did find that removing serve allowed me to start Syncthing and keep it started.
I’m suprised to see that the default service file still contains the serve subcommand in its ExecStart in the latest LTS version of Ubuntu, 24.04 (Syncthing 1.27). Is this a mistake? I haven’t been able to find much documentation, and I note that the “ Starting Syncthing Automatically — Syncthing documentation ” page (for v2.0) doesn’t have an example of an ExecStart line, which would help clear it up.
Is serve a deprecated subcommand that users should remove from the default Systemd service file in Ubuntu 22.04 and 24.04?