Skip to main content

Run Claviger and sign in for the first time

DEVELOPER GUIDE

Start one Claviger instance with Docker, check that it is healthy, and sign in to the admin screen.

Who this guide is for

Developers and self-hosters who want a working Claviger on their own machine or server. You need Docker with the Compose plugin, and a checkout of the Claviger repository.

Why it matters

Claviger keeps its data in SQLite. Two instances on one data directory can corrupt it. Start with one instance, and learn the rules for production before you add users.

What you will do, in one sentence

Run docker compose up --build, open /api/health to check it, then open /_/ and create the first superuser.

Screens are captured from a seeded test system. Every name, address and number on the screens is invented. Prepared 15 November 2026.

1. Start Claviger​

Claviger is one Go binary with an embedded SQLite database. The repository has a Compose file that builds the image and runs it.

  1. Clone the Claviger repository and open its top folder.
  2. Run this command:
docker compose up --build
  1. Wait until the server has started.

The Compose file publishes port 8090 and keeps your data in ./pb_data. To run the binary without Docker, you need Go 1.27 or newer:

cd examples/base && go run main.go serve
No prebuilt image to rely on yet

The README says a Docker image is available from the first tagged release. The deploy templates pull ghcr.io/doodlemania2/claviger:<version>. Check the releases page for a tag before you use them. Until then, build from the repository.

2. Check that it is healthy​

Call the health route:

curl -fsS http://127.0.0.1:8090/api/health

A healthy server answers with HTTP 200. Use this route for your load balancer or container health check. The Compose file already runs the same check every 30 seconds.

A signed-in superuser also sees a data.database value in the answer. It is sqlite or postgres.

3. Sign in to the admin screen​

Open http://127.0.0.1:8090/_/. What you see depends on how you started the server.

How you startedWhat the admin screen shows
You set PB_ADMIN_EMAIL and PB_ADMIN_PASSWORDThe sign-in page. Enter the email and the Password, then choose Login.
You set neitherThe page titled Setup your Claviger instance. Fill in Email, Password and Password confirm, then choose Create superuser and login.

The entrypoint creates the superuser from PB_ADMIN_EMAIL and PB_ADMIN_PASSWORD on the first start. Later starts leave that account alone, so a changed password is kept.

Remove the bootstrap password

After the first start, delete PB_ADMIN_PASSWORD from your .env file or secret store. The account already exists, and the password should not stay in your configuration.

4. Rules for production​

  • Run exactly one instance for each data directory. Do not run docker compose up --scale claviger=2.
  • Put the data directory on durable storage. On network storage, use NFS. Do not use SMB, because it lacks the byte-range locks that SQLite needs.
  • Some platforms start the new container before they stop the old one. The entrypoint then hands the database from one container to the other, so the two never write at once.
  • Set PB_ENCRYPTION_KEY before the first start. It must be exactly 32 characters. Keep a copy somewhere safe. Without it you cannot read the encrypted settings again.
  • Serve over HTTPS on a host name you will not change. Passkeys need both.
Two writers corrupt the database

SQLite allows one writer. A second instance on the same data directory can corrupt data.db. A ReadWriteOnce volume on Kubernetes does not prevent this. See the deploy guide for each platform.

PostgreSQL removes the single-writer limit. It is opt-in. See the PostgreSQL guides.

5. Quick reference card​

Start and check​

  1. docker compose up --build
  2. curl -fsS http://127.0.0.1:8090/api/health
  3. Open /_/ and sign in or create the first superuser.

Before real users​

  1. One instance per data directory.
  2. PB_ENCRYPTION_KEY set, 32 characters, copy stored.
  3. HTTPS and a stable host name.
  4. PB_ADMIN_PASSWORD removed from your configuration.

Next, read the deploy guide for your platform.