I am hosting Syncthing on a webserver, and the service is started as the www-data user. The home-directory of www-data is /var/www/, so Syncthings configuration folder is /var/www/.config/.
Now, I want to change the path of /var/www/.config/ to /var/www/xy/.config/. The only information I coud find is https://docs.syncthing.net/users/config.html.
Right at the beginning it says:
The location defaults to $HOME/.config/syncthing (Unix-like), $HOME/Library/Application Support/Syncthing (Mac), or %LOCALAPPDATA%/Syncthing (Windows). It can be changed at runtime using the -home flag.
I don’t exactly understand how to use this “-home flag”, can someone help me?
So you did this 1.5 years ago (according to the version) and just now want to change the config dir?
Regardless, as it seams you edited the service file to change the path to syncthing (as it is not “installed” or placed in a path inside the PATH variable; thats why just running syncthing doesn’t work) you know where to set the -home cli option.
It must not be just run once but every time syncthing is started, you have to tell it where the config/home dir is.