Skip to content

fix(onboarding): six defects in self-host deploy path #443

Closed

Description

@vybe

Summary

A first-time self-host walkthrough of Trinity surfaced six small defects in the deploy scripts, .env.example, MCP server, and Docker healthcheck. None are blocking, but together they make the "clone → start → login" path frustratingly easy to get wrong. Fixes are additive and low-risk.

Context

Friction report from a fresh clone + start.sh walkthrough. .env setup was entirely implicit, port 80 conflicted with no documented override, start.sh printed a misleading admin/password login hint, the MCP server logged a wrong URL (localhost:3000/api-keys), leftover agent containers persisted across re-installs, and docker compose ps flagged mcp-server as unhealthy despite it serving traffic.

Doc-side gaps (docs.ability.ai/getting-started pages) are tracked separately; the in-repo docs/user-docs/guides/* were already corrected alongside the generate-user-docs playbook in the same session.

Acceptance Criteria

  • scripts/deploy/start.sh — Auto-generate SECRET_KEY and INTERNAL_API_SECRET if blank (mirror the existing CREDENTIAL_ENCRYPTION_KEY pattern at start.sh:20-28); fail fast with a clear message if ADMIN_PASSWORD is blank so the operator can't boot into an unusable state.
  • .env.example — Add FRONTEND_PORT=80 with an inline comment explaining remap-on-conflict. The variable is already read by docker-compose.yml:83 and start.sh:43 but isn't documented as user-tunable anywhere reachable from the quickstart.
  • scripts/deploy/start.sh:48,50 — Replace the literal login: admin/password hint with something that reflects reality (e.g. login: admin (password from .env)), or drop the hint entirely. A new user will take "password" as the literal default.
  • src/mcp-server/src/index.ts:59 and src/mcp-server/README.md:62 — Remove or correct the hardcoded http://localhost:3000/api-keys hint. Port is wrong (frontend default is 80, not 3000) and ignores FRONTEND_PORT overrides. Prefer reading from env or dropping the URL.
  • Clean-reinstall path — Either add a --clean flag to scripts/deploy/stop.sh or ship a sibling clean.sh that removes lingering agent-* containers and the trinity-agent-network Docker network. Without this, a fresh install inherits leftover state and the first new agent collides on AGENT_SSH_PORT_START (2222).
  • src/mcp-server/Dockerfile:30-31 — Healthcheck currently does wget --spider http://127.0.0.1:8080/mcp. The /mcp endpoint doesn't answer a HEAD probe cleanly and docker compose ps shows unhealthy despite the service being alive. Point it at /health (which returns 200) instead.

Technical Notes

  • All six are independent — can ship as one PR or split; recommend one PR since they're all onboarding hygiene.
  • No schema, API, or runtime-behavior changes. No migration needed.
  • Verify Feature/process engine #6 manually by running docker compose ps after ./scripts/deploy/start.sh — MCP server should show healthy within 30s.
  • For Setup improvements #5, confirm that docker network rm trinity-agent-network is safe when the compose stack is down (it is — network is re-created by compose up).

Source: onboarding friction report, 2026-04-21.

Activity

  1. added
    priority-p2
    type-bug
    status-in-progress
    on Apr 21, 2026
  2. self-assigned this
    on May 13, 2026
  3. added
    status-in-dev
    and removed
    status-in-progress
    on May 28, 2026
  4. vybe commented on Jun 1, 2026

    @vybe
    ContributorAuthor

    Shipped in v0.6.0 (released via #998).

  5. added
    complexity-medium
    theme-infrastructure
    and removed
    status-in-dev
    on Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-mediumpriority-p2theme-infrastructuretype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions