- Shell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
CI / validate (push) Successful in 13s
Source-Snapshot: 3d14a5cab796a06d153a110d8f9635064e695556 |
||
| .forgejo/workflows | ||
| logs | ||
| scripts | ||
| .env.example | ||
| .gitignore | ||
| .secretlintignore | ||
| .secretlintrc.json | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| docker-compose.yml | ||
| LICENSE | ||
| NOTICE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| SECURITY.md | ||
| stack-record.matrix | ||
| SUPPORT.md | ||
| VERSION | ||
Xtrape Stack
The integrated Docker Compose stack for Xtrape CE, and the home of the public stack record: which immutable component images form a validated, reproducible combination. One repository serves as the quickstart for a clean host and as the deployment vehicle for the public demo and nightly channels.
- stable (default): the 0.8.7 stack record — Platform, Panel, Exposure and
the reference Widget (linux-ops), pinned in
.env.exampleto coordinates onforgejo.xtrape.com/xtrape-project. ReadSTACK_RECORD_STATEbefore trusting the pins:UNSEALEDmeans a release candidate — the tags the frozen matrix (stack-record.matrix) names, not yet proven pullable;SEALEDmeans every pin istag@sha256:digestread anonymously from the public registry (scripts/seal-pins.sh) — published, immutable, publicly readable. The clean-host acceptance run (xtrape-docs#271) is separate, higher evidence recorded on that issue, not a bit in this file. - nightly: latest
mainbuilds, reset nightly, no stability promise.
The stack version is in VERSION; component versions are the pins.
Quickstart (clean host)
Requirements: Docker with Compose v2, linux/amd64 capable host, curl,
python3. Nothing private: no registry credential, no maintainer access.
(While the record is UNSEALED the images may not exist yet — see above.)
git clone https://forgejo.xtrape.com/xtrape-project/xtrape-stack.git && cd xtrape-stack
cp .env.example .env # stable channel by default
./scripts/bootstrap.sh [email protected]
# → prints a one-time temporary password; copy it now
bootstrap.sh migrates the database, creates the first owner and the stack's
admin control client through the Platform's own bootstrap, starts Platform +
Panel, and then runs scripts/govern.sh, which mints
every Platform identity through the Platform's admin API — the Panel's
Device Instance, the Widget's registration token, Exposure's workload identity,
an AI Account with a governed Account Token (the Widget's callback secret is
the one deployment-generated value, drawn locally from /dev/urandom) —
reconciles the deployment's
authority (admission mapping, exposure rules, entitlements, token scope) and
starts the Widget and Exposure. No database row and no registry entry is
edited by hand; re-run govern.sh after every upgrade, it is idempotent.
Open http://localhost:8080, sign in with the username you passed and the
temporary password; you will be required to set a new password on first login.
No application credentials live in environment files you write: the values
the Platform mints for this deployment are appended to .env between the
STACK-MANAGED markers (mode 0600), and the admin / AI tokens live in
.stack/credentials.env (0600, gitignored).
Verify the install — this is the acceptance evidence of xtrape-docs#271:
./scripts/self-check.sh --outage
It proves, in order: the version handshake through Panel; the Widget's Worker
registered and HEALTHY; the AI face projecting the Widget's READ_ONLY
Checkpoints; a governed read through the MCP endpoint succeeding; the
Platform holding the correlated audit rows for that invocation; and, with
--outage, that a stopped Worker leaves no false HEALTHY instance and
comes back on restart. It ends with a run record: stack version, Platform
version, the reference each service is configured from (tag@sha256:… once
sealed, asserted against the record) and, separately labelled, the local
image id.
Doors and boundary
| Door | Where | Who |
|---|---|---|
| Panel | PANEL_PORT (8080) |
humans; the platform is reached only through Panel's same-origin /platform-ce proxy |
| Exposure MCP | EXPOSURE_BIND:EXPOSURE_MCP_PORT (127.0.0.1:8082) /mcp |
AI clients, bearer = the AI Account Token from .stack/credentials.env |
Nothing else is published. The Widget registers outbound-first: it dials
the Platform, and its callback listener is reachable only on the compose
network (PLATFORM_CE_ALLOWED_INSTANCE_HOSTS is the SSRF allowlist for that
registration; keep it as narrow as your Services require). To offer the MCP
door beyond the host, put your own TLS ingress in front of it, set
EXPOSURE_BIND and EXPOSURE_PUBLIC_URL accordingly.
Single tenant, single node, SQLite — the supported CE boundary. No HA, no multi-tenancy; see the supported/unsupported matrix in the Xtrape documentation (https://xtrape.com/).
Channels, pins and the stack record
Switch channels by changing the image variables in .env (see
.env.example). Nightly images carry no digest pins and may break at any
time; production deployments pin tag@sha256:digest from a sealed stack
record.
scripts/check-pins.sh— the record gate: the pins are exactly the frozen matrix (stack-record.matrix: key, public repository, version — four components;SERVER_CE_IMAGEis the deprecated alias and must equalPLATFORM_CE_IMAGE), no missing or extra pin; aSEALEDrecord has a digest on every pin;--require-sealedis what a release tag demands.scripts/seal-pins.sh— resolves every pin's digest by an anonymous read of the public registry and rewrites.env.example; refuses when a coordinate is not anonymously readable.scripts/validate-release-version.sh <version>— a release tagv<x>must equalVERSIONand the record must be sealed.
Upgrading: change the pins in .env, docker compose pull,
docker compose up -d, then ./scripts/govern.sh (reconciles authority for
the new component versions) and ./scripts/self-check.sh. Platform
migrations are forward-only: keep backup.sh archives together with the pins
they ran under (see scripts/README.md).
demo / nightly boxes
scripts/reset.sh performs a full reset: teardown including data (which
invalidates every minted credential — the managed block of .env and
.stack/ are cleared), re-pull, the same bootstrap.sh path a clean host
takes plus a published hands-on operator, and self-check.sh. Every reset is
therefore a complete clean-host install exercise of this quickstart.
scripts/nightly-deploy.sh is the cron entrypoint and encodes the deployment
cadence: releases update the pins here through the normal PR flow, but boxes
apply updates only at the next 03:00 local run — never immediately on merge.
On update it first syncs the managed pin variables (PLATFORM_CE_IMAGE —
canonical, SERVER_CE_IMAGE — deprecated alias, PANEL_CE_IMAGE,
EXPOSURE_IMAGE, LINUX_OPS_IMAGE) from .env.example into the box's
.env, leaving box-local settings untouched; nightly-channel boxes set
PIN_SYNC=false to keep their nightly image lines. If the checkout is
unchanged, it redeploys only when RESET_ALWAYS=true. Both toggles resolve
environment > .env > default.
Reset credentials (RESET_OWNER, RESET_DEMO_USER, RESET_DEMO_PASSWORD)
never go into the crontab: reset.sh sources a root-only env file, by default
/etc/xtrape-stack/reset.env (override with RESET_ENV_FILE); an
already-populated environment wins over the file. Provision it once:
install -d -o root -g root -m 755 /etc/xtrape-stack
install -o root -g root -m 600 /dev/null /etc/xtrape-stack/reset.env
cat > /etc/xtrape-stack/reset.env <<'EOF'
[email protected]
[email protected]
RESET_DEMO_PASSWORD=<published hands-on password>
EOF
0 3 * * * cd /opt/xtrape-stack && ./scripts/nightly-deploy.sh >> logs/nightly.log 2>&1
What ships, truthfully
| Component | Role | Status in this record |
|---|---|---|
xtrape-platform-ce |
control plane | shipped |
xtrape-panel-ce |
human face | shipped |
xtrape-exposure |
AI face (MCP) | shipped |
linux-ops-widget-nodejs |
reference Widget | shipped; its task library grows through its own governed entries (Panel → the Service → manage tasks) |
xtrape-telegram |
optional adapter | not part of this compose; a separate profile |
| Repository / Launcher / Studio / Workbench | lifecycle products | planned — not implied by this stack |
Layout
docker-compose.yml Platform + Panel + Exposure + linux-ops (frozen names: service `server`, volume `server-data`)
.env.example the public stack record (pins) + host settings
VERSION the stack version
scripts/bootstrap.sh first owner + admin control client, then govern.sh
scripts/govern.sh mint identities via the admin API, reconcile authority, start Widget + Exposure (idempotent)
scripts/self-check.sh docs#271 acceptance evidence (+ --outage)
scripts/check-pins.sh the stack record gate; scripts/seal-pins.sh seals it with anonymous digests
scripts/lib/ govern.sh (authority reconciliation), grant.sh, wire.sh, dotenv.sh
scripts/reset.sh · nightly-deploy.sh · backup.sh · restore.sh
License
Apache-2.0 (see LICENSE / NOTICE). Xtrape trademark and brand use are
governed separately by the project's trademark policy.