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

# Daemon bootstrap and troubleshooting

> Understand local daemon startup behavior, overrides, and common fixes for CLI connectivity issues.

The `minenet` CLI uses a local daemon (`app-server`) bound to `127.0.0.1`.

When no running daemon is found, CLI bootstrap logic:

1. checks for an installed daemon binary in local Minenet config,
2. downloads the latest release binary if missing,
3. starts the daemon and then retries the command.

## Environment overrides

Use these variables to control daemon launch behavior:

* `MINENET_DAEMON_BINARY`: force a specific daemon executable path.
* `MINENET_DAEMON_COMMAND` + `MINENET_DAEMON_ARGS`: custom daemon command/args.
* `MINENET_DAEMON_DIR`: local-source fallback working directory.
* `MINENET_API_BASE_URL`: default API base URL for daemon requests.

## Common issues

### CLI says unauthorized or not logged in

* Run `minenet login`.
* Verify with `minenet whoami`.

### Command hangs waiting for daemon

* Re-run with `--debug`.
* Check local process permissions and port availability.
* Confirm custom daemon binary path is executable.

### Wrong API host/environment

* Use `--api` per command, or set `MINENET_API_BASE_URL`.
* Confirm with `minenet whoami` and check reported API base.

## Related guides

* [CLI overview](/guides/cli/overview)
* [Commands and flags](/guides/cli/commands-and-flags)
* [Daemon API reference](/guides/cli/daemon-api-reference)
