ANHA in Run a node

ANHA is a protocol, not a hosted service: anyone can run a node, and no operator routes another operator's traffic. A node joins the distributed hash table, serves resolution locally, and verifies every record it ingests for itself.

OperatorDocker, or a Rust toolchainAbout 30 minutes

01

Install

  1. Run the node

    The published image carries the node and its tooling. Four ports matter: the network transport, the encrypted agent channel, the HTTP interface, and the health probes.

    The volume holds the record store and the key pins, so keep it across restarts.

    Terminal
    docker run -d --name anha-node \
      -p 9876:9876 -p 50051:50051 -p 3000:3000 -p 8080:8080 \
      -v anha-data:/root/.anha \
      anha-node:latest
  2. Or build and run it directly

    On Windows use the release build: the debug binary overflows its stack on startup.

    Terminal
    cargo build --release -p anha-cli
    ./target/release/anha start --listen /ip4/0.0.0.0/tcp/9876
  3. Join an existing network

    On a local network, peers find each other automatically. To join a public deployment, pass its bootstrap address — the operator publishes this, and a running node prints its own on start.

    Terminal
    anha start --bootstrap /ip4/[PEER IP]/tcp/9876/p2p/[PEER ID]

    Leave the network identifier unset unless you are deliberately starting a separate cluster. Setting it re-keys the whole keyspace and orphans every record already published.

  4. Keep key continuity on

    A node pins the last key it accepted for each handle and refuses a record signed by a different key without a valid rotation chain. This is what stops a hijacked handle resolving through you.

    It is on by default in the published deployment. The pins live on the data volume.

02

Test

Check the health probes

The node exposes liveness, readiness and metrics. Ready means it has joined the network and can answer resolution.

Terminal
curl localhost:8080/health
curl localhost:8080/ready

You should see

ok
ready

Then ask for something real

A passing check only proves the connection works. This proves the model can actually reach the tools.

anha resolve @nike.ai

03

Troubleshoot

  • The node starts but never becomes ready

    Cause — It has no peers. On a public network that means no bootstrap address was given.

    Fix — Pass a bootstrap address for the deployment you want to join. On a local network, check that both machines allow the transport port.

  • Resolution returns nothing for handles you know exist

    Cause — The node joined a different keyspace, because a network identifier was set.

    Fix — Leave the network identifier unset to join the main network. It is only for deliberately isolating a separate cluster.

  • A record is rejected on ingest

    Cause — Key continuity is working: the record is signed by a key that does not match the pinned one, with no valid rotation chain.

    Fix — This is the correct outcome for a hijack attempt. If it is a legitimate rotation, the record needs its supersede chain attached; the rejection is counted in the metrics.

  • The debug binary crashes immediately on Windows

    Cause — The debug build overflows its stack on startup.

    Fix — Build and run with --release.

Still stuck?

Every guide shares the same sign-in and the same tools, so a fix on another platform often applies here too.

All twelve guides