Skip to content

Troubleshooting

Every entry here except the general advice was hit for real by this guide's lab, on the day, and fixed. The order is the order you'll likely meet them.

First move, always: read the log

BookStack's error page says as little as possible on purpose ("An unknown error occurred"), because details help attackers. The real reason is written to:

tail -50 /var/www/bookstack/storage/logs/laravel.log

Diagnose from the log, never from the error page. Half this chapter is what the log said when the page wouldn't.

"An unknown error occurred" on every page, fresh install

Symptoms: install finished, migrations ran, but every page is a 500 with the generic message. The log says Unsupported cipher or incorrect key length.

Cause: APP_KEY in .env is still the placeholder. The key generation step silently didn't happen — classically because php artisan key:generate asks for confirmation in a production install, and a scripted or piped run that can't answer cancels without a word, reporting success.

Fix:

cd /var/www/bookstack
php artisan key:generate --force
grep APP_KEY .env   # a long base64 value, not a placeholder

Since v26.09 a valid key is mandatory; an install without one is an install that errors. If you upgraded into this error, same fix.

The new user who silently never exists

Symptoms: Settings → Users → create a user, the form hands you back the same form, and no user appears in the list. No error you can see. The log says Failed to send user invite.

Cause: the form's send invitation option was on, the server has no working mail configured, the invite couldn't be sent — and BookStack quite reasonably rolls the whole creation back rather than leave a half-made account.

Fix: create the user with the invite option off and a password set directly. Then fix mail properly — MAIL_* settings in .env, and the test send in Settings → Maintenance — before relying on invites, notifications or password resets.

A book has "vanished" — 404 for a book that exists

Symptoms: a reader (or you) opens a book's address and gets page not found, though the book is right there in your admin view.

Cause: usually not a fault at all. Item permissions fence the book away from that account, and BookStack answers 404 — not "forbidden" — for anything you may not see, so hidden things stay undetectable (chapter 8). The same answer covers the book's pages, chapters and search results.

Fix: as an admin, open the book's Permissions and check the grid and the inherit toggle. Then test as the affected user. Only if everyone gets the 404 do you start suspecting the recycle bin or the database.

A 500 when you type a settings address by hand

Symptoms: /settings/users/new gives a server error; the log shows a complaint about a user id.

Cause: the create screen lives at /settings/users/create. The address you typed matches the edit route with "new" in the id slot, and no user is called "new". Several BookStack screens follow the same pattern: when in doubt, navigate from the menus once and copy the real address — search engines and memory both serve up plausible wrong ones.

Scripting the web forms fights back

Symptoms: your script's requests to ordinary pages return 405, or a form submission comes back having changed nothing.

Cause: the HTML forms are built for browsers and are brittle to imitate. Three specifics from the lab: several update routes accept PUT but not PATCH (a 405 means the verb is wrong, not the address); password forms name their fields with hyphens (password-current, password-confirm), and the plain names are ignored in silence; and every form carries a per-session token a script must fetch and return.

Fix: don't script the forms. Anything a script should do, the API does (chapter 9) — that's what it's for.

Cause: APP_URL in .env doesn't match the address readers use. BookStack builds its links from it.

Fix: set APP_URL exactly — scheme, host, and path if any — then php artisan cache:clear. If the address changed for an existing library, the project's URL-update command rewrites the addresses stored inside content; see the restore notes in chapter 10.