---
title: "Switching restic backup from NFS to SFTP"
url: https://daily.dev/posts/switching-restic-backup-from-nfs-to-sftp-3j3qfjwwq
source_url: https://www.damirscorner.com/blog/posts/20260807-SwitchingResticBackupFromNfsToSftp.html
type: article
source: "Damir's Corner"
published: 2026-08-07T06:37:01.037Z
updated: 2026-08-07T06:37:27.719Z
reading_time: 5
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Switching restic backup from NFS to SFTP

**[Damir's Corner](https://daily.dev/sources/damirscorner)** · 5 min read · 0 upvotes · 0 comments

## Summary

A home lab user switched their restic backup repository from an NFS mount to SFTP on a Synology NAS after discovering that NFS UID/GID mismatches across machines forced root-only access. The post explains the root cause (AUTH_SYS security requiring identical UIDs across client and NAS), why NFS squash options were insufficient, and provides a step-by-step guide to enabling SFTP on Synology, setting up SSH key authentication, updating the RESTIC_REPOSITORY variable, and fixing existing file ownership with chown/chmod.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.damirscorner.com/blog/posts/20260807-SwitchingResticBackupFromNfsToSftp.html>

## Questions this post answers

### Why can I only access my restic repository on a Synology NFS mount as root?

NFS with AUTH_SYS security requires identical UIDs and GIDs on both the client and the Synology NAS. When they differ, the client is assigned 'others' permissions, effectively blocking non-root access. Root bypasses permission checks, which is why root-only access works. The fix is to switch to SFTP, where authentication is handled via SSH keys and file ownership maps to the SSH login user.

_Home lab users troubleshooting restic permission issues on Synology track solutions like this on daily.dev._

### How do I configure restic to use SFTP with a Synology NAS instead of an NFS mount?

Enable SSH in Synology Control Panel under Terminal & SNMP, then enable SFTP under File Services > FTP > SFTP. On the client, add a Host entry to ~/.ssh/config with the NAS hostname, port, and username, generate an ed25519 SSH key, copy it to the NAS with ssh-copy-id, and set RESTIC_REPOSITORY to sftp:synology:/restic. For root-based backup scripts, place the SSH config in /root/.ssh/config and use a passphrase-free key.

_Developers managing self-hosted backup infrastructure find migration walkthroughs like this on daily.dev._

## Similar posts on daily.dev

- [Gaining Root Access via NFS Misconfiguration](https://daily.dev/posts/gaining-root-access-via-nfs-misconfiguration-9jmiskj8h) · InfoSec Write-ups · 2 upvotes · 0 comments
- [I turned my NAS into a private Git server, and it made more sense than I expected](https://daily.dev/posts/i-turned-my-nas-into-a-private-git-server-and-it-made-more-sense-than-i-expected-aujnucfqy) · XDA Developers · 1 upvotes · 0 comments
- [Back Up Data to Object Storage Using Restic](https://daily.dev/posts/back-up-data-to-object-storage-using-restic-3nfodusez) · DigitalOcean Community · 0 upvotes · 0 comments

---

[View this post on daily.dev](https://daily.dev/posts/switching-restic-backup-from-nfs-to-sftp-3j3qfjwwq)
