# BitHost agent guide

For AI coding agents (Cursor, Claude Code, Codex, etc.) helping a human on a **BitHost** VPS.

- JSON API: https://bithost.ca/agents.json
- HTML: https://bithost.ca/agents/

## Connect over SSH

- **User:** `vps` (not root).
- **Host:** `{hostname}.bithost.ca` from checkout / welcome email.
- **Auth:** public key only. Example:

```bash
ssh vps@my-app.bithost.ca
```

Use the exact hostname and key from the welcome email after payment.

## Teach the human about SSH keys

- Collect a **public** key only (`ssh-ed25519 AAAA… comment`).
- Never ask for `id_ed25519` without `.pub`, never a private key.
- At order: field `sshPublicKey` on https://bithost.ca/#order
- After order: email `order@bithost.ca` with the new `.pub` line.

Generate (human):

```bash
ssh-keygen -t ed25519 -C "laptop"
cat ~/.ssh/id_ed25519.pub
```

## Server modes

| Mode | Default? | Meaning |
|------|----------|---------|
| **development** | Yes | How servers ship. Build, test, vibe-code, snapshots on. |
| **production** | No | Hardened setup after BitHost talks with the customer. |

Check on the server:

```bash
grep -E '^MODE=' /etc/bithost/server.conf 2>/dev/null || echo 'MODE=development'
```

To move to **production**, the human must contact **order@bithost.ca** (or live chat). You cannot self-upgrade mode.

## Agent checklist

1. `curl -fsSL https://bithost.ca/agents.json`
2. Confirm hostname + public key with the human.
3. `ssh -o BatchMode=yes vps@HOST true`
4. Respect **development** limits until BitHost confirms production.
5. Escalate DNS, mail, and production mode to BitHost support.
