I'm migrating my remaining laptop to Debian with KDE. At home, I have a Synology NAS with two folders that I currently access from Windows using mapped drives, while my Linux desktop mounts them through NFS in /etc/fstab. I'd like to use the same NFS setup on the laptop, but I'm concerned about what happens when I'm away from home and the NAS is unreachable. Will Debian still boot if the NFS mounts fail, or will it wait indefinitely or eventually time out? I plan to connect back home with a WireGuard VPN and would prefer to mount the shares manually only when needed. Is adding options such as nofail or systemd automount appropriate? I also want to keep using NFS rather than install SMB/Samba, and the NAS will only be reachable through the VPN.
3 Answers
Add the `nofail` option to each NFS entry in `/etc/fstab`. That tells systemd not to treat an unavailable NAS as a boot failure, so the laptop should continue starting even when you’re traveling or the NAS is offline. Without it, boot may pause while the mount operation times out. You can then run `sudo mount /path/to/mountpoint` after bringing up the VPN.
You can also add `x-systemd.automount` to the fstab options. This creates an automount point and delays contacting the NAS until something actually accesses the directory, which can make boot and travel more convenient. `nofail` is still useful as a safeguard if the share remains unavailable.
Using NFS through a WireGuard tunnel is reasonable: the VPN provides encryption for the traffic, while NFS remains available only across the private tunnel. Don’t expose NFS directly to the internet. If you prefer manual control, bringing up the VPN first and then running the mount command is perfectly fine; a systemd or NetworkManager hook could automate that later if desired.

That sounds like the behavior I want. I’ll use WireGuard to reach home and mount the shares manually only when I actually need them.