So if you started with Syncthing’s config directory being at
/home/pi/.config/syncthing, and want to relocate it to
/home/pi/usb/.syncthing_config, the first step is to move it…
mv /home/pi/.config/syncthing /home/pi/usb/.syncthing_config
… then to confirm that it’s been moved, just check the contents of the original directory…
ls -l /home/pi/.config
… before creating the symbolic link (aka. “soft link”, and often abbreviated as “symlink”)…
ln -s /home/pi/usb/.syncthing_config /home/pi/.config/syncthing
… and finally testing the symlink to see if you can access config.xml:
If you don’t get any errors, you’re good to go (don’t forget to undo the changes you made earlier to
Now launch Syncthing and verify that all your folders and settings are as expected.
Yeah, don’t rename
config.xml because it’s what Syncthing is looking for.
--data options plus the
$STHOMEDIR environment variables for customizing the location of the directories, but a symlink is often simpler when you’re still getting comfortable using Linux.
And as a bonus, a year from now you won’t have to remember that you had modified a systemd unit file buried in a subdirectory, made menu/desktop shortcuts with additional startup options, and/or set environment variables while upgrading your RPi. Just plug in your SSD, mount it, and recreate the symlink.