Repository navigation
Description
Summary
Publish prebuilt Trinity images (platform services and the agent base image) to a public registry on every release, ship a pull-only hosted compose file, and make first boot fully unattended from cloud-init — so a fresh VM comes up serving Trinity in ~2 minutes with no on-box builds. This is the prerequisite for every one-click / marketplace channel (DigitalOcean, Vultr, Hostinger, Elestio, Dokploy, and the #835 Packer image).
Context
Today scripts/deploy/start.sh builds the agent base image on the host (scripts/deploy/build-base-image.sh → docker/base-image/Dockerfile, 5–10 minutes) and docker-compose.prod.yml uses build: blocks — no workflow pushes images to a registry. A marketplace 1-click that spends ten minutes compiling on first boot fails the "one click" bar, and managed hosts (Elestio) and template catalogs (Dokploy/Coolify/Hostinger Docker Manager) only accept pull-only compose files.
Findings from the 2026-08-18 hosting-channels research: every VM marketplace already ships Docker-socket-mounting apps (Coolify, CapRover, Dokku, OpenClaw), so Trinity's shape is accepted; the only blocker is packaging. #835 (Packer image for GCP + Hetzner) becomes thin once images are prebuilt — its "clone to /opt/trinity and build" acceptance criteria should be revisited to depend on this issue.
Acceptance Criteria
- A release workflow publishes versioned +
latestimages for backend, frontend, mcp-server, scheduler and the agent base image to a public registry (e.g. GHCR); multi-arch (amd64 required, arm64 desirable — Hetzner CAX / Umbrel). - A
docker-compose.hosted.yml(name TBD) pulls those images only — nobuild:blocks — and works with the same.envcontract asdocker-compose.prod.yml. -
start.sh --unattended(or the hosted compose) never asks for input:SECRET_KEY/INTERNAL_API_SECRET/ADMIN_PASSWORDauto-generated when absent and printed once; the setup form is never reachable unauthenticated on a public IP (either the admin exists at boot or the form is bound to a one-time token). - A cloud-init user-data example (extend
trinity-ops-public/provision/cloud-init.sh) takes admin password / domain / optional Cloudflare Tunnel token and results in a serving instance; documented indocs/DEPLOYMENT.md. - TLS story for a bare VM without a tunnel is decided and documented (Caddy sidecar or documented tunnel-only) — no HTTP-only default on a public IP without a stated warning.
- Minimum size stated wherever the hosted compose is documented: 8 GB RAM.
-
docs/AGENT_INSTALL_GUIDE.mdanddocs/DEPLOYMENT.mdreference the pull-only path as the default for servers.
Technical Notes
- Image pulls also fix the "fresh install races the base-image build" class of first-boot problems.
- Keep
docker-compose.yml(dev, build-from-source) unchanged; the hosted file is additive. - Downstream: One-click VM image for Trinity deployment (GCP + Hetzner) #835 (Packer), DigitalOcean/Vultr marketplace listings, Deploy-on-Hostinger button, Dokploy template — filed as siblings under Epic: Starter ops/DevOps agents — one-click Trinity instance management onboarding #1215.
Activity
obasilakis commentedon Aug 24, 2026
Scoping notes from 2026-08-21/24 — TLS decision settled, AC3 partly already shipped
AC5 (TLS story) is decided: Caddy + Let's Encrypt IP certificate, no domain required
Both facts verified first-hand:
shortlivedprofile, ~6-day validity,http-01/tls-alpn-01only (no DNS-01). https://letsencrypt.org/2025/07/01/issuing-our-first-ip-address-certificate/digitalocean/droplet-1-clicks,.github/agents/1-click-agent.mdrule 10 mandates Caddy +issuer acme+profile shortlivedfor any app with an HTTP interface.So the hosted stack comes up on browser-trusted HTTPS at its bare IP with zero user input. This supersedes the earlier "bring a domain or accept HTTP" framing: a domain becomes a post-login upgrade (longer-lived cert, memorable URL), not a prerequisite. Cloudflare Tunnel is explicitly not a v1 path — a named tunnel requires owning a domain and moving its nameservers to Cloudflare, i.e. strictly more setup than the Caddy path, and the account-free Quick Tunnel variant is documented "testing and development only", caps at 200 concurrent requests and has no SSE support, which breaks Workspace streaming (
GET /api/executions/{id}/stream).AC3, first clause: already shipped
scripts/deploy/start.shalready implements--unattended/TRINITY_UNATTENDED=1(#39/#443). It auto-generatesSECRET_KEY,INTERNAL_API_SECRET,CREDENTIAL_ENCRYPTION_KEY,AGENT_AUTH_SECRETandADMIN_PASSWORDwhen blank, and prints the generated admin password in the closing summary. The issue body is stale on this point — no new work needed.AC3, second clause: this is a real, unfiled security defect
"The setup form is never reachable unauthenticated on a public IP" is not satisfied today, and the cause is not the missing token.
On a fresh install
setup_completedis leftfalsepermanently, even thoughADMIN_PASSWORDcreated a real admin at boot.init_database()runsrun_all_migrationstwice and then_ensure_admin_user; on the second passsetup_completed_backfillfindsusersstill empty, does nothing, and is recorded as applied — so it never runs again.POST /api/setup/admin-passwordgates only on that flag, requires no auth, and callsdb.update_user_password("admin", …), which overwrites the existing admin's hash.docker-compose.prod.ymlpublishes8000:8000.Net effect: on any public-IP install, whoever reaches the box first can set the admin password and own it.
The fix is to make the flag honest (an admin row with a password hash means setup is complete) — it does not overturn trinity-enterprise#49's deliberate removal of the setup token, because the admin genuinely does exist at boot; only the flag lies. Recommend filing as its own P1 bug: it affects every existing public-IP install, not just the hosted path, and should not land buried in a packaging PR.
AC2 was at risk and is not —
VITE_API_URLis inertdocker/frontend/Dockerfile.proddeclaresARG VITE_API_URL(defaulthttp://localhost:8000) and bakes it into the image, which would make a prebuilt frontend unusable on a remote host. It is dead: no source file undersrc/frontend/srcreads it — the only occurrence is a comment warning against it (#722).src/frontend/nginx.confalready proxies/api/,/a2a/and/wstotrinity-backend:8000, so the SPA uses relative URLs. The frontend image is portable across any IP or domain and is safely prebuildable.AC1 note — agent base image name is hardcoded
trinity-agent-base:latestappears in 6+ backend locations (agent_service/lifecycle.py,system_agent_service.py,agent_service/helpers.py'strinity-agent-base:*allowlist glob) with no config knob. The hosted path should pull from GHCR and retag locally:One line in the provisioning script, zero backend change, no invariant touched. Introducing an
AGENT_BASE_IMAGEenv var would mean editing that allowlist glob and the base-image drift predicate — not worth it for v1.Work in progress
Branch
feature/2280-hosted-images-unattended-boot(worktree, nothing pushed). One file written:.github/workflows/publish-images.yml— matrix over the five Trinity-built images (backend, frontend, scheduler, mcp-server, agent-base) to GHCR onv*tags plusworkflow_dispatch,latestonly on a real tag, GHA layer cache, build provenance args forwarded forGET /api/version. amd64 only for v1 (DO Droplets and Vultr Cloud Compute both default to amd64; the ~1.9 GB agent base image cross-builds slowly and flakily under QEMU — arm64 deferred until Hetzner CAX / Umbrel need it). Checkout issubmodules: false, so the public images are OSS-only by construction rather than by an editable ignore rule.YAML validates; untested — no tag pushed, no dispatch triggered.
docker-compose.hosted.ymlnot yet written, pending the Caddy service above.Scope moved out
Detecting that an instance came from a marketplace, and showing a first-run HTTPS/VPN hardening guide, is now #2380 — a separate child of #2332. It is a product surface, not packaging.
obasilakis commentedon Aug 24, 2026
AC3 is done — ticked. #2385 (merged 2026-08-24, closes #2381) delivered both halves:
scripts/deploy/start.shalready hadensure_hex32_secret SECRET_KEY/INTERNAL_API_SECRET;--unattended(orTRINITY_UNATTENDED=1) now also generatesADMIN_PASSWORDwhen blank, writes it to.env, and prints it once in the closing summary. Interactive still fails fast on a blank password rather than inventing one.POST /api/setup/admin-passwordnow refuses whenever a usable admin exists — its own precondition, fail-closed, checked above the bcrypt hash — instead of trusting thesetup_completedflag, which lied on every fresh install.setup_completedis also reconciled at boot on both backends (PostgreSQL had no writer for the key at all).Before this,
--unattendedprinted a password the operator could not use: the wizard was still forced and replaced it. That is now honest.Residual, stated so it is not assumed away: the wizard still renders where no admin exists at boot — dev compose with a blank
ADMIN_PASSWORD, and a hand-rolled backend. That is exactly the premise ent#49 priced its tokenless window on, so it is the intended state, not a gap in this AC.Remaining on this issue is the packaging half: registry publish,
docker-compose.hosted.yml, cloud-init example, TLS decision, docs.obasilakis commentedon Aug 24, 2026
PR #2390 opened — AC1, AC2, AC5, AC6, AC7 (AC3 was already ticked by #2385).
Publish workflow → GHCR,
docker-compose.hosted.yml(pull-only, generated from prod, CI-guarded against drift), andstart.sh --hostedas a flag rather than a second installer.Two notes for whoever picks this up next:
trinity-agent-base:latest(hardcoded inlifecycle.py, SEC-172-allowlisted), and compose cannot retag — so--hostedpulls the GHCR copy and tags it locally. A baredocker compose -f docker-compose.hosted.yml up -dtherefore starts a platform that cannot create a single agent, failing later at agent-create time. The upgrade instruction is "re-runstart.sh --hosted", never "pull". Anything that writes a runbook against the hosted file needs to know this — that includes the feat: DigitalOcean Marketplace 1-Click Droplet listing for Trinity (vendor application + Packer snapshot, AI Agents category) #2281 Packer first-boot script./etc/trinity/install-sourceorTRINITY_INSTALL_SOURCE=do-marketplace). Adding the line now is free; adding it later means re-cutting and re-submitting the snapshot for Marketplace review.AC4 is not in this PR — the cloud-init user-data example lives in
trinity-ops-public, so it cannot land in a trinity PR. This issue stays open for it (the PR saysRefs, notFixes). That is the last thing between #2280 and done.fix(hosting): address review on #2390 — all ten findings (#2280)
13 remaining items
fix(workspace): the Files tab — uploads at once, an honest Download, …
obasilakis commentedon Sep 11, 2026
State of play for whoever picks this up (2026-09-11)
Survey of what has actually shipped against the ACs above, with the checks that produced it. Nothing here changes the design; it is the handover the next session would otherwise have to re-derive.
The images are live, public, and pullable without auth
Measured directly against the registry (no
gh auth, nodocker login— an anonymous pull token, which is also the proof that the packages are public):Compressed layer bytes, tag
0.9.5-rc2, amd64:trinity-backendtrinity-frontendtrinity-mcp-servertrinity-schedulertrinity-agent-baseThe third-party images
docker-compose.hosted.ymlpulls (redis:7-alpine,timberio/vector:0.43.1-alpine,alpine:3.20,otel/opentelemetry-collector-contrib:0.120.0) add roughly another 170 MB.That total is the number every imageless channel is costed against — #2282 (Vultr) pulls it at first boot rather than baking it, so it is a first-boot duration, not a build cost. On disk it lands at 8.8 GB with everything installed and Trinity running (measured on a droplet from the 2026-09-10 snapshot, recorded on #2281).
AC 1 is done except arm64
publish-images.ymlships (#2452), pre-release tags correctly withholdlatest(#2499) and thev-prefixed alias is fixed (#2505). What is not there is multi-arch: every manifest index carriesamd64plus anunknownattestation entry and nothing else.arm64 was written as "desirable" here, but it is load-bearing for exactly one downstream: Hetzner CAX on #835. It blocks nothing on DigitalOcean, Vultr or Hostinger, all of which sell amd64 by default.
Two facts that gate the community lanes (#2283, and #2282 until v0.9.5 is cut)
latesttag on GHCR yet. Only0.9.5-rc1,0.9.5-rc2,v0.9.5-rc2andsha-*— correct, since only pre-releases have been cut. Butdocker-compose.hosted.ymldefaults to${TRINITY_IMAGE_TAG:-latest}, so a copy-paste hosted install today resolves to a tag that does not exist.docker-compose.hosted.ymlis not onmain.GET /repos/abilityai/trinity/contents/docker-compose.hosted.yml?ref=main→ 404;mainis still 0.9.0.Both clear the moment v0.9.5 is cut to
main. Until then #2283's "raw compose URL onmain" AC is un-satisfiable, and any imageless provisioner (#2282) must pin an explicit tag rather than rely onlatest.The one AC with real work left: the cloud-init example
grep -n cloud-init docs/DEPLOYMENT.md→ no hits.trinity-ops-public/provision/does carrycloud-init.shplus per-provider notes (aws.md,gcp.md,hetzner.md,digitalocean.md,localhost.md), but nothing in this repo points at it.Do not write the example fresh.
packer/digitalocean/files/opt/trinity-firstboot/firstboot.shis now the working reference implementation of the unattended path — admin password (user-data or generated), metadata-derived IP,.envwriting via a rewrite-not-substitute helper, the Docker/ufw DROP rules, Caddy with a verified certificate, thenstart.sh --hosted --unattended. The doc example should be that script's provider-neutral core, which is also what #2282 needs; doing it once serves both.fix(sync-health): the cadence knob must reach the hosted compose too (#…
fix(sync-health): the sync-health poll no longer takes — or orphans —…
fix(config): wire OPERATOR_QUEUE_PROPOSAL_MAX_BYTES like its siblings (…
feat(operator-queue): agents raise asks natively — ask_operator, rece…
docs(operator-queue): platform alerts are conditions — one row per su…
docs(operator-queue): platform alerts are conditions — one row per su…
fix(operator-queue): platform alerts are conditions — one pending row…
fix(aauth): thread the AAUTH_* levers through both compose files; rev…
feat(aauth): outbound resource client + call_aauth_resource — an agen…
fix(nevermined): hosted compose mirrors DELEGATION_MAX_INFLIGHT (ent#…
feat(nevermined): fund an agent with a card — organization config, wi…