Dies ist eine alte Version des Dokuments!


vm-syncthing-lin.physik.privat

Virtual machine hosted on our ESX-Server:

FQDN: vm-syncthing-lin.physik.privat
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/#

Synced Folders

  • /home/syncthing/syncthing-osx
    content is mounted by nfs from fs.physik.privat:/intern-storage/it/Master-Files/syncthing-osx

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.

Show logs on vm-syncthing-lin

Log files for the syncthing service and the disovery services are availiable via systemd's journalctl:

journalctl -f -u syncthing-discosrv
journalctl -f -u syncthing@syncthing.service

IDs und URLs

Device ID: GD42MSP-F4LDLEK-WZLRDAN-VAKCLCA-CQG7VWI-LFFYS2S-6ACHZ6U-XTS55QZ
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.

Setup

Syncthing

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

Discovery Server

aptitude install syncthing-discosrv

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/

:!: 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
cat <<EOS >>/etc/fstab
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

__VMware WebConsole__

Install
# Select a language 
  Language: English

# Select your location
  Country, territory or area: other | Europe | Germany

# Configure locales
  Country to base default locale settings on: United States - en_US.UTF-8

# Configure the keyboard
  Keymap to use: German

# Loading additional components ....

# <network configuration> 

# Configure the network
  Hostname: vm-syncthing-lin
  Domain name: physik.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
  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 ...

# Configure the package manager
  Scan extra installation media? <No>
  Use a network mirror? <Yes> | Germany | ftp.uni-stuttgart.de | <Continue>

# Configuring apt ...

# 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
  Installation complete. <Continue>

<system reboots>

# 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
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/


apt install aptitude

cat<< EOS >>/etc/apt/sources.list
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



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