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

# 9p serve

> A local browser session with the same engine as the CLI.

```bash theme={null}
9p serve            # http://127.0.0.1:4310
9p serve 4400       # custom port
```

Starts a local web UI for one session in the current directory: streaming
output, tool activity, permission prompts, model and mode switching, and skills.

```
9p serve — local session at http://127.0.0.1:4310
cwd: /Users/you/code/api · auth: platform · vault: /Users/you/code/api/vault
```

## Why use it

* More room than a terminal for long output and diffs
* A browser tab survives closing the terminal
* It's what the [VS Code extension](/vscode) embeds

## Binding

The server binds to **`127.0.0.1` only**. It is a local UI, not a network
service, and it has no authentication of its own — anyone who can reach the port
can drive an agent that holds your credentials and can edit your files.

<Warning>
  Don't port-forward it, expose it through a tunnel, or bind it to `0.0.0.0`. For
  remote access, run `9p` over SSH instead.
</Warning>

## Scope

One session per server. Run it again in another directory, on another port, for
a second project.

## Environment

| Variable          | Purpose                         |
| ----------------- | ------------------------------- |
| `NINEP_PORT`      | Default port when none is given |
| `NINEP_MODEL`     | Pin a model for the session     |
| `NINEP_AUTO_BIAS` | Routing bias                    |

Everything else — [memory](/memory), [skills](/skills), [MCP](/mcp),
[permissions](/permissions) — works exactly as in the CLI.
