10: Syncthing - File Synchronization
Syncthing provides continuous, peer‑to‑peer file synchronization across devices. For configuration reference and advanced topics (relays, discovery, ignore patterns), see the official Syncthing documentation.
Dependency check
- Required: Docker (Chapter 3)
- Optional: Traefik (Chapter 4) + subdomain (Chapter 4.5) for HTTPS/UI exposure
- Optional: Borgmatic (Chapter 6) for file data protection
Prerequisites
- ✅ Docker running (Chapter 3)
- ✅ Optional: Traefik installed (Chapter 4) + subdomain (Chapter 4.5), e.g.,
sync.example.com - ✅ Optional: Borgmatic installed (Chapter 6) for backups
Installation via Infinity Tools
Menu Installation
📱 APPLICATIONS → Syncthing → Install
CLI Installation
sudo bash /opt/InfinityTools/Solutions/setup-syncthing.sh --install
Traefik Integration
Select Traefik mode to expose the web UI via HTTPS and a domain:
labels:
- "traefik.enable=true"
- "traefik.http.routers.syncthing.rule=Host(`sync.example.com`)"
- "traefik.http.routers.syncthing.entrypoints=websecure"
- "traefik.http.routers.syncthing.tls.certresolver=myresolver"
- "traefik.http.services.syncthing.loadbalancer.server.port=8384" # Syncthing GUI
networks:
- proxy
Standalone Access
Without Traefik, map the GUI port directly and use self‑signed HTTPS:
ports:
- "8384:8384" # Web GUI (HTTPS)
# Syncthing protocol ports are internal to the container; peers connect via relay/UPnP/NAT traversal
Data & Configuration
volumes:
- /opt/speedbits/syncthing/config:/var/syncthing
- /opt/speedbits/syncthing/Documents:/sync/Documents
- /opt/speedbits/syncthing/Photos:/sync/Photos
Security & Hardening
- Set GUI credentials (Settings → GUI)
- Restrict GUI to 0.0.0.0 only when behind Traefik; otherwise bind locally and reverse‑proxy
- Consider IP allowlists via Traefik middleware for WAN exposure
Device Pairing
- Retrieve Device ID from each peer (web UI → Actions → Show ID)
- Add remote devices by ID; accept on the peer
- Share specific folders with your peer device
Ignore Patterns
Use .stignore to exclude files:
# /opt/speedbits/syncthing/Documents/.stignore
*.tmp
.cache/
node_modules/
Operational Checks
# Containers
sudo docker ps | grep syncthing
# Logs
sudo docker logs syncthing --since 10m
Troubleshooting
- Ensure DNS resolves
sync.example.comif using Traefik - Confirm the GUI is reachable via Traefik or mapped port
- Validate folder permissions (UID/GID 1000 by default in LinuxServer images)
For advanced networking (relay servers, global discovery, NAT traversal), consult the Syncthing docs.
No comments to display
No comments to display