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?
But I didn’t install Syncthing with a normal package manager (because the ubuntu repo is to old), but manually, so I don’t have the option to run Syncthing-commands.
Is there any alternativ?
I don’t really understand what you mean, but no, Syncthing has a default which is ~/.config/syncthing. To use something else, you give it the corresponding command line option.
The path in question is the one to the configuration file. You can’t change it in a config file, because we need to know the path to find the config file to begin with.
Whether you installed via APT or just a .tar.gz from GitHub has no bearing on this.
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.