Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
syncthing [2022/05/11 15:16] mb1591syncthing [2022/06/24 09:00] (aktuell) mb1591
Zeile 1: Zeile 1:
-====== vm-syncthing-lin.physik.privat ======+====== Syncthing ======
  
-Virtual machine hosted on our ESX-Server:+===== Access GUI on vm-syncthing-lin =====
  
-  FQDNvm-syncthing-lin.physik.privat +__LocationTerminal__
-  IP: 10.4.78.68 +
-  MAC: 00:95:79:f9:02:13 +
-===== Administration ===== +
- +
-** Access Syncthing GUI in Browser **+
  
   ssh -l root vm-syncthing-lin -X firefox http://localhost:8384/#   ssh -l root vm-syncthing-lin -X firefox http://localhost:8384/#
  
-** Synced Folders **+__Location: Firefox__  
  
-  /home/syncthing/syncthing-osx\\ content is mounted by nfs from fs.physik.privat:/intern-storage/it/Master-Files/syncthing-osx+  https://localhost:8384/#
  
-The synced folder syncthing-osx on vm-syncthing-lin is set to **Send Only**.\\ The synced folders on the client devices are set to **Recieve Only**.\\  
-This means that changes are only synced from vm-syncthing-osx top-down to the clients.  
  
 +===== Access GUI on MacOS Clients =====
 +  
 +__Location: Terminal__
  
-** Show logs on vm-syncthing-lin **+  # tunnel port 8384 via ssh 
 +  ssh --L 8384:127.0.0.1:8384 root@${_CLIENT_FQDN}
  
-Log files for the syncthing service and the disovery services are availiable via systemd's journalctl:+__LocationLocal browser__  
  
-  journalctl -f -u syncthing-discosrv +  # access gui in local browser 
-  journalctl -f -u syncthing@syncthing.service+  https://localhost:8384/#
  
-** IDs und URLs ** 
  
-  Device ID: GD42MSP-F4LDLEK-WZLRDAN-VAKCLCA-CQG7VWI-LFFYS2S-6ACHZ6U-XTS55QZ +===== GUI Configuration =====
-  Server Device ID: CGEGPGG-CDYSKXM-2GJ66WV-TWI5QIB-Y556QOB-KLBD4YR-ZRQC4TT-WF2TDA2 +
-  Server URL: https://vm-syncthing-lin.physik.privat:8443/?id=CGEGPGG-CDYSKXM-2GJ66WV-TWI5QIB-Y556QOB-KLBD4YR-ZRQC4TT-WF2TDA2 +
- +
-===== FAQ ====+
- +
-  * What happens if nfs share disappears from /home/syncthing/syncthing-osx\\ Syncthing detects this case,  because the folder .stfolder is missing and stops syncing files to the clients.\\ So the files on the client devices will not be deleted.+
  
 +__Location: Syncthing WebInterface__
 +  
 +  Actions | Advanced | Options |
 +    Always Local Nets: 10.0.0.0/8
 +    Global Announce Enabled: [+]
 +    Global Announce Servers: https://vm-syncthing-lin.physik.privat:8443/?id=CGEGPGG-CDYSKXM-2GJ66WV-TWI5QIB-Y556QOB-KLBD4YR-ZRQC4TT-WF2TDA2
 +    Listen Addresses: tcp4://:22000
 +    
 +==== Server (vm-syncthing-lin) ====
 +  
 +  Folders | syncthing-osx | Edit |
 +    General
 +      Folder ID: synchting-osx
 +      Folder Path: /home/syncthing/syncthing-osx
 +    GUI
 +      [+] Use HTTPS for GUI
 +    Advanced
 +      Full Rescan Interval (s): 20
 +      Folder Type: Recieve Only 
  
 +==== Clients (MacOS) ====
 +  
 +  Folders | syncthing-osx | Edit |
 +    General
 +      Folder ID: synchting-osx
 +      Folder Path: /var/root/syncthing-osx
 +    GUI
 +      [+] Use HTTPS for GUI
 +     Advanced
 +      Full Rescan Interval (s): 2600
 +      Folder Type: Send Only
 +  
  
  
-===== Setup ===== +===== Macos =====
- +
-==== Syncthing ====+
  
 <code> <code>
-aptitude install syncthing firefox+cp /var/root/Scripts/Syncthing/syncthing /usr/local/bin 
 +cp /var/root/Scripts/Syncthing/syncthing.plist /Library/LaunchAgents 
 +launchctl load /var/root/Library/LaunchAgents/syncthing.plist 
 +launchctl unload /var/root/Library/LaunchAgents/syncthing.plist 
 +</code>
  
-groupadd -g 44834 sw-it 
-groupadd -g 46202 syncthing 
-adduser -uid 46202 --gid 44834 syncthing 
  
-systemctl enable syncthing@syncthing.service +<code> 
-systemctl start syncthing@syncthing.service+__Location: WebInterface on Syncthing client__
 </code> </code>
  
  
-==== Discovery Server ====+<code> 
 +Always Local nets: 10.0.0.0/
  
-  aptitude install syncthing-discosrv +Global Announce Enabled+
-   +
-  systemctl enable stdiscosrv.service +
-  systemctl start stdiscosrv.service +
-    +
-** Auto generated certificate and key files**+
  
-If no certificate and key is given, stdiscosrv automatically genereate cert.pem and key.pem in **/var/lib/syncthing/discosrv/** +GlobalAnnounce Servershttps://vm-syncthing:8443/?id=FJHL5W6-BX2SXUB-JPV5FRY-SBZ2MFZ-QIGC6KJ-TIIDP56-K7FCAXC-BA5OVAH
-   +
-:!if the certificate and key under /var/lib/syncthing/disosrv changes then the DEVICE ID of the discovery server changes also +
-   +
-   +
-==== NFS ====+
  
-  aptitude install nfs-common+Listen Addresses: tcp4://:22000 
 +</code>
  
-  cat <<EOS >>/etc/fstab 
-  fs.physik.privat:/intern-storage/it/Master-Files/syncthing-osx /home/syncthing/syncthing-osx      nfs     vers=4,defaults,nofail 0 0 
-  EOS 
  
-  mount /home/syncthing/syncthing-osx   +===== Path =====
-==== Debian Bullseye ====+
  
-__Location: VMWare Webconsole__ 
 <code> <code>
-Debian Bullseye Basisinstallation +launchctl unload /Library/LaunchDaemons/syncthing.plist 
-  English, Germany, German +rm /var/root/bin/syncthing 
-  vm-synchting-lin.physik.privat +rm -r /var/root/Library/Application\ Support/Syncthing/ 
-  4GB Swap, 23GB root (ext4)     +rm /Library/LaunchDaemons/syncthing.plist 
-  Software selection: only SSH server & standard system utilities+ 
 +rm -r /var/root/syncthing-osx 
 </code> </code>
 +  
 +===== CheckMK =====
  
-__Location: Terminal__ 
 <code> <code>
-# SSH: enable root login +mkdir -p /usr/local/bin 
-ssh -l install vm-syncthing-lin +cd /usr/local/bin 
-  su - root +ln -s /var/root/syncthing-osx/usr/local/bin/check_mk_agent 
-    sed -i '/PermitRootLogin.*a\PermitRootLogin yes' /etc/ssh/sshd_config +cd /etc 
-    systemctl restart sshd +ln -s /var/root/syncthing-osx/etc/mrpe.cfg mrpe.cfg 
-    exit +ln -s /var/root/syncthing-osx/etc/check_mk check_mk
-  exit+
  
-# remove user: install 
-ssh -l root vm-syncthing-lin 
-  deluser --remove-all-files install 
  
-# enable login via ssh-key +</code>
-mkdir -p /root/.ssh +
-scp root@ltspmaster.physik.privat:.ssh/authorized_keys /root/.ssh/+
  
  
-apt install aptitude+===== Docs =====
  
-cat<< EOS >>/etc/apt/sources.list +  * Global Discovery: https://docs.syncthing.net/users/security.html
-deb http://ftp.uni-stuttgart.de/debianbullseye main +
-deb-src http://ftp.uni-stuttgart.de/debian/ bullseye main+
  
-# bullseye-updates, to get updates before a point release is made; +{{tag>syncthing}}
-# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports +
-# bullseye-updates, previously known as 'volatile' +
-deb http://ftp.uni-stuttgart.de/debian/ bullseye-updates main +
-deb-src http://ftp.uni-stuttgart.de/debian/ bullseye-updates main +
-EOS+
  
-aptitude install vim ufw 
- 
-ufw allow from 10.4.78.0/24 
-ufw allow from 10.5.81.0/24 
-ufw enable 
-</code> 

QR-Code
QR-Code Syncthing (erstellt für aktuelle Seite)