Quilzomanual

Install and run Quilzo in production

Get the program, check it came from this project, and run it the way it is meant to be run.

Quilzo is one static binary with no dependencies to install. It runs as two processes from the same store: quilzo serve, the admin, which belongs on loopback; and quilzo site, the public site, which has no editing surface at all.

Get the program

No release is published yet. Build it from source, or build the container image from the source.

  1. Build it

    Go 1.27 and nothing else: go.mod requires no module.

    git clone https://github.com/Quilzo/Quilzo && cd Quilzo
    go build -o quilzo ./cmd/quilzo
    sudo install -m 0755 quilzo /usr/local/bin/quilzo

    Once a release is tagged, go install github.com/quilzo/quilzo/cmd/quilzo@vX.Y.Z makes a binary that says vX.Y.Z to quilzo version.

  2. Or build the container

    Built on gcr.io/distroless/static-debian12:nonroot: the binary, CA certificates and a passwd entry. No shell and no package manager. It runs as nonroot (uid 65532).

    docker build -t quilzo .
    docker run --rm -v quilzo:/srv quilzo init
    docker run --rm -v quilzo:/srv quilzo demo
    docker run -p 8081:8081 -v quilzo:/srv quilzo site --addr 0.0.0.0:8081

    The image's entrypoint is quilzo --root /srv/store, so any command given to it runs against /srv/store; a --root given after it still wins. Mount the volume at /srv, not at the store, because the templates demo writes live under /srv too. A command that would make a store in the container's own layer says it would go with the container. Built from main like this, the binary says dev to quilzo version, which is what it is. A release's image is built from its tag with --build-arg VERSION=vX.Y.Z, and says that version.

Each release will publish signed binaries for Linux, macOS and Windows on amd64 and arm64, and a container image. INSTALL says how to check them: the checksum, and the build provenance that proves this project's release workflow built the file from a tag.

Run it for real

  1. Make the first administrator

    quilzo init --admin dana

    It says to start the admin, and prints the link that adds dana's passkey, to be opened once. The account that owns the store, or root, starts quilzo serve and quilzo site without a token; anybody else needs publish, and is told whose store it is.

  2. Keep the admin on loopback

    quilzo serve listens on 127.0.0.1:8080 by default. Reach it through your own authenticating proxy or a VPN, and set its public address so sign-in flows and connected apps know where they are:

    quilzo config set admin.base_url https://quilzo.example.com

    Provisioning and the identity provider's security events are sent by the provider to the admin, so publish those two paths through the proxy and nothing else: /scim/v2/ and /sso/signals. The repository's deploy/Caddyfile has the block, commented out (see when the identity provider ends a session).

  3. Put the site on the internet, behind TLS

    quilzo site --addr 0.0.0.0:8081 --base-url https://example.org

    Terminate TLS in front of both processes. --base-url is needed for the sitemap and feeds.

    The site is the one process facing the internet, so on Linux it confines itself with Landlock: it reads the store as before, and writes only its own state (form submissions, boards, members, analytics, the shield, the model ledger, webhook deliveries, the audit log and a temporary directory of its own). A flaw in it cannot write the policy, the tokens or the settings. It checks this before it serves, and a kernel without Landlock runs it as before and says so. Under systemd, the unit in the repository's deploy/ makes the store read-only for it too, and quilzo site --prepare makes and lists what it writes.

  4. Write the audit log as its own account

    quilzo logd runs the log writer as a separate user the content platform cannot impersonate; quilzo logd status says whether the separation is in force.

  5. Encrypt what is stored

    quilzo vault enable     # prints the key once
    quilzo vault rotate     # a new key from now on
    quilzo vault rewrap     # move existing objects onto it

    The key comes from QUILZO_KEY, QUILZO_KEY_FILE or QUILZO_KEY_COMMAND.

  6. Read the posture scan

    Assurance › Security or quilzo posture scan reads this deployment and lists what is thin, with the reason and the fix (see Security posture).

With Docker Compose

deploy/compose.yaml in the repository is a reference stack over one store:

  • the admin, over HTTPS from a Caddy of its own (admin-proxy), on this machine's loopback at https://localhost:8443 (the port is QUILZO_ADMIN_PORT);
  • the published site, behind Caddy, which gets and renews its certificate;
  • logd, which holds the only writable copy of the audit log.

Every Quilzo container is read-only, holds no capability and does not run as root. In deploy/, run these in this order; deploy/README.md says what each is for:

cp compose.env.example .env    # then set QUILZO_DOMAIN in .env
set -a; . ./.env; set +a
docker build -t "$QUILZO_IMAGE:$QUILZO_VERSION" ..   # the image .env names, from this checkout
docker compose run --rm admin init
docker compose run --rm admin auditlog dir /srv/audit
docker compose run --rm admin config set network.trusted_proxies "$QUILZO_PROXY_ADDRESS"
docker compose run --rm admin config set admin.behind_tls_proxy true
docker compose run --rm admin config set admin.base_url "https://localhost:$QUILZO_ADMIN_PORT"
docker compose run --rm admin config set site.base_url "https://$QUILZO_DOMAIN:$QUILZO_HTTPS_PORT"
docker compose run --rm admin demo --examples /srv/templates/examples
docker compose run --rm admin init --admin you
docker compose run --rm admin token issue first --principal you   # shown once: keep it
docker compose up -d

docker build makes the image every Quilzo container runs, from your checkout, under the name .env gives it (quilzo:local). No release is published yet, so there is no image to pull, and compose.yaml names no default: it will not start until .env names one. demo gives the site a design and pages to serve from the start; for a site of your own, run docker compose run --rm admin template use sections in its place. init --admin you prints the link that adds your passkey, naming the published address:

The first administrator is you. Start the admin (quilzo serve) and open this, once, to add their passkey:
https://localhost:8443/enrol/<redacted>

The first token is issued before the admin starts, because a store issues a token without being shown one only while it holds none, and signing in to the admin makes one. Then:

  • Trust admin-proxy's certificate authority on the computer you sign in from, because a browser will not use a passkey on a page whose certificate it does not trust: docker compose cp admin-proxy:/data/caddy/pki/authorities/local/root.crt quilzo-admin-ca.crt, and add it to that computer's trusted certificates.
  • From another computer, forward the port over SSH and open the same address there: ssh -N -L 8443:127.0.0.1:8443 you@your-server.
  • Give a command your token through the environment, never on its command line: export QUILZO_TOKEN=..., then docker compose run --rm -e QUILZO_TOKEN admin logd status.
  • An agent that runs a program needs a host outside the containers, or a backend that runs its box elsewhere: quilzo agent backends says which.
  • docker compose down stops the stack and keeps every volume, the store's included; docker compose down -v deletes them.

Back up and upgrade

The store directory is the only state Quilzo has: content, history, policy, credentials, agents and the audit log. quilzo backup keeps it, encrypted with a key of its own:

ToRun
Make the backup key, shown once and kept nowhere herequilzo backup key, then give it as QUILZO_BACKUP_KEY or in the file QUILZO_BACKUP_KEY_FILE names
Back up the store and its layoutsquilzo backup create FILE
Check a backup without restoring itquilzo backup verify FILE
Restore one into an empty directoryquilzo backup restore FILE --into DIR
A backup a day, the last seven keptquilzo config set backup.dir /mnt/backups, and backup.keep for how many

A backup is encrypted with AES-256-GCM in numbered chunks, and read back whole and checked against its manifest before it counts as made. With backup.dir set, best on another disk, the admin server makes one a day with the key in its environment, and keeps backup.keep of them (seven by default). A restore checks the history object by object, and says where the store and the layouts are to move into place. Keep the key where the backups are not: without it no backup can be read. quilzo verify re-hashes every object in a store. To upgrade, replace the binary and restart both processes. The full operations guide is INSTALL.

Next