Files
infrastructure/docs/archive/unraid-claude.md
XTRM-Unraid b250493d5a
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Major documentation restructure - consolidated docs
New Structure:
- 01-NETWORK-MAP.md - Network topology, IPs, Docker networks, services
- 02-SERVICES-CRITICAL.md - DNS, Auth, Routing (P0/P1 services)
- 03-SERVICES-OTHER.md - All non-critical services
- 04-HARDWARE-INVENTORY.md - Physical devices and specs
- 05-CHANGELOG.md - Major events only

New Folders:
- docs/archive/ - Legacy docs (read-only reference)
- docs/wip/ - Planned changes and ideas
  - UPGRADE-2026-HARDWARE.md - N5 Air + N100 migration plan
  - GITOPS-CONTAINERS.md - Phase 2 container GitOps

Changes:
- Moved all 22 legacy docs to archive/
- Consolidated container IPs, physical map, and services into single network map
- Extracted critical vs non-critical service classification
- Simplified changelog to major events only

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 11:17:33 +02:00

187 lines
5.2 KiB
Markdown

# Claude Code - Unraid Server Context
## Claude Installation
| Item | Path |
|------|------|
| Claude binary | `/root/.local/bin/claude` |
| Claude data | `/mnt/user/appdata/claude-code/` |
| Config | `~/.claude/` |
| Project instructions | `/root/CLAUDE.md` (symlink to this file) |
**Run Claude:** `claude` or `/root/.local/bin/claude`
---
## IMPORTANT: First Run After Reboot
The infrastructure documentation lives in `/tmp/infrastructure/` which is **NOT persistent** across Unraid reboots (tmp is cleared on restart).
**Always run this command first when starting a new session:**
```bash
cd /tmp && ([ -d infrastructure ] && cd infrastructure && git pull || git clone "https://jazzymc:zRuHTu%5D7Q3LC%2Bq%3F@git.xtrm-lab.org/jazzymc/infrastructure.git")
```
This command:
1. Checks if `/tmp/infrastructure` exists
2. If yes → pulls latest changes
3. If no → clones the repository fresh
Without this, the `/root/CLAUDE.md` symlink will be broken and Claude won't have context.
---
## Infrastructure Documentation
**Repository:** https://git.xtrm-lab.org/jazzymc/infrastructure
**Local clone:** `/tmp/infrastructure`
### Documentation Structure
```
/tmp/infrastructure/docs/
├── 00-CURRENT-STATE.md # Current network/infrastructure state
├── 01-PHASE1-DNS-PORTABILITY.md # DNS portability plan
├── 02-PHASE2-FOSSORIAL-STACK.md # Fossorial stack setup
├── 03-PHASE3-AUTHENTIK-ZEROTRUST.md # Authentik zero-trust config
├── 04-PHASE4-REMOTE-GAMING.md # Remote gaming setup
├── 05-PHASE5-RUSTDESK.md # RustDesk deployment
├── 06-PHASE6-PORTAINER-MANAGEMENT.md # Portainer setup
├── 07-CHANGELOG.md # Change history
├── 08-PHASE7-GITEA-GITOPS.md # Gitea & Woodpecker CI
└── unraid-claude.md # This file
```
---
## Key Unraid Paths
| Item | Path |
|------|------|
| Docker appdata | `/mnt/user/appdata/` |
| Docker templates | `/boot/config/plugins/dockerMan/templates/` |
| FolderView2 config | `/boot/config/plugins/folder.view2/docker.json` |
| Flash drive (persistent) | `/boot/config/` |
| User shares | `/mnt/user/` |
| Disk shares | `/mnt/disk[1-n]/` |
| Cache | `/mnt/cache/` |
**Persistence note:** Only `/boot/config/` survives reboots. All plugin configs, Docker templates, and custom scripts should be stored there.
---
## Network Configuration
| Device | IP | Role |
|--------|-----|------|
| MikroTik Router | 192.168.31.1 | Gateway, primary DNS |
| Unraid Server | 192.168.31.2 | Docker host |
| Pi-hole (Unraid) | 192.168.31.4 | Secondary DNS |
| Unbound (Unraid) | 192.168.31.5 | Recursive resolver |
| Tailscale IP | 100.100.208.70 | Remote access |
**SSH to MikroTik:**
```bash
ssh -i /root/.ssh/mikrotik_key -p 2222 unraid@192.168.31.1
```
---
## Docker Commands
### Quick Status
```bash
docker ps -a --format table {{.Names}}t{{.Status}} | sort
```
### Container Logs
```bash
docker logs container-name --tail 100 -f
```
### Recreate with Labels (Unraid)
Always include these labels for Unraid integration:
```bash
--label net.unraid.docker.managed=dockerman
--label net.unraid.docker.icon=ICON_URL_HERE
--label net.unraid.docker.webui=WEBUI_URL_HERE
```
**Icon Collection:** [Dazzle Line Icons](https://www.svgrepo.com/collection/dazzle-line-icons/)
---
## Documentation Update Routine
After any infrastructure change:
1. **Pull latest:** `cd /tmp/infrastructure && git pull`
2. **Update docs:** Edit relevant files in `docs/`
3. **Update changelog:** Add entry to `docs/07-CHANGELOG.md`
4. **Commit & push:**
```bash
cd /tmp/infrastructure
git add docs/
git commit -m "Description of changes"
git push
```
### Changelog Format
```markdown
## YYYY-MM-DD
- [PHASE X] Task description - COMPLETED/FIXED/ISSUE
- [SERVICE] service-name: status change or config change
- [DOCS] Documentation updates
- [UNRAID] Unraid-specific changes
```
---
## Git Credentials
- **Username:** jazzymc
- **Repo URL (with auth):** `https://jazzymc:zRuHTu%5D7Q3LC%2Bq%3F@git.xtrm-lab.org/jazzymc/infrastructure.git`
---
## Services Quick Reference
### GitOps
| Service | URL |
|---------|-----|
| Gitea | https://git.xtrm-lab.org |
| Woodpecker CI | https://ci.xtrm-lab.org |
### Core Services
| Service | URL |
|---------|-----|
| Traefik | https://traefik.xtrm-lab.org |
| Authentik | https://auth.xtrm-lab.org |
| Portainer | http://100.100.208.70:9002 (Tailscale) |
| Vaultwarden | https://vault.xtrm-lab.org |
| Home Assistant | https://ha.xtrm-lab.org |
### Monitoring
| Service | URL |
|---------|-----|
| Uptime Kuma | http://192.168.31.2:3001 |
| NetAlertX | https://netalert.xtrm-lab.org |
---
## FolderView2 Categories
| Category | Containers |
|----------|------------|
| Infrastructure | traefik, unbound, pihole, DoH-Server, stunnel-dot, pangolin, dockersocket, nebula-sync |
| Security | authentik, authentik-worker, vaultwarden |
| Monitoring | UptimeKuma, Uptime-Kuma-API, AutoKuma, NetAlertX, speedtest-tracker |
| DevOps | gitea, woodpecker-server, woodpecker-agent, postgresql17, Redis, pgAdmin4 |
| Media | plex, Libation, transmission |
| Storage/Backup | rustfs, UrBackup, TimeMachine, Nextcloud |
| Productivity | actual-budget, n8n, karakeep, homarr |
| Smart Home | HomeAssistant_inabox |
| Remote Access | rustdesk-hbbs, rustdesk-hbbr |
| Management | portainer, unimus |