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

# toolkit daemon — Run the Background Proxy and API Service

> toolkit daemon runs the background process that keeps the local reverse proxy and web dashboard API running — start it via toolkit ui or autostart instead.

`toolkit daemon` is the background process that keeps the local reverse proxy and web dashboard API running continuously. It binds to the configured proxy port, registers the Toolkit dashboard route, and holds the process alive indefinitely so `*.localhost` subdomains remain available for as long as your machine is on. Under normal usage, you never need to call this command directly — `toolkit ui` starts the daemon automatically, and `toolkit autostart enable` ensures it launches at every login. Call `toolkit daemon` directly only when you need explicit, low-level control over the process.

***

## Syntax

```bash theme={null}
toolkit daemon [options]
```

***

## Options

| Option               | Type   | Default         | Description                                                              |
| :------------------- | :----- | :-------------- | :----------------------------------------------------------------------- |
| `-m, --mode <mode>`  | string | `daemon_notify` | Startup behavior: `daemon_notify`, `daemon_silent`, or `browser_launch`. |
| `-p, --port <port>`  | number | `80`            | The preferred port for the reverse proxy server.                         |
| `--ui-port <uiPort>` | number | `3100`          | The port the internal web dashboard API server binds to.                 |

***

## When to use this directly

You might call `toolkit daemon` directly in these advanced scenarios:

* **Headless or server environments** — machines without a desktop session where `toolkit ui` is not appropriate, but you still want the proxy and API running.
* **Containerized or CI setups** — when you want to run the daemon as the foreground process inside a container or process supervisor (e.g. `systemd`, Docker `CMD`).
* **Custom port configuration** — when the default proxy port (`80`) or UI port (`3100`) conflicts with another service and you need to override both in a single explicit command.
* **Testing startup modes** — when you want to verify the behavior of a specific `--mode` value without modifying your system's autostart registration.

***

## Examples

```bash theme={null}
# Start the daemon with all default settings
toolkit daemon

# Start the daemon in silent mode with explicit port assignments
toolkit daemon --mode daemon_silent --port 80 --ui-port 3100
```

***

<Info>
  In most cases, use `toolkit ui` or `toolkit autostart enable` instead of calling `toolkit daemon` directly — both commands handle the full daemon lifecycle automatically, including port negotiation and route registration.
</Info>
