Bookstack Proxmox VE Community Script
Installing
BookStack Bookstack viaüber Proxmox communityCommunity scriptsScripts isinstallieren
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.
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.
EnterVerbindethedichLXCdirektdirectlymitordemuseLXC-Container (z. B. über die Proxmox-Konsole oderpct enter <CTID>to access the LXC container.)changeWechsleintointhedasbookstackBookStack-Verzeichnis:foldercd /opt/bookstackexecuteStartethedencli 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:
- Verbinde dich mit dem LXC-Container
- Wechsle ins BookStack-Verzeichnis:
cd /opt/bookstack - Starte
denRestore
an:ToRestore-Befehlrestoreundagibbackup,denlogPfadinzurtoZIP-Dateithe BookStack LXC and change into the BookStack installation directory. From there, run the BookStack system CLI with therestorecommand 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
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:
ExistingBestehendefilesDateienandunduploadedhochgeladenecontentInhaltewillwerdenbe overwrittenüberschriebenExistingVorhandenedatabaseDatenbanktabellentableswerdenwill be droppedgelöschtTheDietargetZielinstanzinstancemussmustdiebegleichetheodersameeineorneuereaBookStack-Versionnewer BookStack versionhaben- Server-
levelseitigeconfigurationKonfigurationenis(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):
- LXC-Root-Dateisystem mounten (
pct mount)the<CTID> - Backup-ZIP-Datei
rootanfilesystemdenonrichtigentheOrthost,kopieren - Sofort
thediebackupBerechtigungenfilekorrigiereninto(chown)place,-Rimmediately100033:100033correct... - Dateisystem
andwiederpermissions,unmountenthen(pct unmount)the<CTID> - In
filesystem.denAfterContainerthat,wechseln (pct enter)the<CTID>containerundanddenexecuteRestore-Befehltheausführen
So Thisbleiben ensuresdie thatBerechtigungen correctdurchgehend permissions are maintained throughout the entire process.korrekt.