@@ -349,7 +349,7 @@ In case of troubles check the logs::
349349Using systemd
350350~~~~~~~~~~~~~
351351
352- systemd is a suite of system management daemons, libraries, and
352+ Systemd is a suite of system management daemons, libraries, and
353353utilities designed as a central management and configuration platform
354354for the Linux computer operating system. It also offers users the
355355ability to manage services under the user's control with a per-user
@@ -413,9 +413,15 @@ How to set up a user service
413413 Otherwise the user service will not start, because by default, systemd checks for user
414414 services before your home directory has been decrypted.
415415
416- Automatic start-up of systemd user instances at boot (before login) is possible
417- through systemd's "lingering" function, if a system service cannot be used
418- instead. Refer to the `enable-linger `_ command of ``loginctl `` to allow this
416+ Automatic start-up of syncthing user services at boot (instead of at login) is
417+ possible through systemd's "lingering" function, if a system service
418+ is not used. This activates all enabled services for enable-linger users at
419+ boot time::
420+
421+ sudo loginctl enable-linger myuser
422+ systemctl --user enable syncthing.service
423+
424+ For more information, refer to the `enable-linger `_ command of ``loginctl `` to allow this
419425for a particular user.
420426
421427.. _enable-linger : https://www.freedesktop.org/software/systemd/man/loginctl.html#enable-linger%20USER%E2%80%A6
@@ -466,6 +472,26 @@ override file using ``systemctl edit ...`` is advised::
466472 [Service]
467473 AmbientCapabilities=CAP_CHOWN CAP_FOWNER
468474
475+ Remote-mounted home directories
476+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
477+
478+ If you set up a system service for one or more
479+ users whose home directory is mounted over the network (e.g. via NFS),
480+ then syncthing will fail to start on boot, unless you tell systemd to
481+ delay launching syncthing services until after the remote filesystems
482+ are mounted.
483+
484+ To correct this, adjust the syncthing service by creating an override file using
485+ ``
systemctl edit [email protected] ``::
486+
487+ # Wait for NFS-mounted home directories to become available
488+ # before starting syncthing on boot.
489+ [Unit]
490+ After=remote-fs.target
491+
492+ Note that this is not necessary for lingering user services, which
493+ already wait for remote filesystems (if any) to be available.
494+
469495Debugging
470496^^^^^^^^^
471497
0 commit comments