# Add more launchers

A launcher runs wherever you start it: your laptop, a teammate's or a server. For a loop that keeps going overnight, use an always-on machine. All launchers for a project share one queue through GitHub, and a claim keeps two of them off the same item.

## On the new machine

Install, clone and log in with an account that has write access.

```sh
brew install uberblick-ai/tap/ub-agents
gh auth login
git clone https://github.com/your-org/your-project
cd your-project
```

## Check and launch

```sh
ub-agents doctor
ub-agents launch
```

## Which accounts count

By default every account with write access or higher can run a launcher. To allow only some, list them, and use the same list on every machine. See [Launcher accounts](https://agents.uberblick.ai/docs/configuration/launchers.md).

```yaml
launchers: [ub-bot, alice]
```

## Several launchers on one machine

One machine can run several launchers, for one project or several, each in its own checkout. Runs can still collide outside their worktrees, on a Docker database, a fixed port or a shared cache. Give each run its own, for example named after the worktree, and stop them in the [cleanup hook](https://agents.uberblick.ai/docs/configuration/cleanup.md).

## Keep versions together

When a release note says launchers must be upgraded together, stop every launcher for the project before upgrading any. See [Upgrading](https://agents.uberblick.ai/docs/upgrading.md).

## On a server

On a machine you log in to over SSH, run the launcher in tmux so it keeps running after you disconnect. Detach with Ctrl-b d.

```sh
tmux new -A -s ub-agents      # attach, or create on first use
ub-agents launch
```

For the terminal view, add to `~/.tmux.conf`:

```text
set -g mouse on                       # clicks and scrolling reach the view
set -s set-clipboard on               # mouse-drag copy reaches your clipboard (OSC 52)
set -s escape-time 10                 # Escape reaches the view at once
set -as terminal-features ",*:RGB"    # full theme colors
```

Hold Shift (Option in iTerm2) while dragging to use the terminal's own selection.

For a box that runs the loop around the clock, see [Run launchers on a server](https://agents.uberblick.ai/docs/best-practices/launchers-on-a-server.md).

## Run it as a service

To start the launcher on its own and restart it when it exits, run `ub-agents launch --no-ui` in the launcher checkout as a service: launchd on macOS, systemd on Linux, or a container. [Run launchers on a server](https://agents.uberblick.ai/docs/best-practices/launchers-on-a-server.md#run-it-as-a-service) says what the service has to get right. Your agent can set it up for you.

With ub-agents from the Homebrew tap, the launcher can [upgrade itself](https://agents.uberblick.ai/docs/configuration/runtime-updates.md#updating-the-launcher) while idle and restart in place, so the service sees no exit.
