Skip to content

Set up a new instance

veyqctl installs the instance from a release (ADR 0096): the app, its administration surface, MariaDB, Garage, and a Traefik that terminates TLS in front of them. Fetch and verify veyqctl first (Verify a release), then:

Terminal window
cd /opt/veyq
./veyqctl install --set VEYQ_RELEASE=<major> \
--set VEYQ_DOMAIN=veyq.example.org

VEYQ_RELEASE is the release line the instance stays on: a major (1, its newest release), an exact release (1.4, pinned) or latest (the default); Upgrade says what each means later. A value you do not pass is asked for at a terminal, and refused by name without one. An optional variable (Configuration) is passed the same way, --set ADMIN_DOMAIN=….

install refuses a home that already holds an instance, and then, in order:

  1. Resolves the release VEYQ_RELEASE selects among the GitHub Releases of raddatzk/veyq, never a prerelease or a snapshot. --source <directory or URL> reads a mirror in the same layout instead, verified exactly the same way.
  2. Verifies the release’s manifest.json against its signature, then both images by the digests it names, before anything is pulled, and fetches the release’s files into releases/<release>/, each checked against its sha256 — both exactly as Verify a release shows by hand.
  3. Writes .env (mode 0600) from the release’s template, env.example: the four secrets generated, the two image lines from the manifest, your values filled in. Every secret is required and has no default in the recipe, so an up with one missing fails with its name instead of starting on a password printed in this repository.
  4. Brings the stack up and waits until every service is healthy: docker compose -f releases/<release>/docker-compose.prod.yml --env-file .env up -d --wait, plus -f compose.override.yml when that file exists. It ends by naming the admin console’s address.

The instance lives in /opt/veyq (--home names another):

Path What it is
.env The instance’s values, 0600
compose.override.yml Optional, yours: a Compose overlay laid over the recipe on every command (a port, a network, a CA, or leaving the bundled store out, below), kept across upgrades
state.json The running release, the Compose project, the source
releases/<release>/ That release’s files, as published; an upgrade adds the next one beside it
backups/ The captures backup and upgrade take: the database and the store’s index each

Leave the bundled store out when the instance uses an S3-compatible store of your own: this compose.override.yml disables the recipe’s Garage and blanks the hint the application reads, so the console offers only a store of your own (Storage and email):

services:
garage:
profiles: [bundled-store] # a profile nothing enables: the service is left out
app:
environment:
VEYQ_BUNDLED_STORE_ENDPOINT: ""
VEYQ_BUNDLED_STORE_ADMIN_TOKEN: ""

Nothing else is needed: the application’s dependency on garage is optional, so Compose drops the service from the stack (measured with Compose v5.6.0). GARAGE_RPC_SECRET and GARAGE_ADMIN_TOKEN stay required in .env all the same — Compose reads them for the disabled service too, and install generates both. Its backups take your store’s endpoint and key pair from the shell (Backup and restore). Leave the bundled store out before the first store is chosen: an instance already on it keeps its objects in Garage’s volumes.

No directory here holds an object pool: it lives where .env’s VEYQ_BACKUP_OBJECTS_TO names — by intent another disk or another store, since a pool on the store’s own disk dies with it (Backup and restore).

start, stop, status and logs [-f] [service] address the stack by its project; status exits non-zero unless every service is healthy.

By hand, without veyqctl: verify the release and fetch its files into releases/<release>/ as Verify a release shows, then

Terminal window
cd /opt/veyq
(umask 077; cp "releases/${release}/env.example" .env) # fill in every value; the two image lines are the manifest's
docker compose -f "releases/${release}/docker-compose.prod.yml" --env-file .env up -d --wait

The recipe names its project (name: veyq), so nothing else has to be passed. An instance set up by hand has no state.json, so veyqctl does not manage it; run it by hand from then on, as each page here shows.

Every container runs unprivileged, and the proxy cannot reach the database (ADR 0071). Each service drops every capability, cannot escalate, runs as a non-root user and has a read-only root. A one-shot volume-ownership service chowns the Garage and ACME volumes to their writers first, so ps lists it as exited (0) after every up, and that is its done state. Three networks separate the peers: veyq_edge (Traefik, app, Garage), veyq_db (app, MariaDB, no route out) and veyq_admin (app, admin container, and Traefik for the ADMIN_DOMAIN router). A command that joins the stack names one of them.

Bring the stack up, then create the Server Owner over the tunnel or port-forward, connect the object store, and only then worry about DNS and TLS: First-run setup and the admin console.

The admin surface’s two exposure modes and the veyq-admin CLI are on First-run setup and the admin console.

Routing, certificates and HSTS are on Networking and TLS; the config-secret volume and why it must persist are on Storage and email.

  • Upgrading is a procedure, not a flag change. It has its own section — Upgrade — and the reason it is not one line is that the schema migrates at boot with no gate and no downgrade path.
  • There are two images per release, and they are pinned together. VEYQ_IMAGE and VEYQ_ADMIN_IMAGE are built, versioned and cosign-signed by the same publish (ADR 0057), and one release’s manifest names both by digest, which is where veyqctl writes them from. A mismatched pair is two versions of one instance, and only one of them migrated the schema.
  • The recipe is the release’s files. The compose file, its .env template and garage.toml are assets of an immutable GitHub Release, beside the manifest that names the images it was published with, so the recipe you run a release with cannot drift from the images it describes, and nothing in a published release can change (ADR 0096). No image carries a recipe, and no repository checkout is needed.