Skip to content

Latest commit

 

History

History
278 lines (206 loc) · 8.16 KB

installation.md

File metadata and controls

278 lines (206 loc) · 8.16 KB

Installation

This guide bootstraps a local ChimerAI checkout on the machine that will run Ansible. It does not deploy services.

Use this guide when starting from a fresh clone. If the repo is already bootstrapped, the most common commands are:

chimerai config edit
chimerai validate
chimerai apply
chimerai backup

Prerequisites

ChimerAI currently targets Linux hosts, with Ubuntu 24.04 as the primary test platform. The installer also has basic macOS detection for controller-side tooling, but the service roles are not yet validated for macOS targets.

Install these before starting:

  • git
  • curl
  • tar
  • Docker with Compose v2, if you want validation to check the Docker runtime
  • a DNS zone you control, if you want public Traefik ingress and Let's Encrypt
  • public inbound access to ports 80 and 443, if you use HTTP-01

Why Docker is not installed here: the current installer bootstraps the local ChimerAI control environment. Docker installation and hardening belong in the Ansible role path, where host changes can be validated and made repeatable.

Clone The Repository

git clone https://github.com/vpatel9202/ChimerAI.git
cd ChimerAI

Run The Bootstrap Script

./install.sh

The script performs local setup only:

  • installs uv if it is missing;
  • installs sops and age to ~/.local/bin if they are missing;
  • links ~/.local/bin/chimerai to this checkout's bin/chimerai;
  • runs uv sync --locked;
  • installs Ansible Galaxy collections from requirements.yml.

The script does not:

  • clone the repository;
  • edit shell startup files;
  • create encrypted ChimerAI config;
  • deploy or remove services.

If ~/.local/bin is not on your PATH, the installer prints the shell export line you need to add manually.

Why the installer links instead of copying: a symlink keeps chimerai pointed at the current checkout, so updates to bin/chimerai take effect without reinstalling the command.

Initialize Local Config

After bootstrap, create the ignored encrypted config file:

chimerai config init

Edit it with:

chimerai config edit

Verify it can decrypt:

chimerai config validate

For the first public stack, edit at least these values before applying:

chimerai_domain: example.com
chimerai_acme_email: admin@example.com
chimerai_ingress:
  tls:
    staging: true
chimerai_services:
  authentik:
    host: auth.example.com
    bootstrap_email: admin@example.com
    bootstrap_password: replace-me
    bootstrap_token: replace-me
    secret_key: replace-me
    postgres_password: replace-me
  openclaw:
    host: openclaw.example.com

Keep staging: true until DNS and routing are known-good, then switch it to false to request production Let's Encrypt certificates.

Back up the age identity printed by chimerai config init, normally ~/.config/sops/age/keys.txt. If that key is lost and the config was not encrypted to another recipient, the local ChimerAI config cannot be decrypted.

Validate The Host

Run validation before applying anything:

chimerai validate

This loads the encrypted config, validates required variables, checks Docker and Compose access, and runs safe role diagnostics. Public deployments should route app traffic through Traefik on ports 80 and 443; validation reports a warning when UFW is inactive or port exposure needs review.

If Docker access fails with a socket permission error, fix Docker access for your user or run the lower-level Ansible command with the appropriate privilege model for your host. ChimerAI does not silently escalate privileges.

Apply When Ready

Only apply once the config is correct:

chimerai apply

During apply, ChimerAI uses the encrypted Authentik bootstrap token to create or update proxy providers, applications, and embedded outpost membership for ChimerAI-managed apps that require ingress auth. It also writes a generated verification note under the Authentik deployment directory, normally:

/opt/chimerai/authentik/AUTHENTIK_SETUP.md

If Authentik was first started without bootstrap_token, create an API token manually in Authentik, add it to the encrypted config as chimerai_services.authentik.bootstrap_token, and rerun chimerai apply.

To enable the optional Todoist MCP role, add mcp_todoist and mcp_gateway to chimerai_enabled_roles, then store a real Todoist API key in the encrypted config. The service is private by default and exposes http://127.0.0.1:13002/mcp for host-based MCP clients.

When openclaw is enabled with MCP service roles and mcp_gateway, ChimerAI attaches OpenClaw to the private MCP network and registers catalog entries such as Todoist at their Docker-internal MCP endpoints. To validate an LLM actually using Todoist, configure both a real Todoist API key and a real OpenClaw provider key, then run a read-only OpenClaw agent prompt.

If OpenClaw's mcp CLI hangs on a specific image version, set chimerai_services.openclaw.mcp_registry_enabled: false to keep the MCP gateway catalog and private network wiring while skipping OpenClaw registry reconciliation. The registry command is timeout-bound by chimerai_services.openclaw.mcp_cli_timeout, default 20 seconds.

Run OpenClaw's first-time onboarding in the generated gateway container:

chimerai openclaw onboard

That helper runs OpenClaw's pre-start onboarding path through the generated openclaw-gateway service, then starts the gateway service again so it can use the generated config.

Remove ChimerAI-managed services with:

chimerai remove

Persistent app state should not be deleted unless a role explicitly documents and requires an opt-in for state removal.

Back Up And Restore

ChimerAI alpha backups use Restic. Enable backups in the encrypted config before running them:

chimerai_backup:
  enabled: true
  engine: restic
  repository: /opt/chimerai/backups/restic
  password: replace-me

Use a real Restic password in the encrypted config, or set password_file to an absolute path that exists on the host. For production-like use, prefer a remote Restic repository such as S3 or B2 instead of a local path.

Run:

chimerai backup

The backup action snapshots the configured state root and writes a pre-backup Authentik Postgres dump when the Authentik Compose project exists. Restore with:

chimerai restore

Restore uses the configured repository and restores the latest snapshot to / by default. Stop affected services first if you are restoring over a live deployment.

Alpha Operational Gates

Before treating a host as alpha-ready:

  • run chimerai apply twice and confirm the second run has no material changes;
  • confirm the generated Authentik automation verification note matches the protected apps you expect;
  • verify OpenClaw is reachable only through the Authentik-protected Traefik route;
  • if Todoist MCP is enabled, verify OpenClaw's MCP registry contains the Todoist server, or confirm the registry step was intentionally disabled with openclaw.mcp_registry_enabled: false, and run a read-only OpenClaw agent prompt with a real provider key;
  • run chimerai backup and confirm Restic can list the snapshot;
  • keep Let's Encrypt staging enabled until DNS, firewall, and routing are confirmed, then switch to production certificates.

Installer Options

./install.sh --force-link

Replace an existing ~/.local/bin/chimerai link or file.

./install.sh --force-tools

Reinstall sops and age even if existing commands are found.

./install.sh --skip-tools

Skip sops and age installation. Use this if you manage those tools through your operating system package manager.

Update An Existing Checkout

Pull the latest repo changes, then rerun the installer:

git pull
./install.sh
chimerai validate
chimerai apply

Rerunning the installer is safe: it reuses existing tools when possible, refreshes Python and Ansible dependencies, and keeps the CLI symlink pointed at this checkout. During alpha, chimerai apply is the supported way to re-render config and restart managed services after changing image tags or settings; a separate update action is intentionally not part of the alpha lifecycle.