Finalization
First start: populate the application directory
Section titled “First start: populate the application directory”docker compose up -d ktdockersleep 5rw/bin/cms.sh does not exist before this run, which is why the commands in the
next sections cannot come first.
Check that the directory was populated:
ls -l rw/bin rw/lisp rw/xin rw/etc rw/var/secretStop it again
Section titled “Stop it again”docker compose stop ktdockerrestart: unless-stopped restarts the container on every exit, with an
exponentially increasing delay but without ever giving up. Left alone it would
keep flapping through the next steps — filling the log and, in the worst case,
letting a half-started application touch the database while
/finish-installation is working on it.
An explicit stop is the one thing that policy honours: this is what distinguishes
unless-stopped from always. The container stays down until you bring it up
at the end.
Activate the database
Section titled “Activate the database”/finish-installation populates the _ktbsversion table that pg.sql
created, which is what makes the schema usable for this application version.
docker compose --profile tools run --rm cms /finish-installationThe command runs in a separate container with the same image and mounts, so it works whether or not the application container is currently up.
Install a disk pool
Section titled “Install a disk pool”Large files are stored on disk instead of in the database. This is strongly recommended for performance.
docker compose --profile tools run --rm cms \ /make-disk-pool default /rwshared/pool/Create the first user
Section titled “Create the first user”source ./rap.config.shdocker compose --profile tools run --rm -it cms \ /reset-administrator "$ADMIN_EMAIL"You are prompted for a password. The same command serves later on: with a known address it resets that user’s password, with a new one it creates a further administrator. Either way the account gets administrator rights, and the command reports which of the two it did.
Start everything
Section titled “Start everything”Now bring both services up — this is the first start that is expected to succeed:
docker compose up -ddocker compose psBoth services must reach state healthy. ktdocker may need up to two minutes
for its first health check — that is the configured start_period.
Verify
Section titled “Verify”source ./rap.config.sh
# Directly against the containercurl -s "http://127.0.0.1:8080/$PREFIX/" | grep __ac_passwordA hit on __ac_password means the login page is being served and the
installation succeeded.
Once your reverse proxy is in place, check it from outside as well:
curl -s "https://$PREFIX.$DOMAIN/$PREFIX/" | grep __ac_passwordOr simply open the URL in a browser and log in with the administrator account you just created.
Next steps
Section titled “Next steps”- Configure the AI Middleware with your LLM provider
- Set up the reverse proxy and backups, see Maintenance