Syncthing service scripts require changes to work with 2.0 13 August 2025, 19:09:23 The service scripts for syncthing has the following parameter syntax. Here's an example from the OpenRC script:Code: [Select]command_args="-no-browser -home=${SYNCTHING_HOMEDIR} ${SYNCTHING_OPTS}"However, as of 2.0, options such as "no-browser" must be prefixed with "--" instead of a single "-". Without the double dashes, syncthing fails to launch. I manually edited the service script on my end to fix the issue but the script must be updated. I would have submitted a PR myself but I don't think I can create an account as a non-collaborator. Quote Selected
Re: Syncthing service scripts require changes to work with 2.0 Reply #1 – 13 August 2025, 23:52:22 Updated, thanks. Quote Selected
Re: Syncthing service scripts require changes to work with 2.0 Reply #2 – 14 August 2025, 04:12:46 Quote from: louka – on 13 August 2025, 19:09:23The service scripts for syncthing has the following parameter syntax. Here's an example from the OpenRC script:Code: [Select]command_args="-no-browser -home=${SYNCTHING_HOMEDIR} ${SYNCTHING_OPTS}"However, as of 2.0, options such as "no-browser" must be prefixed with "--" instead of a single "-". Without the double dashes, syncthing fails to launch. I manually edited the service script on my end to fix the issue but the script must be updated. I would have submitted a PR myself but I don't think I can create an account as a non-collaborator.Question - what is syncing? Quote Selected
Re: Syncthing service scripts require changes to work with 2.0 Reply #3 – 14 August 2025, 08:53:56 Unfortunately, the update didn't fix it for me (tested on my setup and on a mostly-clean VM)On both systems, this is the result:Code: [Select]rc-service syncthing start * WARNING: syncthing is already startingrc-service syncthing stop * ERROR: syncthing stopped by something elserc-service syncthing status * status: stoppedBut launching syncthing manually (from a terminal) works as expected.Also, logging to /var/log/syncthing/ stopped for some reason. Are there any other logs I can provide in order to help?Related thread: https://forum.artixlinux.org/index.php/topic,8540.msg51336.html Quote Selected
Re: Syncthing service scripts require changes to work with 2.0 Reply #4 – 14 August 2025, 18:06:36 Quote from: MaxLPM – on 14 August 2025, 08:53:56Unfortunately, the update didn't fix it for me (tested on my setup and on a mostly-clean VM)I've noticed some weird behavior in OpenRC scripts; sometimes, when the service script changes and the daemon is already running, OpenRC can't control the daemon correctly. Try to pkill all syncthing processes and retry, this fixed it for me.Quote from: mrbrklyn – on 14 August 2025, 04:12:46Question - what is syncing?A very neat software to keep files and directories synced across devices which can equally well serve as a backup solution. Quote Selected
Re: Syncthing service scripts require changes to work with 2.0 Reply #5 – 14 August 2025, 19:17:54 Oops, actually, it was a very stupid mistake on my part. I forgot that rc-service requires sudo. Don't know how I missed that Running "sudo rc-service syncthing start" after a reboot worked, thank you! Quote Selected
Re: Syncthing service scripts require changes to work with 2.0 Reply #6 – 20 August 2025, 18:55:17 It seems the script in the syncthing-runit package still uses the incompatible options. Quote Selected
Re: Syncthing service scripts require changes to work with 2.0 Reply #7 – Yesterday at 01:43:45 For whoever needs a quick runit script. The HOME part is set because syncthing was complaining about "$HOME is not defined panic: Failed to get user home dir".Code: [Select]#!/bin/sh[ -r conf ] && . ./confexec 2>&1HOME=$(getent passwd $USER | cut -d: -f6)HOME="$HOME" exec chpst -u "$USER" syncthing serve --logflags 0 Quote Selected 1 Likes