Building a Private OneDrive with Syncthing, Centered on NAS via Docker Desktop
If you want a self-hosted, cross-platform synchronization solution like OneDrive, Syncthing is a powerful tool. This guide walks through how I used Docker Desktop and a NAS as the central hub to keep documents synchronized across Windows, macOS, and other devices.
📦 What is Syncthing?
Syncthing is an open-source, continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes.
🧩 System Structure
- NAS (QNAP / ZimaBoard / etc.): Runs the core Syncthing instance in Docker.
- Windows PC & MacBook: Each runs Syncthing and syncs through the NAS.
- Private network or Internet: All communication is peer-to-peer via QUIC/TCP/relay.
🐳 Deploying Syncthing on NAS via Docker Desktop
On your NAS (or PC acting as central node), use Docker Desktop to run the container:
Docker Image
linuxserver/syncthing:latest
Ports Mapping
Container Port | Host Port | Purpose |
---|---|---|
21027/udp | 21027 | Local discovery broadcast |
22000/tcp | 22000 | Main sync traffic via TCP |
22000/udp | 22000 | Sync traffic via QUIC |
8384/tcp | 8384 | Web GUI |
You can map different ports if you like, but remember to forward or open them in your NAS/router firewall.
Volume Mounts
Host Path | Container Path |
---|---|
E:\Docker\syncthing\config | /config |
E:\daisuke | /data |
Ensure both paths are granted permission in Docker Desktop → Settings → Resources → File sharing.
🛠️ First Launch Issues
Common Errors & Fixes
1. permission denied
errors
mkdir /run/s6-rc: permission denied
→ Make sure Docker Desktop has access to the folder (Windows: File sharing enabled + Admin privileges).