Syncthing

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.

๐Ÿ”ง What Syncthing Does

๐Ÿš€ Docker Installation Steps

  1. Update your system
    sudo apt update && sudo apt upgrade -y
  2. Install Docker
    curl -fsSL https://get.docker.com -o get-docker.sh
    sudo sh get-docker.sh
  3. Install Docker Compose
    sudo apt install docker-compose-plugin
  4. Add your user to the Docker group
    sudo usermod -aG docker $USER
  5. Enable Docker at boot
    sudo systemctl enable docker
  6. Reboot
    sudo reboot
  7. Test Docker
    docker run hello-world

๐Ÿ“ Setup Syncthing

Do this on the source and target devices:

mkdir ~/docker
mkdir ~/docker/syncthing

๐Ÿงพ Docker Compose File

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

โ–ถ๏ธ Start Syncthing

From within ~/docker/syncthing on the source and target run:

docker compose up

๐Ÿ“œ View Logs

docker logs syncthing

๐ŸŒ Access Web Interface

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:

โ˜• Buy Me a Coffee