tech:notes_syncthing
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tech:notes_syncthing [2025/03/31 14:59] – Jean-Baptiste | tech:notes_syncthing [2025/09/13 16:35] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Notes Syncthing | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | Voir aussi : | ||
| + | * '' | ||
| + | * **Ksync** qui utilise Syncthing pour synchroniser les containers (containers ou k8s) | ||
| + | |||
| + | |||
| + | ~~~bash | ||
| + | apt-get update | ||
| + | apt-get install syncthing | ||
| + | |||
| + | adduser --group --system syncthing --home / | ||
| + | ~~~ | ||
| + | |||
| + | ------ | ||
| + | |||
| + | Sur A | ||
| + | ~~~bash | ||
| + | syncthing --device-id | ||
| + | ~~~ | ||
| + | |||
| + | Sur B | ||
| + | ~~~bash | ||
| + | syncthing --device-id | ||
| + | ~~~ | ||
| + | |||
| + | Sur A | ||
| + | ~~~bash | ||
| + | syncthing cli config devices add --device-id $DEVICE_ID_B | ||
| + | ~~~ | ||
| + | |||
| + | Sur B | ||
| + | ~~~bash | ||
| + | syncthing cli config devices add --device-id $DEVICE_ID_A | ||
| + | #syncthing cli config folders $FOLDER_ID devices add --device-id $DEVICE_ID_B | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | Sur A | ||
| + | ~~~bash | ||
| + | mkdir ~/ | ||
| + | |||
| + | fid=$(uuidgen) | ||
| + | fid=${fid%%-*} | ||
| + | # syncthing cli config folders add --id $fid --label " | ||
| + | syncthing cli config folders add --id $fid --label " | ||
| + | |||
| + | syncthing cli config folders $fid devices add --device-id $DEVICE_ID_B | ||
| + | |||
| + | syncthing cli config folders list | ||
| + | ~~~ | ||
| + | |||
| + | Sur B | ||
| + | ~~~bash | ||
| + | syncthing cli config folders list | ||
| + | #syncthing cli config devices $DEVICE_ID_A auto-accept-folders set true | ||
| + | |||
| + | syncthing cli show pending folders | ||
| + | ##syncthing cli config folders add --label DATA_SYNCALL | ||
| + | |||
| + | syncthing cli config folders $FOLDER_ID devices add --device-id $DEVICE_ID_A | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ## Service | ||
| + | |||
| + | ### Service SystemD Lingering | ||
| + | |||
| + | Source : https:// | ||
| + | |||
| + | '' | ||
| + | ~~~ini | ||
| + | [Unit] | ||
| + | Description=Syncthing - Open Source Continuous File Synchronization | ||
| + | Documentation=man: | ||
| + | StartLimitIntervalSec=60 | ||
| + | StartLimitBurst=4 | ||
| + | |||
| + | [Service] | ||
| + | ExecStart=/ | ||
| + | Restart=on-failure | ||
| + | RestartSec=1 | ||
| + | SuccessExitStatus=3 4 | ||
| + | RestartForceExitStatus=3 4 | ||
| + | |||
| + | # Hardening | ||
| + | SystemCallArchitectures=native | ||
| + | MemoryDenyWriteExecute=true | ||
| + | NoNewPrivileges=true | ||
| + | |||
| + | # Elevated permissions to sync ownership (disabled by default), | ||
| + | # see https:// | ||
| + | # | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=default.target | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Autres | ||
| + | |||
| + | |||
| + | ~~~ | ||
| + | [ZUPOI] 13:18:34 INFO: TCP listener ([:: | ||
| + | 2024/10/01 13:18:34 connection doesn' | ||
| + | [ZUPOI] 13:18:34 INFO: QUIC listener ([:: | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ''/ | ||
| + | ~~~bash | ||
| + | # Bump maximum receive buffer size to roughly 7.5 MB for Syncthing - as per | ||
| + | # https:// | ||
| + | net.core.rmem_max=7500000 | ||
| + | net.core.wmem_max=7500000 | ||
| + | |||
| + | # | ||
| + | ~~~ | ||
| + | |||
| + | Activer inotify | ||
| + | |||
| + | ~~~bash | ||
| + | curl –s http:// | ||
| + | ~~~ | ||
| + | |||
| + | ~~~javascript | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ~~~ | ||
| + | |||
| + | Source : https:// | ||
| + | |||
| + | Dans la web UI (127.0.0.1: | ||
| + | |||
| + | Ensuite, pour chaque appareil, vérifier dans → Gérer → Avancé → Adresses = " | ||
| + | |||
| + | ~/ | ||
| + | |||
| + | ~~~xml | ||
| + | <!-- Changer à false --> | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | |||
| + | <!-- Supprimer --> | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | |||
| + | <!-- Changer partout " | ||
| + | fsWatcherDelayS=" | ||
| + | |||
| + | <!-- Changer gui enabled à " | ||
| + | <gui enabled=" | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | env GOMAXPROCS=2 syncthing -no-browser | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | find / | ||
| + | ~~~ | ||
| + | |||
| + | ## Ignore | ||
| + | |||
| + | '' | ||
| + | ~~~ | ||
| + | .git/ | ||
| + | ~~~ | ||
| + | |||
| + | |||
