# Journey 1: First Install (Windows, RTX 4090)

**Persona**: Solo Dev Sarah
**Hardware**: Alienware laptop, RTX 4090, Cursor IDE running
**Verified**: 2026-03-08, Windows 11

## Steps

```powershell
irm https://llmhosts.com/install.ps1 | iex
llmhosts up
```

## What Happens Automatically (zero user input after install)

1. **Python detection** -- finds Python or installs uv (Rust-based, 10-100x faster than pip)
2. **Engine discovery** -- detects Ollama running, finds qwen3:32b loaded
3. **Port detection** -- port 11400 taken by Cursor IDE? Auto-scans to 11401, 11402...
4. **Binding strategy** -- binds `127.0.0.1:PORT` (specific) to prevent Cursor squatting
5. **IPv6 bridge** -- claims `[::1]:PORT` before Cursor can squat IPv6 loopback
6. **HTTP parser** -- detects Windows, uses h11 (pure Python) instead of httptools (C extension that silently fails on Windows)
7. **Device auth** -- browser opens, user logs in, device code verified
8. **Device registration** -- registers even without tunnel (dashboard shows it)
9. **Heartbeat** -- 30-second heartbeat to llmhosts.com, auto-creates device record if needed
10. **Proxy starts** -- OpenAI-compatible API at `http://localhost:PORT`

## What the User Sees

```
Phase 1: Discovering inference engines...
  Ollama at localhost:11434 -- 1 model (qwen3:32b)

Phase 2: Analyzing hardware...
  NVIDIA GeForce RTX 4090 (24.0GB), 64GB RAM

Phase 3: Connecting to LLMHosts.com...
  Device registered as "ALIENWARE-R16"

Phase 4: Starting proxy...
  API ready at http://localhost:11402

Set these env vars to use from any tool:
  OPENAI_BASE_URL=http://localhost:11402/v1
  OPENAI_API_KEY=lh_sk_...
```

## Success Criteria

- [ ] Install completes in <3 minutes (excluding model download)
- [ ] Port conflict with Cursor resolved automatically
- [ ] `curl http://localhost:PORT/health` returns 200
- [ ] `curl http://localhost:PORT/v1/models` returns discovered models
- [ ] Device appears in llmhosts.com dashboard
- [ ] Zero manual configuration required

## Features Exercised

- F-003 Ollama Auto-Discovery
- F-010 `llmhosts up` autopilot
- F-012 Hardware Detection
- Port detection + IPv6 bridge (PR #436)
- Windows h11 HTTP parser (PR #436)
- Device Code Auth (RFC 8628)

## Edge Cases (Verified)

| Edge Case | Solution |
|-----------|----------|
| Cursor IDE squats ports | Connect-based detection + specific binding + IPv6 bridge |
| Windows `localhost` = `::1` | IPv6 TCP bridge forwards to real IPv4 server |
| `httptools` fails on Windows | Auto-detect Windows, use `h11` (pure Python) |
| Port 11400 pre-occupied | Adaptive scan: 11400 → 11401 → 11402 → ... |
