# tkkrvwh6n2bo.opentunnel.xyz: agent guide

This computer is shared through [opendesktop](https://opentunnel.xyz) at `tkkrvwh6n2bo.opentunnel.xyz`.
This file is public and holds no secrets.

## Endpoints

| Base URL | What | Auth |
| --- | --- | --- |
| https://tkkrvwh6n2bo.opentunnel.xyz/ | Start page, this file (`/AGENTS.md`, `/llms.txt`), `/apps`, `/status` | `/apps`, `/status` need it |
| https://desktop.tkkrvwh6n2bo.opentunnel.xyz/ | The computer's screen in a browser (noVNC), full control. For people | required |
| https://view.tkkrvwh6n2bo.opentunnel.xyz/ | The same screen, read-only (input dropped on the computer) | required |
| https://opencode.tkkrvwh6n2bo.opentunnel.xyz/ | OpenCode server: web chat and REST API, OpenAPI at `/doc` | required |
| https://ollama.tkkrvwh6n2bo.opentunnel.xyz/ | Ollama: native API under `/api/`, OpenAI-compatible under `/v1/` | required |
| `https://<name>.tkkrvwh6n2bo.opentunnel.xyz/` | Docker apps, listed at `https://tkkrvwh6n2bo.opentunnel.xyz/apps` | required |

## Authentication

One shared secret. Send `Authorization: Bearer <secret>` (or HTTP Basic with any
username). Browsers sign in once at `/__od/login` on any of these addresses; the
cookie covers all of them. Missing or wrong: `401` JSON. Never write the secret
into files, logs or commits.

## OpenCode

```bash
curl -s -H "Authorization: Bearer $SECRET" https://opencode.tkkrvwh6n2bo.opentunnel.xyz/session      # list sessions
curl -s -H "Authorization: Bearer $SECRET" https://opencode.tkkrvwh6n2bo.opentunnel.xyz/doc          # OpenAPI spec
```

OpenCode runs commands on this computer. Treat each prompt as code you run on
someone else's machine.

## Ollama

```bash
curl -s -H "Authorization: Bearer $SECRET" https://ollama.tkkrvwh6n2bo.opentunnel.xyz/api/tags        # models
```

OpenAI SDKs: `base_url="https://ollama.tkkrvwh6n2bo.opentunnel.xyz/v1"`, `api_key=<secret>`. Model management (`/api/pull`, `push`,
`delete`, `create`, `copy`, `blobs`) is refused with `403`.

## Apps (Docker)

`GET https://tkkrvwh6n2bo.opentunnel.xyz/apps` lists the live apps. To publish one, run a container on this
computer with the label `ra.name=<name>` (1-32 of a-z, 0-9, '-') and its port
published on loopback only:

```bash
docker run -d --name app-hello --restart unless-stopped \
  -p 127.0.0.1::80 -l ra.name=hello -l ra.port=80 -l ra.description="Hello" traefik/whoami
```

It appears at `https://hello.tkkrvwh6n2bo.opentunnel.xyz/` within seconds, behind the same login,
and disappears when the container stops. Labels: `ra.name` (required),
`ra.port` (if several ports are published), `ra.description`. A port published
on all interfaces is refused. Reserved names: desktop, view, opencode, ollama, apps,
www, api, login, admin, mail. Apps never receive the shared secret.

## Rules

- Shared machine: others may be using it. Keep requests reasonable.
- The desktop addresses are for people; don't drive the screen through them.
- Idle connections close after 15 minutes; reconnect.
