Skip to content

Install Syncthing with Docker Compose

(Written August 2025)

Abstract

How to install Syncthing so you can sync files between devices and take remote backups.

Prerequisites

Hardware requirements

  • RAM: Minimum 512Mb.
  • CPU: Minimum 1 cores, recommended 2 cores.

Install Syncthing

cd /home
mkdir docker
cd docker
mkdir data
mkdir config

Rights needed for Syncthing to access the data folder:

sudo chown -R 1000:1000 /home/docker/data

nano compose.yml

Paste:

services:
  syncthing:
    image: lscr.io/linuxserver/syncthing:latest
    container_name: syncthing
    hostname: syncthing #optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - /home/docker/config:/config
      - /home/docker/data:/data1
      #- /path/to/data2:/data2
    ports:
      - 8384:8384
      - 22000:22000/tcp
      - 22000:22000/udp
      - 21027:21027/udp
    restart: unless-stopped
docker compose up -d

Configure Syncthing

Go to the GUI: http://:8384

Set a password for login: syncthing

To add the /data1 share: syncthing syncthing

Give your Syncthing a name (this makes it easier to manage devices) syncthing

Add a remote device

syncthing

You will need to fill in a device ID: syncthing

You can find the device ID of the remote Syncthing server: syncthing

On your remote Syncthing server, you will need to accept it: syncthing

To select the data folder that you wish to sync. Go to your local Syncthing server and click edit: syncthing

Click the folder (you can add an encryption password) syncthing

On the remote cluster, accept the request: syncthing