Skip to main content

Bookstack Proxmox VE Community Script

BookStack

Installing überBookstack via Proxmox Communitycommunity Scriptsscripts installierenis

Dievery Installationeasy. vonIt BookStackis überinstalled dievia Proxmox VE Community Scripts ist sehr einfach. Sie erfolgt über dieses Skript:
this Proxmox VE Community Script: Bookstack

.

DasIt Skriptsetups erstellta einenlxc LXC-Containercontainer mitwith Debian und installiert sowie konfiguriert alles Notwendige.

Betriebssystem im Container (Stand Beispiel):

root@lxc-bookstack:~# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.2
ID=debian
...HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@lxc-bookstack:~# 

MariaDB-Datenbankand (Beispiel-Status):installs and configures a MariaDB database

root@lxc-bookstack:~# systemctl status mariadb --no-pager
● mariadb.service - MariaDB 12.2.1 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: enabled)
    Drop-In: /etc/systemd/system/mariadb.service.d
             └─migrated-from-my.cnf-settings.conf
     Active: active (running) since Sun 2025-12-14 14:15:56 UTC; 19min ago
...

Backup

ZumTo Sichernbackup derbookstack BookStack-Dateienfiles undand Inhalteentries, gibtthere esis eina integriertescli CLI-Tool.tool which can be used.

  • VerbindeEnter dichthe direktLXC mitdirectly demor LXC-Container (z. B. über die Proxmox-Konsole oderuse pct enter <CTID>) to access the LXC container.
  • Wechslechange ininto dasthe BookStack-Verzeichnis:bookstack
    folder cd /opt/bookstack
    
  • Starteexecute denthe Backup-Befehl:cli cmd to backup
    root@lxc-bookstack:~# cd /opt/bookstack/
    root@lxc-bookstack:/opt/bookstack# ./bookstack-system-cli backup
    

Beispielausgabe:

WARNING: This CLI is in alpha testing.
There's a high chance of issues, and the CLI API is subject to change.

Checking system requirements...
Dumping the database via mysqldump...
Adding database dump to backup archive...
Adding BookStack upload folders to backup archive...
Adding BookStack theme folders to backup archive...
Saving backup archive...
Backup finished.
Output ZIP saved to: /opt/bookstack/storage/backups/bookstack-backup-2025-12-14-143913.zip

Die fertige Sicherung liegt dann als ZIP-Datei im Verzeichnis root@lxc-bookstack:/opt/bookstack/storage/backups/.

Restore (Wiederherstellen)

Um ein Backup wiederherzustellen, gehe wie folgt vor:

    Verbinde dich mit dem LXC-Container Wechsle ins BookStack-Verzeichnis:
    cd /opt/bookstackbookstack# 
    
    Starte den

    Restore

    Restore-Befehl

    To undrestore giba denbackup, Pfadlog zurin ZIP-Dateito an:the BookStack LXC and change into the BookStack installation directory. From there, run the BookStack system CLI with the restore command and provide the path to the backup file.

    root@lxc-bookstack:/opt/bookstack# ./bookstack-system-cli restore storage/backups/bookstack-backup-2025-12-12-162653.zip
    

    During

    the

    Währendrestore desprocess, Vorgangs zeigt diethe CLI einewill Zusammenfassungdisplay desa Backup-Inhaltssummary undof warntthe vorcontents denfound Auswirkungen:in the backup and warn about the implications of restoring:

    • BestehendeExisting Dateienfiles undand hochgeladeneuploaded Inhaltecontent werdenwill überschriebenbe overwritten
    • VorhandeneExisting Datenbanktabellendatabase werdentables gelöschtwill be dropped
    • DieThe Zielinstanztarget mussinstance diemust gleichebe oderthe einesame neuereor BookStack-Versiona habennewer BookStack version
    • Server-seitigelevel Konfigurationenconfiguration (z.is B.not /etc/...) werden nicht wiederhergestelltrestored

    DuYou wirstwill vorbe derprompted eigentlichento Ausführungconfirm zurbefore Bestätigungthe aufgefordert.restore is executed.

    WichtigerPermissions Hinweisnote zuwhen Berechtigungenrestoring beimfrom Restoreoutside vonthe außerhalb des Containerscontainer

    DieserThis Abschnittprobably behandeltsolves einthe häufigissue auftretendesyou Problem,might wennencounter manafter nacha einemrestore Restorewhen keineyou Dateienwant mehrto hochladenupload kann.files.

    WennIf duyou dasmounted LXC-Root-Dateisystemthe aufLXC demroot Proxmox-Hostfilesystem gemounteton hastthe undProxmox dashost Backupand voncopied außena inbackup deninto Containerthe kopiertcontainer hast,from outside, führedo not run bookstack-system-cli niemalson direktthe aufhost dem Host aussystem. DasRunning führtthe zuCLI falschenoutside Datei-Eigentümernthe undcontainer -Berechtigungen.can result in incorrect file ownership and permissions.

    FallsIf dasthis Problemhas bereitsalready aufgetretenhappened, ist,the kannstpermissions ducan diebe Berechtigungencorrected vomfrom Proxmox-Hostthe ausProxmox korrigieren:host.

    BeispielIn (angenommenthe Container-following example, the BookStack container ID =is 120):120. Adjust this value to match your environment.

    # LXC-Root-DateisystemMount mountenthe LXC root filesystem
    pct mount 120
    # → mounted CT 120 in '/var/lib/lxc/120/rootfs'
    
    # InChange dasinto BookStack-Verzeichnisthe wechselnBookStack directory
    cd /var/lib/lxc/120/rootfs/opt/bookstack
    
    # AktuelleInspect Eigentümercurrent prüfenownership
    ls -l
    

    BeispielausgabeExample (falsch):output:

    root@pve:/var/lib/lxc/120/rootfs/opt/bookstack# ls -l
    total 755
    drwxr-xr-x 23 100033 100033     23 Dec 14 12:52 app
    -rwxr-xr-x  1 100033 100033   1685 Dec 14 12:52 artisan
    

    KorrekturTo dercorrect Berechtigungen:the ownership, apply the following command:

    chown -R 100033:100033 *
    

    In dieserthis Installationsetup, entsprichtthe UID and GID 100033:100033 demcorrespond Benutzerto und der Gruppethe www-data innerhalbuser desand Containers.group inside the container.

    Hinweis:Hint

    Der Befehl

    Using php artisan bookstack:regenerate-permissions behebtdoes keinenot Dateisystem-Berechtigungenfix oderfile Eigentümer.ownership Eror kannfilesystem diesespermissions. ProblemAs nichtsuch, lösen.it cannot be used to resolve this issue.

    Empfohlene Vorgehensweise (Best Practice):

    practice
      is LXC-Root-Dateisystem mounten (pctto mount <CTID>)the Backup-ZIP-DateiLXC anroot denfilesystem richtigenon Ortthe kopierenhost, Sofortcopy diethe Berechtigungenbackup korrigierenfile (chowninto -Rplace, 100033:100033immediately ...)correct Dateisystemownership wiederand unmountenpermissions, (pctthen unmount <CTID>)the Inroot denfilesystem. ContainerAfter wechseln (pctthat, enter <CTID>)the undcontainer denand Restore-Befehlexecute ausführenthe restore

      Socommands. bleibenThis dieensures Berechtigungenthat durchgehendcorrect korrekt.permissions are maintained throughout the entire process.