Skip to content

Install on Linux

Linux is the reference platform: it runs the server and workers.

Git, Node.js 22+, Docker Engine with the Compose plugin, and openssl (the installer uses it to generate secrets). See the hardware table.

  1. Clone and install dependencies.

    Terminal window
    git clone https://github.com/surr-jc/azhi-flow && cd azhi-flow
    npm ci
  2. Run the installer.

    Terminal window
    deploy/install.sh

    It checks for Docker, Compose and openssl, writes deploy/.env once with a random server secret and database password (mode 0600, git-ignored), pulls the PostgreSQL and Temporal images, builds the server image, starts everything, waits until all three containers are healthy, and prints the owner token. Re-running it upgrades in place and keeps deploy/.env.

  3. Add model access. Store a provider key and set a model, then re-run the installer.

    Terminal window
    npx azhi secret set anthropic-api-key --value sk-ant-... # or openai-api-key
    # put AZHI_ANTHROPIC_MODEL (or AZHI_OPENAI_MODEL) in deploy/.env
    deploy/install.sh

Workers run scripts and harnesses. Run one on this host or on another Linux machine.

  1. On the worker host, clone and install (omit dev dependencies if you like; this includes the pinned OpenCode binary).

    Terminal window
    git clone https://github.com/surr-jc/azhi-flow && cd azhi-flow
    npm ci --omit=dev
  2. Point it at the server and sign in.

    Terminal window
    export AZHI_URL=http://<server>:7400
    export AZHI_TEMPORAL_ADDRESS=<server>:7233 # localhost:7233 on the same machine
    npx azhi login --url "$AZHI_URL" --token <owner token>
  3. Start the worker.

    Terminal window
    npx azhi worker start --trust workspace-publishers
  4. Check the tools OpenCode steps need, then verify.

    Terminal window
    npx azhi setup # git, OpenCode, ripgrep; prints the install command for your distro
    npx azhi doctor # database, Temporal, interpreter builds, workers online

Script nodes also need uv (Python 3.12) and/or Bun on the worker. Details for ripgrep and token saving are on Workers and OpenCode tools.

All are environment variables.

VariableDefaultUse
AZHI_PORT7400API and web run page port
AZHI_PG_PORT, AZHI_TEMPORAL_PORT5432, 7233Published ports, for workers and the CLI
AZHI_TEMPORAL_VERSION1.29.1Temporal server image tag
AZHI_NODE_IMAGEnode:22-bookworm-slimBase image, for example a mirror when Docker Hub rate-limits
AZHI_SKIP_BUILDunset1 uses an azhi-flow/server image that is already loaded
AZHI_COMPOSE_PROJECTazhiRun a second, isolated stack on one host

More in the environment variable reference.

Terminal window
npx azhi doctor
npx azhi open # prints a link to Mission Control that signs the browser tab in

Next: First run.