Inhaltsverzeichnis

Container 'pad'

Ressourcen

System

Dienste

Installation

Etherpad-Lite

  1. Git installieren
    • sudo apt-get install git
  2. Benutzer anlegen
    • sudo useradd -m -c „Etherpad“ etherpad -s /bin/bash
  3. NodeJS und npm installieren
  4. pnpm installieren
    • sudo npm install -g pnpm
  5. Etherpad-Lite installieren
  6. Etherpad-Standard-Konfiguration kopieren
    • sudo -u etherpad cp /opt/etherpad-lite/settings.json.template /opt/etherpad-lite/settings.json
  7. Etherpad-Konfiguration anpassen
    ...
      "skinName": "colibris",
    ...
      "ip": "10.2.0.3",
      "port": 9001,
    ...
      /*
      "dbType": "dirty",
      "dbSettings": {
        "filename": "var/dirty.db"
      },
      */
    ...
      "dbType" : "mysql",
      "dbSettings" : {
        "user":     "XXXXXXXX",
        "host":     "10.3.0.100",
        "port":     3306,
        "password": "XXXXXXXXX",
        "database": "etherpadlite",
        "charset":  "utf8mb4"
      },
    ...
      "trustProxy": true,
    ...
  8. Etherpad-Abhängigkeiten updaten
    • sudo su - etherpad
    • cd /opt/etherpad-lite
    • pnpm i
    • pnpm run build:etherpad
    • exit
  9. Plugins installieren
    • sudo su - etherpad
    • cd /opt/etherpad-lite
    • pnpm run plugins i ep_pad-lister
    • exit
  10. systemd Unit einrichten
    [Unit]
    Description=Etherpad - real-time collaborative editor
    Documentation=https://etherpad.org https://github.com/ether/etherpad
    After=network-online.target
    Wants=network-online.target
     
    [Service]
    Type=simple
    User=etherpad
    Group=etherpad
    WorkingDirectory=/opt/etherpad-lite
    Environment=NODE_ENV=production
    ExecStart=pnpm run prod
    Restart=on-failure
    RestartSec=5s
    TimeoutStopSec=20s
     
    StandardOutput=journal
    StandardError=journal
    SyslogIdentifier=etherpad
     
    # --- Sandboxing ---------------------------------------------------------
    NoNewPrivileges=true
    ProtectSystem=strict
    PrivateTmp=true
    PrivateDevices=true
    ProtectKernelTunables=true
    ProtectKernelModules=true
    ProtectKernelLogs=true
    ProtectControlGroups=true
    ProtectHostname=true
    ProtectClock=true
    RestrictRealtime=true
    RestrictSUIDSGID=true
    RestrictNamespaces=true
    LockPersonality=true
    # Node's JIT needs W+X mappings
    MemoryDenyWriteExecute=false
    SystemCallArchitectures=native
    RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
    UMask=0027
    ReadWritePaths=/opt/etherpad-lite
     
    LimitNOFILE=65536
     
    [Install]
    WantedBy=multi-user.target
  11. systemd unit einlesen, aktivieren und starten
    • sudo systemctl daemon-reload
    • sudo systemctl enable --now etherpad.service

Backup mit Borgmatic

  1. Installation siehe mariadb
  2. Konfiguration
    ...
    source_directories:
      - /etc
      - /home
      - /opt
      - /root
      - /var/log
    ...