version: "3.9" networks: public: external: true services: syncthing: image: syncthing/syncthing container_name: syncthing hostname: ${SYNCTHING_HOSTNAME} restart: always volumes: - "./syncthing-data:/var/syncthing" environment: - "PUID=1000" - "PGID=1000" ports: # - "8384:8384" # Web UI - "22000:22000/tcp" # TCP file transfers - "22000:22000/udp" # QUIC file transfers - "21027:21027/udp" # Receive local discovery broadcasts networks: - public labels: - "traefik.enable=true" - "traefik.http.routers.syncthing.rule=Host(`${SYNCTHING_DOMAIN}`)" - "traefik.http.routers.syncthing.service=syncthing-service" - "traefik.http.services.syncthing-service.loadbalancer.server.port=8384" - "traefik.http.routers.syncthing.tls=true" - "traefik.http.routers.syncthing.tls.certresolver=le"