# Installing Luwu

Instructions for a coding agent (or a person) setting up Luwu on this computer. Luwu makes this computer's tmux terminals reachable from the user's phone and browser, end to end encrypted.

## Requirements

- macOS or Linux, x86-64 or arm64. On Windows, use WSL.
- tmux 3.0 or newer. The installer below installs it when it's missing; check with `tmux -V`, or install it yourself with `brew install tmux` (macOS) or `sudo apt-get install -y tmux` (Debian/Ubuntu).
- curl.

## Steps

1. Install the `luwu` command:

   ```sh
   curl -fsSL https://luwu.dev/install.sh | sh
   ```

   It downloads the binary for this OS and CPU from get.luwu.dev, verifies its SHA-256, installs it at `~/.luwu/bin/luwu`, links `~/.local/bin/luwu`, and adds `~/.local/bin` to PATH in the user's shell startup file. Use `~/.luwu/bin/luwu` until a new shell is opened.

2. Sign in. **This needs the user**: `luwu login` asks for their email and a 6-digit code from that email. Ask the user to run it in an interactive terminal, or run it with them:

   ```sh
   luwu login
   ```

3. Make this computer reachable and start the background service (launchd on macOS, systemd --user on Linux):

   ```sh
   luwu up
   luwu status        # expect: service running, reachable via one or more relays
   ```

   On a Linux server, also run `loginctl enable-linger` so the service keeps running after logout.

4. Optional, recommended: notifications when Claude Code or Codex needs the user:

   ```sh
   luwu hooks install
   ```

   Agents already running pick this up after a restart.

5. Tell the user they can open this computer from the Luwu iPhone app (TestFlight beta), the Android app (https://luwu.dev/android) or at https://app.luwu.dev, signed in with the same account. Agents should run inside tmux (`tmux new -s work`) to be reachable.

6. The first phone or browser that connects waits for approval on this computer. `luwu devices` lists it; `luwu devices approve NAME` lets it in. Later devices can be approved from a phone that already has access.

The Free plan has 1 computer, 2 terminal sessions per computer started through Luwu, and 2 phones or browsers (https://luwu.dev/pricing has the paid plans).

## Checking

- `luwu ls` lists this computer and its tmux sessions.
- The log is `~/.luwu/logs/luwud.log`.

More: https://luwu.dev/docs
