Syncthing File Synchronization
Continuous file synchronization between devices with encryption and web UI.
[i]Overview
Syncthing is a continuous file synchronization program that synchronizes files between two or more computers in real time using peer-to-peer technology, eliminating the need for cloud storage services or central servers. Originally developed in 2013 as an open-source alternative to proprietary sync solutions, Syncthing encrypts all data end-to-end and operates entirely on your own devices, making it ideal for privacy-conscious users and organizations with strict data sovereignty requirements. This deployment combines Syncthing with NGINX to create a robust file synchronization platform where NGINX acts as a reverse proxy, providing SSL termination, rate limiting, and enhanced security for the Syncthing web interface. The NGINX proxy enables secure remote access to Syncthing's management interface while protecting it from direct internet exposure, allowing administrators to manage sync relationships and monitor transfer status through a properly secured web interface. This combination is perfect for small teams, home labs, and organizations that need reliable file synchronization without relying on third-party cloud providers, offering complete control over data location and access while maintaining the convenience of modern sync solutions.
[*]Key Features
- [+]Peer-to-peer file synchronization without central servers or cloud dependency
- [+]End-to-end AES encryption for all synchronized data with perfect forward secrecy
- [+]Real-time conflict detection and resolution with versioning support
- [+]Cross-platform device support including Windows, macOS, Linux, Android, and FreeBSD
- [+]Selective folder synchronization with ignore patterns and partial sync capabilities
- [+]NGINX reverse proxy with SSL termination and rate limiting for secure web interface access
- [+]Block-level delta sync to minimize bandwidth usage on large files
- [+]Web-based GUI for device management, folder configuration, and sync monitoring
[#]Common Use Cases
- [1]Home office setups synchronizing documents between desktop, laptop, and mobile devices
- [2]Small development teams sharing code repositories and documentation without GitHub dependency
- [3]Photography studios synchronizing RAW files and edited photos across workstations
- [4]Family file sharing for photos, videos, and documents without cloud storage fees
- [5]Remote workers maintaining synchronized project files across multiple locations
- [6]Organizations with data sovereignty requirements keeping files on-premises
- [7]Home lab enthusiasts creating personal cloud storage with multiple devices
[!]Prerequisites
- [!]Minimum 256MB RAM available for Syncthing and 64MB for NGINX reverse proxy
- [!]Open ports 8384 (web UI), 22000 (sync protocol), and 21027 (discovery) on firewall
- [!]SSL certificates configured in NGINX for secure remote access to web interface
- [!]Sufficient disk space on sync folders with at least 10% free space buffer
- [!]Network connectivity between all devices that will participate in sync relationships
- [!]Understanding of folder sharing permissions and device trust relationships
[!]
WARNING: For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
[$]docker-compose.yml
[docker-compose.yml]
1services: 2 syncthing: 3 image: lscr.io/linuxserver/syncthing:latest4 environment: 5 PUID: 10006 PGID: 10007 TZ: ${TZ}8 ports: 9 - "8384:8384"10 - "22000:22000/tcp"11 - "22000:22000/udp"12 - "21027:21027/udp"13 volumes: 14 - syncthing_config:/config15 - syncthing_data:/data16 networks: 17 - syncthing-net18 restart: unless-stopped1920 nginx: 21 image: nginx:alpine22 ports: 23 - "80:80"24 - "443:443"25 volumes: 26 - ./nginx.conf:/etc/nginx/nginx.conf:ro27 depends_on: 28 - syncthing29 networks: 30 - syncthing-net31 restart: unless-stopped3233volumes: 34 syncthing_config: 35 syncthing_data: 3637networks: 38 syncthing-net: 39 driver: bridge[$].env Template
[.env]
1# Timezone2TZ=UTC34# User/Group IDs5PUID=10006PGID=1000[i]Usage Notes
- [1]Web UI at http://localhost:8384
- [2]Add devices via device ID
- [3]End-to-end encryption
- [4]No central server required
Individual Services(2 services)
Copy individual services to mix and match with your existing compose files.
syncthing
syncthing:
image: lscr.io/linuxserver/syncthing:latest
environment:
PUID: 1000
PGID: 1000
TZ: ${TZ}
ports:
- "8384:8384"
- 22000:22000/tcp
- 22000:22000/udp
- 21027:21027/udp
volumes:
- syncthing_config:/config
- syncthing_data:/data
networks:
- syncthing-net
restart: unless-stopped
nginx
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- syncthing
networks:
- syncthing-net
restart: unless-stopped
[>]Quick Start
[terminal]
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 syncthing:5 image: lscr.io/linuxserver/syncthing:latest6 environment:7 PUID: 10008 PGID: 10009 TZ: ${TZ}10 ports:11 - "8384:8384"12 - "22000:22000/tcp"13 - "22000:22000/udp"14 - "21027:21027/udp"15 volumes:16 - syncthing_config:/config17 - syncthing_data:/data18 networks:19 - syncthing-net20 restart: unless-stopped2122 nginx:23 image: nginx:alpine24 ports:25 - "80:80"26 - "443:443"27 volumes:28 - ./nginx.conf:/etc/nginx/nginx.conf:ro29 depends_on:30 - syncthing31 networks:32 - syncthing-net33 restart: unless-stopped3435volumes:36 syncthing_config:37 syncthing_data:3839networks:40 syncthing-net:41 driver: bridge42EOF4344# 2. Create the .env file45cat > .env << 'EOF'46# Timezone47TZ=UTC4849# User/Group IDs50PUID=100051PGID=100052EOF5354# 3. Start the services55docker compose up -d5657# 4. View logs58docker compose logs -f[>]One-Liner
Run this command to download and set up the recipe in one step:
[terminal]
1curl -fsSL https://docker.recipes/api/recipes/syncthing-file-sync/run | bash[?]Troubleshooting
- [!]Syncthing GUI shows 'Connection refused': Check that port 8384 is accessible and not blocked by firewall
- [!]Devices not discovering each other: Verify port 21027/UDP is open for local discovery protocol
- [!]Sync stuck at 0% with large files: Increase Syncthing's bandwidth limits in advanced settings
- [!]NGINX 502 Bad Gateway errors: Ensure Syncthing container is running and accessible on port 8384
- [!]Files not syncing despite connection: Check folder permissions and verify both devices have read/write access
- [!]High CPU usage during sync: Enable Syncthing's built-in rate limiting to reduce resource consumption
Community Notes
Loading...
Loading notes...
## Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Shortcuts: C CopyF FavoriteD Download