Skip to main content

Syncthing + FileBrowser Quantum

TheDer easiesteinfachste andund mostzuverlässigste reliableWeg wayist isdie toNutzung use thedes Proxmox VE Community Helper-ScriptScripts, whichdas automatesalles everythingautomatisiert (includinginkl. installingInstallation von Syncthing fromaus thedem Debian repo)Debian-Repository). ItEs createserstellt aneinen LXC withmit reasonablevernünftigen defaultsDefaults (~2GB2 GB RAM max, 2 cores—fineKerne for largeausreichend transfers,für lowgroße usageTransfers, normally)normalerweise niedriger Verbrauch).

Option 1: RecommendedEmpfohlenUse the Community Community-Script nutzen (Quickschnell & Easy)

einfach)

RunFühre thisdiesen singleeinen commandBefehl in theder Proxmox shellProxmox-Shell (nodeNode-Konsole) console):aus:

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/syncthing.sh)"
  • ItEs setserstellt upstandardmäßig aeinen privileged LXC by(einfachere defaultBerechtigungen (simplerfür permissionsgemountete for mounted storage)Speicher).
  • Syncthing installswird andzunächst runs initially asals root installiert und gestartet (commonüblich withbei scripts)solchen Scripts), butaber we'llwir switchwechseln ites tounten azu dedicatedeinem userdedizierten below.Benutzer.
  • AfterNach creation,der accessErstellung theerreichst Syncthingdu webdie Syncthing-Web-UI atunter http://<LXC-IP>:8384 (setbeim GUIersten authZugriff onGUI-Authentifizierung first access)einrichten).

Option 2: ManualManuelles Setup

lxc-setup-syncthinglxc-setup-syncthing

IfFalls youdu prefervolle fullKontrolle control:möchtest:

  1. In Proxmoxder Proxmox-UI: Create a newNeuen unprivileged LXC erstellen (Debian/BookwormBookworm-Template template recommended)empfohlen).

    • CPU: 2 coresKerne
    • RAM: 2048 MB (oroder adjust)anpassen)
    • Storage: 8-8–20 GB root diskRoot-Disk
    • Network: StaticStatische IP oroder DHCP
  2. LXC

    Startstarten, theKonsole LXC,öffnen openund console,Syncthing and install Syncthing:

    installieren:
apt update && apt upgrade -y
apt install syncthing -y

Post-Setup:

Nach Runder Einrichtung: Syncthing asals a Dedicateddedizierten Non-RootRoot-Benutzer Userbetreiben (Security Best Practice)

TheDas community scriptCommunity-Script (oroder manualdie install)manuelle oftenInstallation) startsstartet Syncthing asoft rootzunächst initially.als Switchroot. itWechsle tozu aeinem properrichtigen userBenutzer, toum avoidWarnungen warningszu andvermeiden reduceund risk.das Risiko zu senken.

  1. StopRoot-Service andstoppen disableund the root service:deaktivieren:
systemctl stop syncthing@root
systemctl disable syncthing@root
systemctl list-unit-files | grep syncthing # VerifyÜberprüfen, it'sdass disableddeaktiviert
  1. CreateDedizierten aSystem-Benutzer dedicated system user:erstellen:
adduser --system --group --home /var/lib/syncthing --shell /usr/sbin/nologin syncthing
  1. MigrateVorhandene existingKonfiguration configmigrieren (iffalls anyvon fromroot-Run root run)vorhanden):
mkdir -p /var/lib/syncthing/.config
cp -a /root/.config/syncthing/* /var/lib/syncthing/.config/ 2>/dev/null || true
chown -R syncthing:syncthing /var/lib/syncthing
  1. CreateDein andDaten-Verzeichnis secureerstellen yourund data directorysichern (e.g.,z. forB. yourfür shares)deine Shares):
mkdir /data
chown -R syncthing:syncthing /data
chmod -R 750 /data
  • Later,Später mountmountest yourdu Proxmoxhier storagedeinen hereProxmox-Speicher (e.g.,z. bind-mountB. Bind-Mount von /data/usera, /data/userb, /data/shared fromvom hostHost via Proxmox Proxmox-UI > LXC > Resources > Add MP).
  1. EnableAls andneuer startBenutzer asaktivieren theund new user:starten:
systemctl enable syncthing@syncthing
systemctl start syncthing@syncthing
systemctl status syncthing@syncthing # CheckPrüfen, it'sob runningläuft

Integrating

Integration withmit Yourdeinen FileBrowserFileBrowser-Shares

Shares

mountpoints

  • In Proxmox: AddBind-Mounts bindfür mountsdeine forHost-Verzeichnisse your host directories to thezum LXC hinzufügen (e.g.,z. mountB. hostHost /path/to/data/usera → LXC /data/usera). SeeSiehe aboveBild image.oben.
  • In Syncthingder Syncthing-UI: AddOrdner foldershinzufügen, pointingdie toauf /data/usera, /data/userb, /data/shared. zeigen.
    • Set "Send Only" forFür private userUser-Ordner folders„Send ifOnly“ laptopssetzen, shouldfalls receiveLaptops butnur notempfangen, pushaber changeskeine back.Änderungen zurückpushen sollen.
    • Full bi-directional forFür /data/shared. volle bidirektionale Synchronisation.

Konfigurationsdatei

Config File forfür FileBrowser Quantum

TheDie onlyeinzige wayMöglichkeit, to havedass FileBrowser Quantum showdie correctkorrekten usedgenutzten andund remainingverbleibenden sizeGrößen ofeines aMount-Points mountanzeigt, pointist, isjeden toMount-Point map each mount point as aals separate sourceSource in theder configConfig-Datei file.zu Thismappen. isSo howsieht minemeine looksaktuelle rightKonfiguration nowaus which mapssie eachmappt mountjeden pointMount-Point asals aSource, sourceund anddie theBenutzer usersbekommen willnur beZugriff grantedauf accessihren toeigenen heUser-Source sharedund sourceden andShared-Source. theirDadurch usersbleiben sourcedie only.Dinge Thisgetrennt, wayaber wees keepgibt thingseinen separatezentralen fromShare eachfür otheralle but have one central share for all the users of the system.System-Benutzer.

# FileBrowserQuantum Config File /syncthing-data/fbq-config.yaml
server:
  port: 8080
  externalUrl: "https://files.example.com"
  database: /syncthing-data/database.db
  sources:
  - path: /syncthing-data/home/usera
    name: Home UserA
    config:
      defaultEnabled: false
  - path: /syncthing-data/home/userb
    name: Home UserB
    config:
      defaultEnabled: false
  - path: /syncthing-data/shared
    name: Shared Drive
    config:
      defaultEnabled: true
  logging:
  - levels: info|warning|error
    apiLevels: info|warning|error
    output: stdout
    noColors: false
    utc: false
frontend:
  name: FileBrowser Quantum
auth:
  adminUsername: admin
userDefaults:
  permissions:
    api: false
    admin: false
    modify: false
    share: false
    realtime: false
    delete: false
    create: false
    download: false

ByDurch settingdiese itEinrichtung upkannst thisdu way,die you can then assign the sourcesSources in FilebrowserFileBrowser Quantum toden theBenutzern userzuweisen

image.pngimage.png

TheySie willerscheinen thendann appearauf ondem the Home Home-Screen onlinks themit leftden sidekorrekten with their correct usage values.Nutzungs-Werten.

image.png image.png


Hub-First Setup Reminder

Erinnerung
  • ConfigureOrdner folderskonfigurieren andund generate device Device-IDs onzuerst theauf Proxmoxdem hubProxmox-Hub first.generieren.
  • Then installDann Syncthing onauf yourdeinen laptop(Laptop(s), addinstallieren, thedie hub'sHub-Device-ID devicehinzufügen ID,und and connectverbinden (hubHub asals introducerIntroducer forfür easyeinfaches hub-Hub-and-spoke)Spoke-Setup).