Skip to content

Syncthing

Description⚓︎

Syncthing is a continuous file synchronization program. Synchronizes files between two or more computers in real time

Note

This service is deployed on multiple machines
I personally use bare metal installation

Bare Metal⚓︎

Basic info⚓︎

Basic info with official links

Getting started⚓︎

  • Install Syncthing package

    Bash
    sudo pacman -Sy syncthing
    
  • Start and Enable syncthing service

    Bash
    sudo systemctl enable --now syncthing@$USER.service
    

  • Allow Web-GUI to be accesible to all addresses:

    Bash
    sed -i 's/127.0.0.1:8384/0.0.0.0:8384/' ~/.config/syncthing/config.xml
    

  • Restart Syncthing service

    Bash
    sudo systemctl restart syncthing@$USER.service
    

  • Allow syncthing through firewall

Warning

If you have selinux or apparmor enabled, create a policy allowing syncthing

Docker⚓︎

Basic info⚓︎

Basic info with official links

docker compose.yml⚓︎

YAML
---
version: "3.1"
services:
  syncthing:
    image: linuxserver/syncthing:latest
    container_name: sync
    hostname: syncthing #optional
    networks:
      - proxy # rename this to your custom docker network
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
    volumes:
      - "${CFG_DIR}/syncthing:/config"
      - /home/$USER:/home_dir
      - /:/root_dir
    labels:
      traefik.enable: true
      traefik.http.services.portainer.loadbalancer.server.port: 8384
    ports:
      - 8384:8384
      - 22000:22000/tcp
      - 22000:22000/udp
      - 21027:21027/udp
    restart: unless-stopped

networks:
  proxy:    # rename this to your custom docker network.
    external: true

deploy.sh⚓︎

Bash
mkdir -p "${CFG_DIR}"/syncthing
docker compose up -d