Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
syncthing [2022/05/10 13:47] – angelegt 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 ===== +__Location: Syncthing WebInterface__
- +
-  * 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. +
- +
- +
- +
- +
-===== Setup ===== +
- +
-==== Syncthing ==== +
- +
-<code> +
-aptitude install syncthing firefox +
- +
-groupadd -g 44834 sw-it +
-groupadd -g 46202 syncthing +
-adduser -uid 46202 --gid 44834 syncthing +
- +
-systemctl enable syncthing@syncthing.service +
-systemctl start syncthing@syncthing.service +
-</code> +
- +
- +
-==== Discovery Server ==== +
- +
-  aptitude install syncthing-discosrv+
      
-  systemctl enable stdiscosrv.service +  Actions | Advanced | Options | 
-  systemctl start stdiscosrv.service +    Always Local Nets: 10.0.0.0/8 
-    +    Global Announce Enabled[+] 
-** Auto generated certificate and key files** +    Global Announce Servers: https://vm-syncthing-lin.physik.privat:8443/?id=CGEGPGG-CDYSKXM-2GJ66WV-TWI5QIB-Y556QOB-KLBD4YR-ZRQC4TT-WF2TDA2 
- +    Listen Addresses: tcp4://:22000 
-If no certificate and key is given, stdiscosrv automatically genereate cert.pem and key.pem in **/var/lib/syncthing/discosrv/**+     
 +==== Server (vm-syncthing-lin) ====
      
-:!if the certificate and key under /var/lib/syncthing/disosrv changes then the DEVICE ID of the discovery server changes also+  Folders | syncthing-osx | Edit | 
 +    General 
 +      Folder IDsynchting-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
      
-==== NFS ==== 
  
-  aptitude install nfs-common 
  
-  cat <<EOS >>/etc/fstab +===== Macos =====
-  fs.physik.privat:/intern-storage/it/Master-Files/syncthing-osx /home/syncthing/syncthing-osx            nfs     vers=3,nodev,nofail 0 0 +
-  EOS +
- +
-  mount /home/syncthing/syncthing-osx   +
-==== Debian Bullseye ====+
  
 <code> <code>
-__VMware WebConsole__+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>
  
-Install 
-# Select a language  
-  Language: English 
  
-# Select your location +<code> 
-  Country, territory or areaother | Europe | Germany+__LocationWebInterface on Syncthing client__ 
 +</code>
  
-# Configure locales 
-  Country to base default locale settings on: United States - en_US.UTF-8 
  
-# Configure the keyboard +<code> 
-  Keymap to useGerman+Always Local nets10.0.0.0/
  
-# Loading additional components ....+Global Announce Enabled: +
  
-# <network configuration> +GlobalAnnounce Servers: https://vm-syncthing:8443/?id=FJHL5W6-BX2SXUB-JPV5FRY-SBZ2MFZ-QIGC6KJ-TIIDP56-K7FCAXC-BA5OVAH
  
-# Configure the network +Listen Addressestcp4://:22000 
-  Hostnamevm-syncthing-lin +</code>
-  Domain namephysik.privat+
  
-# Set up users and passwords 
-  Root password: *** 
-  Re-enter password to verify: *** 
-    
-# Set up users and passwords 
-  Full name for the new user: install 
-  Username for your account: install 
-  Choose a passowrd für the new user: *** 
-  Re-enter password to verify: *** 
  
-# Partition disks +===== Path =====
-  Partitioning method: Manual +
-  SCSI1 (0,0,0) (sda) - 26.8 GB VMware Virtual disk +
-    Create new empyt partiton table on this device? <Yes> +
-      #1 primary  4.0 GB  f  swap  swap +
-      #2 primary 22.8 GB  f  ext4  / +
-  Finish partitioning and write changes to disk | <Yes>+
  
-# Installing the base sytem ...+<code> 
 +launchctl unload /Library/LaunchDaemons/syncthing.plist 
 +rm /var/root/bin/syncthing 
 +rm -r /var/root/Library/Application\ Support/Syncthing/ 
 +rm /Library/LaunchDaemons/syncthing.plist
  
-# Configure the package manager +rm -r /var/root/syncthing-osx
-  Scan extra installation media? <No> +
-  Use a network mirror? <Yes> | Germany | ftp.uni-stuttgart.de | <Continue>+
  
-# Configuring apt ... +</code>
- +
-# Select and install software ... +
- +
-# Configuring popularity-contest +
-  Participae in the package usage survey? <No> +
- +
-# Software selection +
-  [ ] Debian desktop environment   +
-  [ ] ... GNOME +
-  [...] +
-  [*] SSH server +
-  [*] standard system utilities +
- +
-# Install the GRUB boot loader +
-  Install the GRUB boot loader to your primary drive? <Yes> +
-  Device for boot loader installation: /dev/sda+
      
-# Finishing the installation +===== CheckMK =====
-  Installation complete. <Continue>+
  
-<system reboots>+<code> 
 +mkdir -p /usr/local/bin 
 +cd /usr/local/bin 
 +ln -s /var/root/syncthing-osx/usr/local/bin/check_mk_agent 
 +cd /etc 
 +ln -s /var/root/syncthing-osx/etc/mrpe.cfg mrpe.cfg 
 +ln -s /var/root/syncthing-osx/etc/check_mk check_mk
  
-# SSH: enable root login 
-ssh -l install vm-syncthing-lin 
-  su - root 
-    sed -i '/PermitRootLogin.*/ a\PermitRootLogin yes' /etc/ssh/sshd_config 
-    systemctl restart sshd 
-    exit 
-  exit 
  
-# remove user: install +</code>
-ssh -l root vm-syncthing-lin +
-  deluser --remove-all-files install+
  
-# enable login via ssh-key 
-mkdir -p /root/.ssh 
-scp root@ltspmaster.physik.privat:.ssh/authorized_keys /root/.ssh/ 
  
 +===== Docs =====
  
-apt install aptitude+  * Global Discovery: https://docs.syncthing.net/users/security.html
  
-cat<< EOS >>/etc/apt/sources.list +{{tag>syncthing}}
-deb http://ftp.uni-stuttgart.de/debian/ bullseye main +
-deb-src http://ftp.uni-stuttgart.de/debian/ bullseye main+
  
-# bullseye-updates, to get updates before a point release is made; 
-# 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)