Skip to main content
Working with an agent? Give them a link to this page as markdown.

Setup

The release bundle's prompts/setup.md points a coding assistant to the docs index for your release. It finds the guides for your environment there. For Docker Compose, the guided setup runbook does several things:

  • Checks prerequisites
  • Generates .env
  • Starts the stack
  • Connects your reverse proxy
  • Verifies the first sign-in

For ongoing updates, it assesses and verifies an existing reviewed deployment job. If no suitable job is available, it records an implementation handoff and an explicit deferral.

For Kubernetes, follow the Helm example. The steps below target Docker Compose. To include a native Copilot gateway, follow Native Copilot through LiteLLM after Watcher's authentication and model access are ready. That guide includes the optional Helm configuration and a separate validation prompt.

What you need​

You need these items:

  • A Linux host with Docker Engine and the Compose plugin
  • Access to the server image registry and the image tag for your release
  • A reverse proxy or load balancer that terminates TLS
  • LLM API keys for the grading models you plan to use
  • An authentication mode chosen before setup

The stack includes Postgres. You can use a managed database instead. The database user needs no special attributes. It does not need superuser or BYPASSRLS. It only needs ownership of an empty database. Migrations create and own every table.

If you still need a host, network, database, or certificate, start with the infrastructure prerequisites prompt. AWS users can use the included Terraform modules.

Choose an authentication mode​

WATCHER_AUTH_MODE selects who handles sign-in:

ModeUse it whenWhat you provide
workosUsers should sign in through your identity providerPublic hostname, allowed email domains, and the WorkOS values supplied for the deployment
proxyAn authenticating reverse proxy sits in front of WatcherTrusted identity and role headers on every request

SSO mode​

In workos mode, WorkOS brokers sign-in with your identity provider. Your identity-provider groups decide who is an admin or member. Set these variables before the first sign-in:

  • WATCHER_WORKOS_CLIENT_ID
  • WATCHER_WORKOS_API_KEY
  • WATCHER_WORKOS_ORG_ID

Complete WorkOS setup before first sign-in, including role creation and admin widget access.

Proxy mode​

In proxy mode, the proxy authenticates each request. It injects identity and role headers. The shipped admin bundle grants access to organization settings. Strip client-supplied copies of these headers before adding trusted values.

The bundle includes a basic-auth reference proxy. It is for a small trusted team behind an IP allowlist. It is not a hardened multi-tenant boundary.

Configure roles​

Both auth modes use the same YAML role policy. See the role reference for defaults and validation rules. For an upgrade, first read the target release's required steps via Update Watcher.

  1. Copy server-config.example.yaml to server-config.yaml if it does not exist. Preserve other sections in an existing file.

  2. Add the roles you want to change. Each entry replaces the complete list; omitted roles keep their defaults. For example:

    roles:
    admin:
    - org:settings:read
    - org:managed-settings:read
    auditor:
    - sessions:aggregates:read:any
    - sessions:findings:read:any
    - org:managed-settings:read

    This gives admins read-only settings access, removes their other default Watcher grants, and adds an auditor role. Use admin: [] for no admin Watcher grants. Neither change revokes WorkOS widget access.

  3. Assign configured names through the trusted proxy role header or WorkOS. Missing or unknown roles add no Watcher role grants. Send member explicitly for users who should receive that role's grants. Watcher combines grants from all WorkOS-assigned roles. For WorkOS, have the environment owner create any custom roles and refresh tokens after changing assignments.

  4. Apply the file to every API replica and to the operation worker, which applies the file's model pricing and monitor overrides to the summaries and reports it writes. For Docker Compose, merge the read-only /etc/watcher/server-config.yaml mount for xylon-api and xylon-operation-worker from compose.override.yml.example into your override file. On a release that supports role YAML, apply later changes with docker compose up -d --force-recreate xylon-api xylon-operation-worker. For Kubernetes, use Helm server configuration.

  5. Verify a credential: check its resolved grants, an allowed operation, and one you removed. For WorkOS, check widget access too.

Get the release​

Download the self-host bundle from the Watcher releases page. It contains these items:

  • Compose file
  • Helm chart in chart/, with its version and default image tag set to the release
  • Terraform modules
  • Examples
  • Prompts
  • Support bundle script for Docker Compose

Verify it as described under Supply chain security.

The guided setup runbook generates .env from .env.example. WATCHER_IMAGE_TAG selects the server images.

Distinct tool invocations​

This setting keeps otherwise identical tool calls separate when their IDs differ. It applies only to sessions created while it is enabled. Existing sessions keep their previous matching behavior. This includes after a content scrub.

DeploymentSettingShipped default
Docker ComposeWATCHER_DISTINCT_TOOL_INVOCATIONS_ENABLED in .envtrue
Helmapi.distinctToolInvocationsEnabled in your values filetrue
Custom server or ingestion jobXYLON_DISTINCT_TOOL_INVOCATIONS_ENABLED in the process environmenttrue when unset

Use true or false. The setting is read when the process starts. Restart the affected servers or jobs after changing it. An explicit false keeps the setting disabled across upgrades. In Compose, an empty value counts as unset and resolves to true.

For a new installation with an empty database, keep the default. For an existing database, every API replica and ingestion job that shares it must support this setting before it is enabled. Server release 0.34.0 is the first compatible release.

If you already run 0.34.0 or later with the setting unset, the first deploy of a release with the true default activates it. Before that deploy, verify every writer and any workload or automation that could restart an old image. Take a database backup before that deploy too. Alternatively, set an explicit false before deploying to defer activation, then follow the two stages below.

When upgrading from pre-0.34.0 code, explicitly set false on every writer for the first compatible rollout. This includes skipping versions to a release that defaults to true. Replace all old writers. Also update any workload or automation that could restart an old image. Once all writers are compatible, back up the database, then set true and redeploy as a separate step. Follow Update Watcher and the release upgrade steps.

Enabling the setting does not change existing sessions or repair earlier collisions. Once sessions have been created with it enabled, setting it to false does not make older server code safe to use. Roll back only to compatible code, or restore the pre-activation database backup and its matching release. Restoring a backup discards writes made after it was taken.

Run the setup​

  1. Unpack the verified release bundle and open its prompts/setup.md.
  2. Paste it into a fresh coding-assistant session with access to the release files. Tell it you are using Docker Compose. It finds the guided setup runbook through the linked docs index.
  3. Follow the prompts for secrets, DNS, reverse-proxy configuration, and sign-in.
  4. Supply your existing reviewed update job for assessment and verification. If no suitable job is available, record an implementation handoff. Record an explicit deferral with an owner, reason, and follow-up date. That owner remains responsible for manual updates until automation is enabled.

The entry links to docs for the bundle's major and minor version. Use the supplied release files and image tag. If the assistant cannot access the docs, provide the relevant pages from a connected machine.

Use Automate Analyzer updates for implementation guidance. Use it when a deployment job needs to be built or revised.

You can re-run the guided setup runbook to finish an interrupted installation. Its symptom index also helps diagnose common deployment failures.