Self-Hosted Deployment Reference
Self-Hosted Deployment Reference¶
Install Huitzo Self-Hosted with the Quick Start, which runs
install.sh from the signed release assets; the
Connected installation page documents every step and
flag. This page is the configuration reference for a deployment once
install.sh has run: what the stack contains, what you configure in it, and
where each setting lives.
The install directory is /opt/huitzo (the --prefix default) and the compose
project is huitzo-customer. Run operator commands as docker compose from
/opt/huitzo, or with --project-directory /opt/huitzo from anywhere. Users
and the API reach the deployment through the dashboard origin,
https://<host>: the dashboard proxies /api/ and /health to the backend,
which is not published on the host.
Quick start¶
Follow the Quick Start from download to first sign-in. For the install flags, setup mode, the HTTPS profile, backups and restore, see Connected installation. Check the host against the requirements first.
Configure LLM models¶
The LLM registry is the only source of platform LLM configuration
(ADR-038 §3.2).
LLM providers, models, API keys, the default model and profile mappings are not
environment settings. A fresh deployment serves everything except platform LLM
calls, which fail with a generic "LLM is not configured on this deployment —
contact your administrator" (the specific cause is logged and shown to staff at
/admin/llm) until you:
- Open Admin → LLM (
/admin/llm) as a platform admin. - Add a provider (
anthropic,openai, orlocal_ai) and set its API key (20–512 printable ASCII characters, write-only; only the last four characters are shown back). Keys are stored encrypted withHUITZO_SECRETS_ENCRYPTION_KEYand reach every replica within 30 seconds. - Add models — Fetch available models lists what the key can reach.
- Pick a default model. Every profile without its own mapping uses it.
- Map the Studio profiles (
orchestration.t0.economy,orchestration.t1.standard,orchestration.t2.premium). After an upgrade you may also see the former names (orchestration.t0.haikuand so on): keep each mapped to the same model as its new name until the release that removes them. CLARIFY refuses to run whent0and its reviewert1resolve to the same model; the Routing panel warns about it.
Rotating HUITZO_SECRETS_ENCRYPTION_KEY keeps every provider key: follow
rotate the column encryption key.
Model sizing for local inference is in
Requirements — AI models.
Services¶
The release's docker-compose.yml (installed at /opt/huitzo/docker-compose.yml
and replaced by every install.sh run) defines these services. The Huitzo
images come from the private registry ghcr.io/huitzo-ai, pinned by digest;
the third-party images are pinned by digest too.
| Service | Image | Role |
|---|---|---|
migrate |
ghcr.io/huitzo-ai/backend |
One-shot: runs the schema migrations as the database admin role and sets the huitzo_app role password, then exits. The backend, workers and beat wait for it. |
backend |
ghcr.io/huitzo-ai/backend |
REST API, WebCLI and the setup and license routes. Listens on port 8000 inside the network only; not published on the host. |
worker (2 replicas) |
ghcr.io/huitzo-ai/worker |
Celery workers that run pack commands and background tasks (queues fast, medium, long). |
beat (1 replica) |
ghcr.io/huitzo-ai/worker |
The Celery beat scheduler (below). |
dashboard |
ghcr.io/huitzo-ai/dashboard |
The Hub: web UI and WebCLI. Published on 127.0.0.1:3000; its nginx proxies /api/ and /health to the backend. |
caddy |
caddy (https profile only) |
TLS on ports 80 and 443 in front of the dashboard (HTTPS profile). |
postgres |
postgres:17-alpine |
The database (volume postgres-data). |
redis |
redis:8-alpine |
Cache, Celery broker and result backend (volume redis-data). |
Every container has a fixed memory and CPU limit; the numbers are in Requirements — Container limits. The images are built for x86_64 only; see the launch support matrix.
Worker concurrency¶
Each worker replica runs 2 Celery child processes, sized to its 1-CPU,
1 GiB limit. Celery's own default is one child per CPU the container can see,
which is every core of the host, not the limit. On a many-core host the worker
would then fork more children than its limit can hold and fail its health check.
To change it, set HUITZO_WORKER_CONCURRENCY in .env, and raise the worker's
cpus and memory limits to match. The Helm chart has the same setting as
worker.concurrency. The source-built stack reads the
same variable from deploy/compose/.env with the same default of 2. Its base
file sets no CPU or memory limit on the worker, but the docker-compose.prod.yml
overlay sets 1 CPU and 1 GiB, so raise those together with the concurrency if you
use it. Under the compute overlay (docker-compose.compute.yml) the generic
worker is retired and the worker-fast and worker-long pools set their own
-c, so this variable does not apply to them. Recreate the container after a
change.
Every replica consumes all three queues (fast, medium, long), so two
long-running commands on one replica occupy both of its children. If long jobs
crowd out short ones, add replicas rather than children.
Scheduled tasks (Celery beat)¶
Beat is part of the supported stack. Without it nothing scheduled runs: pack
cron schedules, user schedules, the reapers and the worker's scheduled-dispatch
license gate (ADR-008 E11).
The customer compose file runs it as its own beat service:
- One process, never embedded. The
workerservice runs 2 replicas, soworker -Bwould start two schedulers.beatuses the worker image (same digest), the worker's environment and the read-only license directory, exactly 1 replica,restart: unless-stoppedand a 256 MB limit. Never scale it above 1. - Schedule file on tmpfs (
/run/beat, owned by the container user). Occurrences are claimed in the database before they are dispatched, so losing the file on restart cannot double-dispatch or skip an occurrence, and it avoids thedbmlocking failure of a schedule file on an overlay filesystem. - Crash recovery. Beat is the container's main process: if it exits, Docker restarts the container.
- Stuck beat is visible. A beat entry every 30 s makes a worker write the
current time to the Redis key
huitzo:beat:heartbeat. Thebeatcontainer isunhealthywhen the key is missing or older than 120 s, andGET /api/v1/setup/statusreports abeatcheck from the same key (ok: false, and soready: false, past 120 s). Docker does not restart an unhealthy container, so watchdocker compose psor the status endpoint, then check theworkercontainers (a stale key also means no worker is taking the tick) anddocker compose restart beat. A fresh install reportsno heartbeat yet: beat or the worker is not runninguntil the first tick, under a minute afterup. - Customer schedule. The whole schedule ships (17 tasks plus the heartbeat); the SaaS-only ones (billing, credits, wallet) import lazily and do nothing on a customer install.
CI runs every scheduled task once against the customer worker image, and the
clean-VM job checks that beat sends the
dispatch task within 120 s of up and that a user schedule due the next minute
creates one execution.
Image IP protection¶
The backend and worker images are compiled: Huitzo's proprietary Python
packages ship as native .so modules with the readable .py source removed.
The guarantee, the threat model and the steps to verify it on a pulled image are
in Self-Hosted Image IP Protection.
Application settings in the source-built stack¶
This section applies only to the stack built from the repository
(deploy/compose/docker-compose.yml, run by deploy/scripts/deploy.sh), not to
the customer install. That stack gives the backend and the worker their
settings from one place, so the two processes cannot disagree on a flag
(the compose settings rule):
| You do | What happens |
|---|---|
Put a HUITZO_* line in deploy/compose/.env |
deploy.sh renders every such line into app.env, which the backend, the worker and the compute overlay's worker pools all load. No compose edit is needed for a new setting |
Edit .env and restart without deploy.sh |
Run deploy/scripts/render-app-env.sh first, then docker compose up -d. Compose refuses to start without app.env, and a stale one keeps the previous settings |
Put another variable in .env (a Grafana or database password, HUITZO_DB_PASSWORD, HUITZO_NGINX_CONF, HUITZO_WORKER_CONCURRENCY) |
Compose reads it for its own interpolation; it is not copied into the application containers |
.env must hold plain KEY=VALUE lines: the render refuses export, spaces
around =, multi-line values and CRLF, and names the offending line. A wrong
combination of money flags, a SaaS license whose extension cannot mount, and
an owner-snapshot cutover with capture off all stop the backend at startup
with a message that names the fix
(flag ladder,
boot checks).
Upgrading a stack that predates app.env. Before the first
docker compose up -d on the new compose file:
- Move every
HUITZO_*variable you export in the shell, a systemd unit or a CI job intodeploy/compose/.env. Only.envis rendered; an exported variable that the compose file used to pass through no longer reaches the containers, and the setting silently returns to its default. - Delete any
HUITZO_*=line with a blank value, or give it a value: a blank is now passed as blank, where the compose file used to substitute its default. - Run
deploy/scripts/render-app-env.shonce (or deploy withdeploy.sh, which does). Withoutapp.env, compose stops withenv file ... app.env not found. - On a host installed by
bootstrap-vm.sh, copyrender-app-env.shto/opt/huitzo/and install the newhuitzo-stack.service, which rendersapp.envbefore each start, so a reboot does not depend on step 3. - Compare
docker compose exec backend env | grep HUITZO_with the same forworker: the two lists now match.
The supported customer install (deploy/customer/compose/) does not use
app.env and needs none of this.
Using external services¶
Managed or external PostgreSQL and Redis are not supported at launch unless
agreed with Huitzo before the install. The customer compose runs both in the
stack, and install.sh replaces docker-compose.yml on every run, so any edit
to it must be agreed and re-applied after each upgrade. The rest of this section
describes what such an agreed deployment needs.
External services configuration¶
The backend uses the asyncpg driver scheme. It connects as the restricted
huitzo_app role and runs migrations as an admin role:
# pseudocode: values for an external database and Redis
HUITZO_DATABASE_URL=postgresql+asyncpg://huitzo_app:<password>@db.example.com:5432/huitzo?ssl=require
HUITZO_DATABASE_ADMIN_URL=postgresql+asyncpg://huitzo:<password>@db.example.com:5432/huitzo?ssl=require
HUITZO_REDIS_URL=rediss://:<password>@redis.example.com:6379/0
REDIS_URL=rediss://:<password>@redis.example.com:6379/0
CELERY_BROKER_URL=rediss://:<password>@redis.example.com:6379/1
CELERY_RESULT_BACKEND=rediss://:<password>@redis.example.com:6379/2
Celery broker TLS¶
The Celery worker and every Celery producer verify the certificate of a
rediss:// broker or result backend. Use a hostname the certificate names. If
the certificate was signed by a private CA, or your managed Redis does not use a
public CA, point HUITZO_CELERY_SSL_CA_CERTS at the PEM CA bundle on the
backend and worker containers (the compose file passes the variable
through; mount the bundle read-only on both services, for example at
/etc/ssl/certs/redis-ca.pem):
# pseudocode
CELERY_BROKER_URL=rediss://:<password>@redis.example.com:6379/1
HUITZO_CELERY_BROKER_URL=rediss://:<password>@redis.example.com:6379/1
HUITZO_CELERY_SSL_CA_CERTS=/etc/ssl/certs/redis-ca.pem
A broker whose certificate does not verify stops connecting, and an invalid
ssl_cert_reqs in the URL, or a HUITZO_CELERY_SSL_CA_CERTS that is not a
file, stops the backend and the worker at startup. ?ssl_cert_reqs=none in the
URL turns verification off again; it removes protection against a
man-in-the-middle on the broker link, so use it only temporarily. See
Celery broker TLS for the
full reference.
Compose changes for external services¶
Starting from the release's docker-compose.yml:
- Delete the
postgresandredisservices, their volumes, and thedepends_onentries that reference them inmigrate,backend,workerandbeat. - Point
migrate,backend,workerandbeatat your endpoints. The database and Redis URLs are written into the compose file'senvironment:blocks (the worker environment is shared byworkerandbeat); replaceHUITZO_DATABASE_URL,HUITZO_REDIS_URL,REDIS_URL,CELERY_BROKER_URLandCELERY_RESULT_BACKENDwith the values above, andHUITZO_DATABASE_ADMIN_URLinmigrateonly. Never add the admin URL tobackend,workerorbeat(which service holds it). - Keep everything else unchanged: the digest-pinned images, the license
directory mount, the
dashboardport, thecaddyprofile and the required secrets.
Keep the beat service (Celery beat): it needs the same
external Redis URLs as the worker.
Database requirements¶
When using external PostgreSQL:
| Requirement | Value |
|---|---|
| Version | PostgreSQL 14+ (17 recommended) |
| Extensions | None beyond the built-ins |
| Roles | An admin role for migrations that can create roles (the baseline migration creates huitzo_app and huitzo_auth), and huitzo_app for runtime |
| SSL | Recommended for cloud connections |
When using external Redis:
| Requirement | Value |
|---|---|
| Version | Redis 6+ (8 recommended) |
| Mode | Standalone or Sentinel (Cluster not supported) |
| Persistence | AOF recommended for task queue durability |
| Memory | 256 MB minimum, 1 GB recommended |
Verifying external connections¶
Before starting Huitzo, verify connectivity from the host:
# pseudocode
psql "<admin connection string>" -c "SELECT version();"
redis-cli -u "<redis url>" ping
File storage¶
Uploads and pack output files go through the platform file store. The backend
selects it with HUITZO_FILE_STORAGE_BACKEND:
| Backend | Where files live |
|---|---|
local (default) |
/app/data/files in the huitzo-files volume, shared by the backend and the workers |
s3 |
One S3-compatible bucket (AWS S3, MinIO, Cloudflare R2, Spaces), shared by every tenant and key-isolated per tenant |
Local filesystem (default)¶
The customer install uses local storage. The huitzo-files volume is mounted
into the backend and worker containers, GET /api/v1/setup/status checks
that the directory is writable, and backup.sh archives the volume
(Backups). Nothing needs configuring.
S3-compatible storage¶
Deployment-wide S3 storage is implemented in the backend, but the customer compose does not pass its variables to the containers. Like external services, using it on a customer install must be agreed with Huitzo before the install. The settings:
# pseudocode
HUITZO_FILE_STORAGE_BACKEND=s3
HUITZO_S3_BUCKET=<bucket> # required with s3
HUITZO_S3_REGION=us-east-1
HUITZO_S3_ENDPOINT=<https://minio.example.com> # unset targets AWS
HUITZO_S3_ACCESS_KEY_ID=<key id>
HUITZO_S3_SECRET_ACCESS_KEY=<secret>
HUITZO_S3_USE_SSL=true
HUITZO_S3_PATH_STYLE=false # a custom endpoint always uses path style
s3 without HUITZO_S3_BUCKET fails every file operation with a message that
names the missing setting. Independently of this setting, a pack can name a
tenant's own s3 integration, and that connection always wins for the pack.
HTTP Security for External Integrations¶
Packs that integrate with external APIs (e.g., Maxerience, Stripe) declare allowed domains in their manifests.
Security Model¶
- Pack declares
allowed_domainsinhuitzo.yaml - Platform enforces domain restrictions at runtime
- Requests to unlisted domains are blocked with
HTTPSecurityError - There is no platform-wide allowlist: a request to a domain the pack does not declare is blocked
See Configuration Reference for all HTTP options.
Publishing Packs¶
There is no install endpoint and no pack directory to copy files into. At startup the backend loads the active version of every pack registered in its database, and a pack is registered by publishing it: the publish uploads the wheel and manifest, and the backend installs that build into a per-version venv server-side. Restarting the stack never picks up new pack files.
From the pack's source directory, as a developer-mode account:
# pseudocode
huitzo login --url https://<host>
huitzo pack publish # builds the wheel, creates the pack if new, uploads the version
huitzo pack list # verify
huitzo pack publish calls POST /api/v1/packs and
POST /api/v1/packs/{pack_id}/versions; see REST API
for both, and the CLI overview for the CLI. The
manifest format is in Pack manifest. A Core Preview
license allows private packs only. Step-by-step:
Quick Start — Publish Intelligence Packs.
Configuration Reference¶
Deployment mode¶
The customer images run with HUITZO_DEPLOYMENT_MODE=self_hosted, set in the
compose file. It activates license enforcement and single-tenant behaviour and
leaves out the hosted-SaaS code paths. Do not change it.
Environment variables¶
install.sh writes /opt/huitzo/.env (mode 0600) on the first run and never
overwrites it. The compose file reads it for interpolation: only the variables
the compose file references reach the containers. After editing .env, run
docker compose up -d from /opt/huitzo. The full list of backend settings is
in the Configuration reference.
| Variable | Default | Description |
|---|---|---|
HUITZO_JWT_SECRET_KEY |
generated | Session signing key |
HUITZO_DB_SUPERUSER_PASSWORD |
generated | Password of the huitzo database superuser, used by postgres and migrate (roles and rotation) |
HUITZO_DB_APP_PASSWORD |
generated | Password of the huitzo_app runtime role, used by backend, worker and beat |
HUITZO_DB_BACKUP_PASSWORD, HUITZO_DB_BACKUP_AUDIT_PASSWORD |
generated | Passwords of the huitzo_backup and huitzo_backup_audit roles, used by the backup service only (Backup service) |
HUITZO_BACKUP_CTL_HMAC_KEY, HUITZO_BACKUP_TICKET_KEY |
generated | The backend↔backup control-plane key and the backend-only download-ticket key |
HUITZO_BACKUP_AGE_RECIPIENTS |
empty | Your age public recipients; backups are refused until one is set (Encryption keys) |
HUITZO_REDIS_PASSWORD |
generated | Redis password |
HUITZO_AUDIT_PEPPER |
generated | Audit-log redaction pepper |
HUITZO_SECRETS_ENCRYPTION_KEY |
generated | Encrypts stored secrets, encrypted columns and the LLM provider API keys (64 hex characters). Losing it loses every stored secret. After a rotation, back up HUITZO_SECRETS_LOOKUP_HASH_KEY too |
HUITZO_TLS_MODE, HUITZO_DOMAIN, HUITZO_ACME_EMAIL, COMPOSE_PROFILES |
from install flags | The access mode and the https profile (HTTPS profile) |
HUITZO_EDGE_TRUSTED_PROXIES |
Caddy's address with --domain |
The proxy the dashboard trusts for the client address |
HUITZO_NETWORK_SUBNET, HUITZO_NETWORK_DYNAMIC_RANGE, HUITZO_CADDY_ADDRESS |
172.16.231.0/24, 172.16.231.128/25, 172.16.231.10 |
The compose network |
HUITZO_DASHBOARD_PORT |
127.0.0.1:3000 |
Where the dashboard is published on the host |
HUITZO_LICENSE_DIR_HOST |
./license |
The host license directory, mounted read-only at /etc/huitzo/license/ |
HUITZO_BRANDING_PATH_HOST |
./branding |
White-label branding directory (White-label) |
HUITZO_LOG_LEVEL |
INFO |
Logging level |
HUITZO_LICENSE_CHECK_INTERVAL |
3600 |
Seconds between license file re-reads. Capped at 3600; a higher value refuses to boot |
HUITZO_CELERY_SSL_CA_CERTS |
empty | CA bundle for a rediss:// broker (Celery broker TLS) |
HUITZO_TRUSTED_PROXY_CIDRS, HUITZO_LOGIN_IP_RATE_LIMIT_PER_MINUTE, HUITZO_PLATFORM_STAFF_EMAILS |
unset | Passed to the backend only when set |
HUITZO_WORKER_TOKEN |
empty | Worker heartbeat authentication; empty disables the fleet view |
CELERY_QUEUES |
fast,medium,long |
Queues the workers consume |
SENTRY_DSN, SENTRY_ENVIRONMENT |
empty | Dashboard error reporting |
Fixed in the compose file, not in .env: HUITZO_DEPLOYMENT_MODE=self_hosted,
HUITZO_LICENSE_PATH=/etc/huitzo/license/license.json, and the database and
Redis URLs built from the passwords above.
Volumes¶
| Volume | Container path | Holds |
|---|---|---|
postgres-data |
/var/lib/postgresql/data |
The database, including the deployment ID |
redis-data |
/data |
Redis persistence |
huitzo-license-data |
/app/license-data (backend only) |
The deployment root key, the volume copy of the deployment ID and the one-time setup token |
huitzo-files |
/app/data/files |
Uploaded and generated files |
huitzo-packs |
/app/data/packs |
Installed Intelligence Packs |
huitzo-dashboards |
/app/data/dashboards (backend only) |
Installed dashboards |
caddy-data, caddy-config |
/data, /config (Caddy) |
https profile only: the TLS key runners pin |
The license itself is a file on the host, license/license.json in the install
directory, bind-mounted read-only at /etc/huitzo/license/ into the migrate,
backend, worker and beat containers. What to back up is listed in
Backups.
Operations¶
Day-2 tasks (status, logs, restarts, packs, health checks) are in
Operations. Upgrades run the new release's install.sh; do not
pull images by hand (Upgrade). Backups and restores use
backup.sh (Backups).
Production recommendations¶
- HTTPS. Serve the deployment with the release's
httpsprofile (install.sh --domain, HTTPS profile) or your own TLS proxy (--external-tls). Remote plain HTTP is not supported (why). - Backups. Run
/opt/huitzo/backup.shdaily (for example from cron) to encrypted storage, and test a restore on a separate host before go-live. - Monitoring. Poll
https://<host>/healthfor liveness andhttps://<host>/api/v1/setup/status(no sign-in needed) for readiness, including the license and beat checks. See Observability. - Logs. The compose file already caps container logs (
json-filedriver, 10 MB per file, 5 files per container); no Docker daemon change is needed.
Troubleshooting¶
| Symptom | Check |
|---|---|
| A service will not start | docker compose ps and docker compose logs <service> from /opt/huitzo. A missing required secret in .env names itself when compose starts |
backend, worker or beat never start |
docker compose logs migrate: they wait for the migration to complete |
| The dashboard loads but API calls fail | docker compose logs backend; the dashboard proxies /api/ to it |
| Every route except setup returns 402 | The deployment is in setup mode or the license is INVALID; read https://<host>/api/v1/setup/status |
| Scheduled runs do not fire | The beat check on setup/status and docker compose logs beat worker (Celery beat) |
| Worker not processing tasks | docker compose logs worker, then docker compose restart worker |
For license problems, see License troubleshooting. Install and licensing questions go to [email protected]; report security vulnerabilities to [email protected].
Licensing¶
A self-hosted deployment runs on one Huitzo-signed license.json, verified on
the host with no license server and no network call. It names the deployment ID
it was issued for. Without a usable license for this ID, the backend boots in
setup mode, which serves only health, /api/v1/setup/* and the license routes.
A license is VALID until expires_at, then GRACE for the grace window
signed in the file (14 days, 7 for Demo/POC), then INVALID: protected routes
return 402 and the workers run nothing. Request a license on
Request a license; place, check, renew and reload it
with License Status and Renewal. License settings are
in the Configuration reference; editions in
Core editions. Legal questions about the
license agreement go to [email protected].
Checking license status (in-app)¶
The dashboard's admin settings show a License card: the state (valid,
grace or invalid), the edition, the expiry, the deployment ID with a copy
button for the license request, and the six license limits. A tenant admin
or owner also sees current usage beside each limit. The card is read-only.
The card reads GET /api/v1/license/status, available to any signed-in user
and exempt from the 402 gate so it works when the license has lapsed. It
returns:
| Field | Meaning |
|---|---|
state |
valid, grace or invalid |
tier, edition |
The edition (preview, licensed, enterprise); both carry the same value |
purpose |
The signed purpose (ADR-008 D8): demo_poc, pilot, nfr or paid; null on enterprise, in setup mode, and on any invalid state (including expired past grace) |
valid_until |
The file's expiry |
last_validated |
When the file was last read and verified |
grace_expires |
When the grace window ends |
ceilings |
The limit for each of the six claims; null means unlimited |
usage |
Per claim {limit, current, source}; current is returned only to the tenant's admin and owner |
licensed_packs |
The pack allow-list |
detail |
A readable status message; a license for another deployment names both IDs |
deployment_id |
This deployment's ID (hzd_ plus 26 characters) |
licensed_deployment_id |
The ID the license file names, or null when no file was read |
white_label |
Whether the license grants white-label branding |
GET /api/v1/setup/status answers without sign-in and reports the deployment
ID, the license state and purpose, and the readiness checks, which is how you read the ID
before any admin exists. POST /api/v1/license/reload re-reads the file at once
(tenant admin or owner). On a Core Preview every Hub screen carries the
"Preview — not for production use" banner.
SaaS vs Self-Hosted Licensing¶
| Aspect | SaaS | Self-Hosted |
|---|---|---|
| Billing | Stripe subscription | License agreement with Huitzo |
| License | Huitzo-operated | A Huitzo-signed license.json verified on the host |
| Renewal | Automatic | Install a newly signed file and reload |
| Limits | Subscription plan | The signed limit claims in the file |
Usage Tracking & Billing Isolation (ADR-035)¶
A self-hosted deployment runs fully operational with SaaS billing absent, unconfigured, or unreachable — metering is a reporting feature there, never a gate. Two independent, opt-in flags control it (full contract: ADR-043 DR-24d for measurement, ADR-035 §8 for billing):
| Flag | Default | Effect |
|---|---|---|
HUITZO_USAGE_TRACKING_ENABLED |
false |
Core per-tenant usage measurement. Records one append-only execution_usage row per metered event (tokens, compute time, speech characters, metering units) for every tenant, in Core, with or without the SaaS extension. Measured quantities only — no wallet, no lots, no ledger, no prices, no outbound calls. A failed or slow write (bounded at 2 s) is logged and counted, never raised, so it can never block a command. LLM calls are recorded on every route: platform-key, bring-your-own-key (CUSTOMER_MANAGED) and local inference (SELF_HOSTED, with tokens when the local engine reports them, otherwise a call-count row). Off: nothing is written and no database session is opened. |
HUITZO_SAAS_BILLING_ENABLED |
false |
The named opt-in for outbound SaaS billing calls, wallet debits, and hard enforcement (HTTP 402). |
The customer compose passes neither flag, so both are off on a customer install.
# pseudocode — the guarantee this pair of flags makes true for the ADR-035
# reservation/settlement ledger specifically
if not HUITZO_SAAS_BILLING_ENABLED:
reservation_never_refuses() # never raises for lack of credits
settlement_never_debits() # no ledger entry is ever written
Notes for a self-hosted operator:
- Turning
HUITZO_SAAS_BILLING_ENABLEDon without the internal image that ships the SaaS billing extension is inert — it is logged once at startup and changes nothing. It is never a startup error, so a config file copied from another environment produces a warning, not an outage. - The two flags are independent: turn on
HUITZO_USAGE_TRACKING_ENABLEDalone for per-tenant usage measurement with no relationship to Huitzo SaaS, and leave billing off.HUITZO_SAAS_BILLING_ENABLEDalone governs the SaaS extension's own usage events; it never reads the tracking flag. - Measurement is visibility, not enforcement: licence limits count executions
directly and never read
execution_usage, so turning measurement off cannot lift a limit. - The two flags above are the only things in Core that can refuse a command on credit, so a command is never blocked on credit while both are off.
- The customer image is built without the SaaS extension: it ships no
huitzo_ext_saaspackage at all, so there is no billing code present for either flag to activate.
Next Steps¶
- Quick Start – Install from the signed release assets
- Operations – Day-2 operations
- Upgrade – Move to a new release
- License Status and Renewal – Check, renew and reload the license