v0.3.0 Latest

Getting started

Clone, configure three values, docker compose up on the published image, create the first administrator.

Trove KB runs as one app container and Postgres 16. Nothing else is required: no Redis, no queue, no search service. Webhook retries run from a worker inside the app, and search is a Postgres tsvector column.

Quick start

git clone https://github.com/joshhearne/trove-kb.git
cd trove-kb
cp .env.example .env
# set POSTGRES_PASSWORD, match it in DATABASE_URL, and:
#   openssl rand -base64 32   -> AUTH_SECRET
docker compose up -d

The app publishes on http://localhost:3080. The first visit opens a one-time setup screen that creates the administrator account; there is no default password. Migrations run automatically on container start.

docker compose up pulls the published image, ghcr.io/joshhearne/trove-kb:stable, the newest release. TROVE_IMAGE_TAG in .env picks another: a release such as v0.3.0, or a dev build such as dev-1a2b3c4. Nothing is built on the server. The clone is still worth having: it holds the compose files, .env.example, and the host updater, and the updater checks out each new version there.

Pull or build

CommandWhen
Pulldocker compose up -dRunning Trove KB. The image for TROVE_IMAGE_TAG
Builddocker compose -f docker-compose.yml -f docker-compose.build.yml up -d --buildRunning your own changes. Tagged trove-kb:local, which the updater leaves alone

See Updates for the image tags and for making the build the default.

The install page generates a complete .env with fresh secrets for your choices of storage, vault mode, and single sign-on.

What to set

ValueWhy it matters
POSTGRES_PASSWORD and DATABASE_URLThe same password appears in both.
AUTH_SECRETSigns sessions. Losing it signs everyone out after a restore.
APP_URLThe origin people actually browse to. Cookies are Secure as soon as it is https, the OAuth state check is built from it, and Better Auth rejects requests whose origin does not match it. A mismatch shows up as a sign-in page that loops.
APP_PORT and APP_BINDThe host port, and whether it is on the LAN (0.0.0.0) or only reachable from this host (127.0.0.1) for a tunnel or reverse proxy.
SEED_ON_START=trueLoads the starter doc types on first boot. Idempotent; safe to leave on.

Starter content

With SEED_ON_START=true the first boot loads a pack of doc types with the option lists they need: Vendor, ISP, Firewall, Switch, Wi-Fi, Printer, Server, Network, Rack, Domain/DNS, and M365/Google Tenant. SEED_LOCALE=en-GB gives British spelling (“Fibre”). See Starter doc types.

A second stack on the same host

ENV_FILE lets a second copy (a test instance, a staging copy) run from its own file without touching the deployment’s .env:

ENV_FILE=.env.test APP_PORT=3090 docker compose -p trove-kb-test up -d

Compose interpolates ${X} from .env alone, never from ENV_FILE, so APP_URL and APP_PORT for the second stack are passed on the shell.

Behind a tunnel

Set APP_BIND=127.0.0.1, APP_URL=https://docs.yourdomain.com, and publish the hostname with cloudflared, Caddy, or nginx pointing at 127.0.0.1:3080. Nothing is open to the internet. See Cloudflare.

Updating

Install the host updater and choose a channel under Admin → System health; it backs up the database before each update and rolls back if the new build does not come up. See Updates.

sudo updater/install-updater.sh

Or update by hand, with the same backup and rollback:

updater/trove-kb-update.sh --install v0.3.0

Migrations are additive and run on start.

From v0.1.0

v0.1.0 built the image on the server; from v0.2.0 the compose file runs the published one. To move across:

git pull                     # the checkout on main, now at v0.3.0
docker compose pull          # ghcr.io/joshhearne/trove-kb:stable
docker compose up -d

Take a pg_dump first, as for any update before the updater does it for you; see Backup and restore. TROVE_IMAGE_TAG defaults to stable when .env does not set it. Then install the host updater as above, which pulls the image itself and refuses to change anything if it cannot. If you had local changes to tracked files in the checkout, commit or discard them first: the updater will not run over them. To keep building from source instead, use the build override.