LAN Access¶
URLs:
- HTTPS:
https://192.168.1.50:3002(example IP) - HTTPS:
https://katulong.local:3002(mDNS) - HTTP:
http://192.168.1.50:3001(limited — only for/connect/trustand public endpoints)
Authentication: QR Code + 8-Digit PIN Pairing¶
Pairing Flow (Subsequent Devices)¶
-
Generate Pairing Code (on authenticated device):
- Open Settings > LAN tab
- Click "Pair Device on LAN"
- QR code and 8-digit PIN appear
- Code is valid for 30 seconds
-
Scan QR Code (on new device):
- Open camera app and scan QR code
- OR manually navigate to
https://192.168.1.50:3002/pair?code=<UUID>
-
Enter PIN:
- Enter the 8-digit PIN shown on the authenticated device
- Click "Confirm"
-
Device Paired:
- Session token stored in browser cookie
- WebAuthn passkey registered (for this device)
- Access granted to terminal
Why QR + PIN for LAN?¶
- QR Code: Transmits the pairing UUID securely (no typing long UUIDs)
- 8-Digit PIN: Prevents unauthorized pairing even if someone sees the QR code
- 30-Second Expiry: Limits attack window
- Single-Use: Each code can only be used once
mDNS Discovery¶
Katulong advertises as katulong.local via mDNS/Bonjour. Accessible via https://katulong.local:3002 on the local network.
Requires Avahi (Linux), Bonjour (macOS), or Bonjour Print Services (Windows).
TLS Certificates¶
- Self-signed certificate auto-generated on first run
- Stored in
~/.katulong/tls/ - Browser will warn about "not private" — this is expected
- Trust the certificate in system keychain for seamless access:
- Access
http://192.168.1.50:3001/connect/trust - Download
katulong-ca.crt - Install in system keychain (instructions provided on page)
- Access
Session Cookies¶
katulong_sessioncookie stores 30-day session tokenHttpOnlyflag prevents JavaScript accessSameSite=Laxprevents CSRF attacks- Secure flag set for HTTPS