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

# Environment variables

> Every environment variable Cerulion reads: logging, networking, recording, and live-run tuning.

All of these are optional — the defaults are the shape you want in production. A malformed value never silently changes behavior: Cerulion warns and falls back to the documented default.

## Logging

| Variable         | Meaning                                                                                                                              |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `RUST_LOG`       | Standard log filter, for example `RUST_LOG=cerulion=info,iceoryx2=warn`. A new workspace's `.cargo/config.toml` sets a sane default. |
| `IOX2_LOG_LEVEL` | The transport's own log filter. New workspaces default it to `error` so framework chatter does not drown out your logs.              |

Node logs are worth one note of their own. A node runs as a loaded library with its own log dispatcher, so `tracing::info!` from your `tick()` goes to **stderr** while the host's own logs go to stdout. The filter is `RUST_LOG` as captured when the graph started, an empty value means `info`, and `RUST_LOG=off` silences node-side logs entirely.

<Warning>
  Do not install a global `tracing` subscriber inside node code — the framework installs one before your node runs, and a second install panics and fails the node load. Control output with `RUST_LOG` instead.
</Warning>

## Networking

| Variable                  | Meaning                                                                                                                                                                                              |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `CERULION_NETWORK=off`    | Run local-only: no gateway process, nothing crosses the machine boundary. Honored by every entry point, and equivalent to `--network off`.                                                           |
| `CERULION_NETD_LISTEN`    | The locators the robot's shared network plane binds, for example `tcp/0.0.0.0:7683`. Set it on a robot that must be discoverable where LAN multicast is blocked; the plane binds nothing on its own. |
| `CERULION_GATEWAY_PORT`   | Override the well-known gateway port (`7683`). Parsed strictly.                                                                                                                                      |
| `CERULION_ROBOT_IDENTITY` | The robot name announced on the network. Defaults to the hostname.                                                                                                                                   |
| `CERULION_PEERS`          | Extra peer locators to try when discovering robots.                                                                                                                                                  |

## Recording and capture

| Variable                              | Meaning                                                                                                              |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `CERULION_FLASHBACK=off`              | Turn the Flashback capture plane off, so no run holds a rolling window.                                              |
| `CERULION_FLASHBACK_DIR`              | Where captures land. Defaults to `<workspace>/recordings/flashbacks/`.                                               |
| `CERULION_RECORD_DISCOVERY=off`       | With `graph run --record`, record only the graph's declared topics instead of also discovering other live producers. |
| `CERULION_RECORD_DISCOVERY_SETTLE_MS` | How long bag creation waits for late producers to appear.                                                            |

## Visualization

| Variable             | Meaning                                                                                                                                             |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `CERULION_VIZD_SOCK` | Path of the control socket the visualization daemon listens on. Set it on both the daemon and its clients to run a scene at a non-default location. |

## Live-run tuning

These affect how the live loop idles and how work is spread across cores. Reach for them when you are chasing latency, not before.

| Variable                   | Meaning                                                                                                                                                                                                                     |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `CERULION_MONITOR_WAIT`    | `1` forces the live-loop CPU park on, `0` disables it. The default is on for live runs. `--no-monitor-wait` beats this in both directions.                                                                                  |
| `CERULION_DOORBELL`        | `1` forces the data doorbell on (a publish wakes a parked consumer immediately), `0` leaves a timer-only park. Linux only.                                                                                                  |
| `CERULION_CPU_DMA_LOCK`    | `1` pins the CPU out of deep idle states, `0` disables the cap. By default Cerulion derives a cap from the graph's own tightest timing. Linux only, and it needs privileges — a failed acquire warns and the run continues. |
| `CERULION_CPU_DMA_LOCK_US` | An explicit idle exit-latency cap in microseconds, used under the automatic mode.                                                                                                                                           |
| `CERULION_FIRE_THREADS`    | Size of the pool that fires independent nodes within one level. Read once at graph build; the default is derived from the machine and the graph's widest level. It never changes what fires or in what order.               |
| `CERULION_BARRIER_SPIN_US` | Multi-process only: how long a worker waits actively at each level boundary before it sleeps. `0` skips the active wait. Values above 100 ms are clamped with a warning.                                                    |
| `CERULION_BARRIER_OS_SYNC` | macOS only: `0` opts out of the faster wake path at level boundaries, at the cost of latency.                                                                                                                               |

## Build

| Variable           | Meaning                                                                                                    |
| ------------------ | ---------------------------------------------------------------------------------------------------------- |
| `CARGO_TARGET_DIR` | Honored identically by `cerulion node build` and `cerulion graph run`, so a shared target directory works. |

## Related

<CardGroup cols={2}>
  <Card title="CLI reference" icon="terminal" href="/cerulion/reference/cli" color="#0080FF">
    The flags that override several of these variables.
  </Card>

  <Card title="Network a graph" icon="network-wired" href="/cerulion/guides/network-and-remote-robots" color="#0080FF">
    What the network variables change in practice.
  </Card>
</CardGroup>
