Hosting Syncthing services
Hosting your onw instances of Syncthing discovery and relay services
I used syncthing-relay-discovery
by t4skforce for quite a while, but recently I found out that Syncthing Team publishes their own images for Relay
and Discovery
services.
In comparison to the t4skforces’s image, the new ones combined are half the size:
$ docker images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
syncthing/discosrv 2.0.16 e06d667325fa 2 weeks ago 28.7MB
syncthing/relaysrv 2.0.16 1398765edf65 2 weeks ago 22.4MB
So, without much ado, I created a docker-compose.yaml and reused my existing certificates:
services:
relaysrv:
image: syncthing/relaysrv:2.0.16
container_name: sync-relay
restart: always
ports:
- "22067:22067" # Relay data port
#- "22070:22070" # Status/statistics port
volumes:
- ./certs/cert.pem:/var/strelaysrv/cert.pem
- ./certs/key.pem:/var/strelaysrv/key.pem
environment:
- PUID=1000
- PGID=1000
command: ["-pools="]
discosrv:
image: syncthing/discosrv:2.0.16
container_name: sync-disco
restart: always
ports:
- "8443:8443" # Discovery protocol port
#- "19200:19200" # Status/metrics port
volumes:
- ./certs/cert.pem:/var/stdiscosrv/cert.pem
- ./certs/key.pem:/var/stdiscosrv/key.pem
- ./discosrv-data/records.db:/var/stdiscosrv/records.db
environment:
- PUID=1000
- PGID=1000