Administer with the command line

A few operator tasks live on the command line rather than in the web app. This page lists the artisan commands you may actually need while running an instance, with a pointer to the fuller page for each.

On a Docker install, run every command through the web container:

docker compose exec app php artisan <command>

Day to day operation

Grant or revoke instance administration

php artisan kollek:make-instance-administrator you@example.com
php artisan kollek:make-instance-administrator you@example.com --revoke

Grants (or takes back) the server wide administrator flag for the user with that email. This is how the first administrator is bootstrapped after installation. See Grant instance administrator access.

Create a webhook endpoint

php artisan kollek:create-webhook-endpoint you@example.com https://example.com/hooks --label="My receiver"

Registers a webhook endpoint for a user and prints its ID and signing secret. Users can also do this themselves from their profile settings. Note that no application event fires webhooks yet; see Webhooks.

Rebuild the photo search index

php artisan photos:rebuild-search-index

Rebuilds the search index behind the photo library and backfills missing image dimensions. Run it once after upgrading to a version that introduces the photo screen. It is safe to run again at any time; it skips photos whose files are missing and changes nothing else. See Upgrade your instance.

Rebuild the account search index

php artisan search:rebuild-index

Rebuilds the index behind account wide search, across items, collections, copies, photos, loans, locations, sets, series, categories, tags and documents. Run it once after upgrading to a version that introduces search: the migration creates the table, but only this fills it. Pass --type=item to rebuild one kind of record only. It is safe to run again at any time, and it is also the fix if the index ever drifts. See Search across your account.

Purge the Cloudflare cache

php artisan kollek:purge-cloudflare-cache

Drops every public page Cloudflare holds, which are otherwise served from its cache for seven days. Nothing is lost: each page is rendered again on the next visit. It needs CLOUDFLARE_API_TOKEN and CLOUDFLARE_ZONE_ID, and says so when they are missing. The same button exists in the panel, described in The instance administration panel.

Scaffold a locale for translation

php artisan kollek:localize fr_FR

Extracts every translatable string in the application and syncs it into the locale's JSON file under lang/. See Add a language.

Development only

Two more commands exist in the codebase, and neither belongs on a production instance. kollek:bruno resets the database with seed data for API client testing, which would destroy real data, and kollek:sync-skills maintains the project's own tooling. You can ignore both as an operator.

Warning

Never run kollek:bruno on a real instance. It wipes the database and reseeds it with demo data.

Where to next

Documentation for KolleK Edit this page on GitHub
Was this page useful?