Syncthing is a free, open-source, peer-to-peer file synchronization tool that lets you securely sync files across multiple devices without relying on cloud services or central servers.
sudo apt update && sudo apt upgrade -ycurl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh
sudo apt install docker-compose-pluginsudo usermod -aG docker $USERsudo systemctl enable dockersudo rebootdocker run hello-worldmkdir ~/docker mkdir ~/docker/syncthing
In ~/docker/syncthing, on the source and target devices, create docker-compose.yml
services:
syncthing:
image: syncthing/syncthing:latest
container_name: syncthing
network_mode: host
restart: unless-stopped
ports:
- "8384:8384" # Web GUI (changed host port to avoid conflicts)
volumes:
- ./config:/var/syncthing/config # Syncthing configuration
- ./data:/var/syncthing/data # Folder to sync
environment:
- PUID=1000 # Optional: host user ID
- PGID=1000 # Optional: host group ID
From within ~/docker/syncthing on the source and target run:
docker compose up
docker logs syncthing
Open your browser and go to "http://<SOURCE_DEVICE>:8384 and "http://<TARGET_DEVICE>:8384. You can now add a remote device in the GUI and start syncing directories.
If you find my content useful, please consider supporting this page: