Skip to main content

Bookstack Proxmox VE Community Script

Installing

BookStack Bookstack viaüber Proxmox communityCommunity scriptsScripts isinstallieren

very

Die easy.Installation Itvon isBookStack installedüber viadie thisProxmox VE Community Scripts ist sehr einfach. Sie erfolgt über dieses Skript:
Proxmox VE Community Script: Bookstack.

It

Das setupsSkript aerstellt lxceinen containerLXC-Container withmit 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:~#...

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

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

ToZum backupSichern bookstackder filesBookStack-Dateien andund entries,Inhalte theregibt ises aein cliintegriertes tool which can be used.CLI-Tool.

  • EnterVerbinde thedich LXCdirekt directlymit ordem useLXC-Container (z. B. über die Proxmox-Konsole oder pct enter <CTID> to access the LXC container.)
  • changeWechsle intoin thedas bookstackBookStack-Verzeichnis: folder
    cd /opt/bookstack
    
  • executeStarte theden cli cmd to backupBackup-Befehl:
    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
root@lxc-bookstack:

Die fertige Sicherung liegt dann als ZIP-Datei im Verzeichnis /opt/bookstack#bookstack/storage/backups/.

Restore (Wiederherstellen)

Um ein Backup wiederherzustellen, gehe wie folgt vor:

  1. Verbinde dich mit dem LXC-Container
  2. Wechsle ins BookStack-Verzeichnis:
    cd /opt/bookstack
    
  3. Starte

    Restore

    den

    ToRestore-Befehl restoreund agib backup,den logPfad inzur toZIP-Datei 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.

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

DuringWährend thedes restoreVorgangs process,zeigt thedie CLI willeine displayZusammenfassung ades summaryBackup-Inhalts ofund thewarnt contentsvor foundden in the backup and warn about the implications of restoring:Auswirkungen:

  • ExistingBestehende filesDateien andund uploadedhochgeladene contentInhalte willwerden be overwrittenüberschrieben
  • ExistingVorhandene databaseDatenbanktabellen tableswerden will be droppedgelöscht
  • TheDie targetZielinstanz instancemuss mustdie begleiche theoder sameeine orneuere aBookStack-Version newer BookStack versionhaben
  • Server-levelseitige configurationKonfigurationen is(z. notB. restored/etc/...) werden nicht wiederhergestellt

YouDu willwirst bevor promptedder toeigentlichen confirmAusführung beforezur theBestätigung restore is executed.aufgefordert.

PermissionsWichtiger noteHinweis whenzu restoringBerechtigungen frombeim outsideRestore thevon containeraußerhalb des Containers

ThisDieser probablyAbschnitt solvesbehandelt theein issuehäufig youauftretendes mightProblem, encounterwenn afterman anach restoreeinem whenRestore youkeine wantDateien tomehr uploadhochladen files.kann.

IfWenn youdu mounteddas theLXC-Root-Dateisystem LXCauf rootdem filesystemProxmox-Host ongemountet thehast Proxmoxund hostdas andBackup copiedvon aaußen backupin intoden theContainer containerkopiert from outside,hast, do not runführe bookstack-system-cli onniemals thedirekt hostauf systemdem Host aus. RunningDas theführt CLIzu outsidefalschen theDatei-Eigentümern containerund can result in incorrect file ownership and permissions.-Berechtigungen.

IfFalls thisdas hasProblem alreadybereits happened,aufgetreten theist, permissionskannst candu bedie correctedBerechtigungen fromvom theProxmox-Host Proxmoxaus host.korrigieren:

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

# MountLXC-Root-Dateisystem the LXC root filesystemmounten
pct mount 120
# → mounted CT 120 in '/var/lib/lxc/120/rootfs'

# ChangeIn intodas theBookStack-Verzeichnis BookStack directorywechseln
cd /var/lib/lxc/120/rootfs/opt/bookstack

# InspectAktuelle currentEigentümer ownershipprüfen
ls -l

ExampleBeispielausgabe output:(falsch):

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

ToKorrektur correctder the ownership, apply the following command:Berechtigungen:

chown -R 100033:100033 *

In thisdieser setup,Installation the UID and GIDentspricht 100033:100033 corresponddem toBenutzer theund der Gruppe www-data userinnerhalb anddes group inside the container.Containers.

HintHinweis:


UsingDer Befehl php artisan bookstack:regenerate-permissions doesbehebt notkeine fixDateisystem-Berechtigungen fileoder ownershipEigentümer. orEr filesystemkann permissions.dieses AsProblem such,nicht it cannot be used to resolve this issue.lösen.

Empfohlene Vorgehensweise (Best practicePractice):

is
    to
  1. LXC-Root-Dateisystem mounten (pct mount the<CTID>)
  2. LXC
  3. Backup-ZIP-Datei rootan filesystemden onrichtigen theOrt host,kopieren
  4. copy
  5. Sofort thedie backupBerechtigungen filekorrigieren into(chown place,-R immediately100033:100033 correct...)
  6. ownership
  7. Dateisystem andwieder permissions,unmounten then(pct unmount the<CTID>)
  8. root
  9. In filesystem.den AfterContainer that,wechseln (pct enter the<CTID>) containerund andden executeRestore-Befehl theausführen
  10. restore
commands.

So Thisbleiben ensuresdie thatBerechtigungen correctdurchgehend permissions are maintained throughout the entire process.korrekt.