Hello!
So im running my syncthing server from IO, using this file:
syncthing:
container_name: syncthing
restart: always
image: linuxserver/syncthing
volumes:
- ${CONFIG}/syncthing:/config
- ${DATA}/syncthing-data:/mnt/data
ports:
- "8384:8384"
- "22000:22000"
- "21027:21027/udp"
environment:
- PUID=${PUID}
- PGID=${PGID}
- UMASK_SET=002
- TZ=${TZ}
IO guys never mentioned the local discovery issue by using docker standar network, i only find out when i looked at the description of the original image. Apparently automatic local discovery wont work by default, making transfers slow as they pass trough the relay servers. To fix this, you need to run the image with the option “network = host”, so the image connects directly to the host networks.
For this, the new compose would be:
syncthing:
container_name: syncthing
restart: always
image: linuxserver/syncthing
network_mode: host
volumes:
- ${CONFIG}/syncthing:/config
- ${DATA}/syncthing-data:/mnt/data
ports:
- "8384:8384"
- "22000:22000"
- "21027:21027/udp"
environment:
- PUID=${PUID}
- PGID=${PGID}
- UMASK_SET=002
- TZ=${TZ}
So:
1.- Its this correct?
2.- I dont need to declare ports anymore right?
3.- This is safe?, somewhere i read that host network mode its unsafe, should i be worried?
THanks for the help!