> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3iq.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Your First Node

Go from a provisioned B3IQ machine to a working local node: claim it, pick a model it can serve, smoke test, then earn.

This guide takes a provisioned machine to a working local node. Your machine
arrives with the host agent already installed and set up by B3IQ. You open the
local command panel, confirm the runtime and a model the hardware can actually
serve, run one prompt to prove it works, and then, optionally, claim the
machine to your B3 account so the dashboard, your gateway keys, and the CLI can
reach it.

Local inference works on its own. Nothing here requires an account. Claiming
connects the machine to your B3 account; earning on top of that is a further,
optional step with its own gates.



**Your machine arrives provisioned**

B3IQ installs and supervises the host agent on the machines it hosts and ships,
  so there is nothing to download or install yourself. The host agent binds setup
  and local inference to `http://127.0.0.1:8831`. Treat setup tokens, owner
  sessions, and local API keys as powerful local credentials.

## Steps

**Open the local command panel and claim the node**

Your provisioned machine already serves the local command panel. If you need
    a fresh tokenized URL from the machine itself, ask the host agent:

    ```bash
    b3iq-host wizard url --with-token
    ```

    In the wizard, create the first local owner account. From then on, setup
    access uses owner auth instead of relying on the bootstrap token. Then
    review the inventory the host agent reports: CPU, RAM, GPU, disk, OS,
    runtime, and network posture. Browser GPU checks are advisory; the host
    agent is the source of truth.

    Leave the machine in **Local Mode** for now. Managed Mode is a deliberate
    opt-in covered in the last step.

  **Pick a runtime and a model the machine can serve**

Choose a runtime the host agent detected, then pick a model profile sized to
    your hardware. The wizard recommends profiles your machine can realistically
    serve first; larger models demand more RAM, VRAM, and a stronger runtime and
    benchmark posture.

    Don't hardcode an artifact name. List what your node can actually run and
    pick a returned id:

    ```bash
    curl --fail --silent --show-error http://127.0.0.1:8831/v1/models
    ```

    Use a representative id like `qwen3-8b` only as a placeholder. The live set
    changes with your runtime and installed models, so always pick from the list
    above.

    Start small. A model that loads and answers quickly is worth more than a
      large model that swaps to disk and times out. You can install a bigger
      profile once the small one is proven.

  **Create a local API key**

Create a scoped `b3iq_local_` key in the wizard for local inference clients.
    Keep it out of shell history and process argv by writing it to a file with
    tight permissions:

    ```bash
    umask 077
    mkdir -p .secrets
    # Paste the local key, then press Ctrl-D.
    cat > .secrets/b3iq-local-key
    ```

  **Run the one-prompt smoke test**

Confirm the runtime answers end to end. This reads the key from a file and a
    temporary curl config so the secret never lands in argv. Replace the `model`
    value with an id from `GET /v1/models`.

    ```bash curl
    : "${B3IQ_LOCAL_KEY_FILE:=.secrets/b3iq-local-key}"
    B3IQ_LOCAL_BASE_URL="${B3IQ_LOCAL_BASE_URL:-http://127.0.0.1:8831}"

    cfg="$(mktemp)"
    chmod 600 "$cfg"
    trap 'rm -f "$cfg"' EXIT
    {
      printf 'url = "%s/v1/chat/completions"\n' "${B3IQ_LOCAL_BASE_URL%/}"
      printf 'request = "POST"\n'
      printf 'header = "Authorization: Bearer %s"\n' "$(sed -n '1p' "$B3IQ_LOCAL_KEY_FILE")"
      printf 'header = "Content-Type: application/json"\n'
    } > "$cfg"

    curl --fail --silent --show-error --config "$cfg" --data-binary @- <<'JSON'
    {
      "model": "qwen3-8b",
      "messages": [{ "role": "user", "content": "Run a local B3IQ smoke reply." }],
      "stream": false
    }
    JSON
    ```

    ```javascript node
    import { readFileSync } from "node:fs";

    const baseURL = process.env.B3IQ_LOCAL_BASE_URL ?? "http://127.0.0.1:8831";
    const token = readFileSync(
      process.env.B3IQ_LOCAL_KEY_FILE ?? ".secrets/b3iq-local-key",
      "utf8"
    ).trim();

    const response = await fetch(`${baseURL}/v1/chat/completions`, {
      method: "POST",
      headers: {
        authorization: `Bearer ${token}`,
        "content-type": "application/json"
      },
      body: JSON.stringify({
        model: "qwen3-8b",
        messages: [{ role: "user", content: "Run a local B3IQ smoke reply." }],
        stream: false
      })
    });

    console.log(await response.json());
    ```

    A JSON completion with a non-empty `choices[0].message.content` means your
      node serves local inference. That is a complete, working local node.

  **(Optional) Claim the machine to your account**

Switch the wizard to **Managed Mode** to generate an 8-character claim code
    (and QR). Redeem it from the B3IQ dashboard, signed in as the account you
    want to own the machine. Claiming is what makes the machine reachable. The
    dashboard, your gateway keys, and the CLI can only see a claimed machine.

    A brand-new machine also needs an onboarding code from the B3IQ team to
    join the fleet; a purchased machine arrives pre-onboarded and only needs
    the claim step. Claiming also turns on health alerts, so B3IQ emails you if
    the machine goes offline or its GPU or disk needs attention.

    **Verify with the CLI**

Once claimed, confirm the account can see the machine from a terminal
      instead of the dashboard: install the b3iq CLI, sign in, then run
      `b3iq status` or `b3iq doctor`. See [CLI](/developers/cli) for install
      options and the full command set.

    Earning is a further, optional step on top of claiming, and it is never
    automatic. Serving inference — yours or anything B3IQ routes here — is free
    and pays nobody. A machine earns by having its capacity rented, which is what
    Earn mode offers it for. See [Start Earning](/guides/start-earning) when you
    are ready.

## Common blockers

**The machine is provisioned but I can't reach 127.0.0.1:8831**

Check the service is up and the local listener is healthy:

    ```bash
    curl --fail http://127.0.0.1:8831/health
    b3iq-host status
    ```

    The default bind is loopback. If your machine is a LAN/appliance deployment,
    that requires an explicit non-loopback listener and network controls. See
    [Host agent](/operators/host-agent).
  **The model installed but requests time out or are very slow**

The profile is likely too large for the machine and is swapping. Pick a
    smaller model id from `GET /v1/models`, prove it with the smoke test, then
    size up. Larger models need more RAM, VRAM, and a stronger runtime posture.
  **The smoke test returns 401 or 403**

The local key is missing, malformed, or revoked. Create a fresh
    `b3iq_local_` key in the wizard and rewrite the key file. Local keys are not
    hosted gateway keys.
  **It works locally but nothing routes to it**

That's expected until you claim the machine and it clears route and model
    readiness. Local Mode alone is never reachable from your account. See
    [Route readiness](/operators/route-readiness) for the exact gate that is
    blocking you.

**Prove local inference before enrolling**

Get one clean smoke reply in Local Mode first. A machine that can't answer
    locally won't answer once it is routed to either.
  **Jump straight to a giant model**

A model that swaps to disk times out; right-size the profile to the
    hardware, then grow.

## Next

**[Runtimes](/operators/runtimes)**

Compare detected runtimes and which models each can serve.
  **[Setup wizard](/operators/setup-wizard)**

Understand the full claim, inventory, mode, model, and playground flow.
  **[Start earning](/guides/start-earning)**

Claim the machine, then offer its capacity in Earn mode.