Hi all, this is my first post on here and I’m very new to Syncthing.
I’m trying to get the Snap of Syncthing running but I’m having some issues.
I have installed the Snap on a Ubuntu Server 18.04 server and also on my laptop running Ubuntu Mate 18.04 just to test as I couldn’t get it to work on the server.
The snap wont run unless a type “Syncthing” into the command line and then the snap starts and I can access the web UI, but as soon at I close the terminal it kills the snap.
Is this right? does it only run while the command line is open? this makes it pretty useless to use on a headless server.
I have tried to read the manual but couldn’t find anything.
Could it just be a snap issue? or am I missing something simple?
I had the same confusion with the snap install in a VM. Not sure why, but I can’t seem to get it running with systemd.
I cloned the github repo to get a clean copy of the .service file, copied that to /etc/systemd/system/syncthing@user.service, and enable/started it. Looks like it’s having problems starting.
sudo systemctl status syncthing@myuser.service
● syncthing@myuser.service - Syncthing - Open Source Continuous File Synchronization for myuser
Loaded: loaded (/etc/systemd/system/syncthing@myuser.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-08-26 13:32:10 CDT; 4min 59s ago
Docs: man:syncthing(1)
Process: 13148 ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0 (code=exited, status=203/EXEC)
Main PID: 13148 (code=exited, status=203/EXEC)
Aug 26 13:32:10 myuser-VirtualBox systemd[1]: syncthing@myuser.service: Service RestartSec=100ms expired, scheduling restart.
Aug 26 13:32:10 myuser-VirtualBox systemd[1]: syncthing@myuser.service: Scheduled restart job, restart counter is at 5.
Aug 26 13:32:10 myuser-VirtualBox systemd[1]: Stopped Syncthing - Open Source Continuous File Synchronization for myuser.
Aug 26 13:32:10 myuser-VirtualBox systemd[1]: syncthing@myuser.service: Start request repeated too quickly.
Aug 26 13:32:10 myuser-VirtualBox systemd[1]: syncthing@myuser.service: Failed with result 'exit-code'.
Aug 26 13:32:10 myuser-VirtualBox systemd[1]: Failed to start Syncthing - Open Source Continuous File Synchronization for myuser.
I assume I botched a step, but I can’t see where. Any idea what’s breaking here?
Looks like I was running into a similar issue to the one mentioned here. I had to comment the whole Hardening section of the service though, not just two lines like they did in that link.
Since I have no idea what those options I turned off actually do I think I’ll take your advice and just install the .deb version instead of the snap.
In case it helps anyone in the future, my understanding from the output of journalctl -ru syncthing@myuser.service is that my error was:
need to run as root or suid
though I’m still not sure specifically what was throwing that.
Yes I ended up going with the .Deb and it works perfectly now. Will try the snap again at some stage.
Also I found when the snap was running the CPU usage was through the roof even while doing nothing where as the .Deb is fine.