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

# Use Self-Hosted Daemon Pools

> Group self-hosted daemon machines into a pool and configure connectors, workspace behavior, and routing.

## About daemon pools

Daemon pools group distinct hosts into one Cosmos environment. When a session starts in a pooled environment, Cosmos routes it to an eligible daemon based on workspace requirements and current load, without requiring the user to choose a specific machine.

Create and manage a pool in the Cosmos web UI or declaratively with [Auggie Cloud](/cli/cloud), then connect one or more daemons.

## Create a pool in the web UI

Open the [Environments list](https://cosmos.augmentcode.com/environments), select **Create an environment**, then select **Daemon Pool**.

## Manage pools with Auggie Cloud

Use a daemon pool bundle to create or update a pool from a YAML file. Initialize a bundle, set `spec.pool.workspaceIsolation` to `shared` or `isolated`, preview the change, and apply it:

```sh theme={null}
auggie cloud pool init --name team-pool -o pool.yaml
# Edit pool.yaml and set spec.pool.workspaceIsolation to shared or isolated.
auggie cloud pool apply -f pool.yaml --dry-run
auggie cloud pool apply -f pool.yaml
```

After an apply, the CLI writes `metadata.poolId` and `metadata.resourceVersion` to the bundle. Subsequent applies use them for concurrency-safe updates.

To begin from an existing pool, export its bundle:

```sh theme={null}
auggie cloud pool export <pool-id> -o pool.yaml
```

<Note>
  Daemon pool bundles are a Preview CLI feature available to early adopters. Run `auggie cloud pool --help` to confirm that your installed CLI includes these commands.
</Note>

## Configure a pool

### Name

The pool must have a unique name across your organization.

### Connector

Only daemons with the proper authentication can connect to the pool. Select either the current user or a service account as the pool's connector. Every daemon must authenticate as that user or service account before joining.

### Workspace behavior

Choose how sessions use the workspaces on connected daemons:

* **Isolated Workspace**: Each agent uses its own Git worktrees. Every daemon connected to the pool must support Git worktree isolation across all configured repositories. A non-Git discovery container is supported, but every discovered or explicitly added workspace must be a Git repository.
* **Shared Workspace**: Agents edit each daemon's working copy directly. Concurrent sessions can overwrite changes, create conflicts, or leave the checkout in an unexpected state.

This setting applies to every session routed to the pool. Before choosing **Isolated Workspace**, configure each daemon to meet the [workspace isolation requirements](/cosmos/environments/daemon-workspaces#workspace-isolation).

## Connect a daemon to a pool

Find the pool ID on the pool's detail page. Start the daemon with `--pool-id` while authenticated as the pool's configured connector:

```sh theme={null}
auggie daemon --pool-id <pool-id>
```

For persistent configuration, set `poolId` in [`daemon-config.json`](/cosmos/environments/daemon-config). Do not also set `spaceId`; pooled daemons inherit their Space from the pool.

## See also

* [Self-Hosted Daemon Overview](/cosmos/environments/daemons)
* [Workspaces and Isolation](/cosmos/environments/daemon-workspaces)
* [Daemon Configuration File](/cosmos/environments/daemon-config)
