# Snel herstellen na NAS-reset

**NAS:** `192.168.1.211` · **Gitea:** http://192.168.1.211:3000 (private)

## 1. Clone

```bash
mkdir -p /volume1/docker /volume1/homes/mo
git clone http://192.168.1.211:3000/mo/homelab-configs.git /volume1/docker/homelab-configs
git clone http://192.168.1.211:3000/mo/mek-tech-consulting.git /volume1/docker/mek-tech-consulting
git clone http://192.168.1.211:3000/mo/mek-tech-showcase.git /volume1/docker/mek-tech-showcase
git clone http://192.168.1.211:3000/mo/ha-voice-control-mcp.git /volume1/homes/mo/ha-voice-control-mcp
git clone http://192.168.1.211:3000/mo/homelab-command.git /volume1/homes/mo/homelab-command
git clone http://192.168.1.211:3000/mo/home-security-agent.git /volume1/homes/mo/home-security-agent
```

Repo-pad: `CFG=/volume1/docker/homelab-configs`

## 2. Secrets

Wachtwoorden staan in `.env` en per-app `.env` (private repo).

## 3. Startvolgorde

| # | App | Commando |
|---|-----|----------|
| 1 | Netwerk | `docker network create homelab-monitor` |
| 2 | PostgreSQL | `cd $CFG/apps/postgres && docker compose up -d` |
| 3 | Gitea | `cd $CFG/apps/gitea && docker compose up -d` |
| 4 | AdGuard | Kopieer `apps/adguard/config/` → `/volume1/docker/Configs/adguard/`, dan `cd $CFG/apps/adguard && docker compose up -d` |
| 5 | DuckDNS | `cd $CFG/apps/duckdns && docker compose up -d` |
| 6 | Neo4j | `cd $CFG/apps/neo4j && docker compose up -d` |
| 7 | pgAdmin | `cd $CFG/apps/pgadmin && docker compose up -d` |
| 8 | Monitoring | Zie `apps/monitoring/README.md` + build in homelab-command |
| 9 | Homelab Command | `cd /volume1/homes/mo/homelab-command && docker compose -f docker-compose.homelab.yml up -d --build` |
| 10 | NATS mesh | `cd homelab-command && docker compose -f docker-compose.mesh.yml up -d` |
| 11 | Homarr | Kopieer `apps/homarr/config/*.json` → `/volume1/docker/homarr/`, dan `cd $CFG/apps/homarr && docker compose up -d` |
| 12 | Overige | portainer, remotely, excalidraw, guacamole, wazuh, unifi, joplin — elk `cd $CFG/apps/<naam>` |
| 13 | Proxmox | Zie `apps/proxmox/README.md` — `/etc/pve` terugzetten op nodes |

Monitoring-netwerk koppelen:

```bash
for c in postgres-homelab neo4j prometheus-homelab postgres-exporter-homelab grafana-homelab; do
  docker network connect homelab-monitor "$c" 2>/dev/null || true
done
```

## 4. Config terugzetten (niet-Docker)

| App | Git | NAS |
|-----|-----|-----|
| Homarr | `apps/homarr/config/` | `/volume1/docker/homarr/` |
| AdGuard | `apps/adguard/config/` | `/volume1/docker/Configs/adguard/` |
| Home Assistant | `apps/home-assistant/config/` | `/volume1/docker/Configs/HA/config/` |
| *arr / qbit | `apps/<naam>/config/` | `/volume1/docker/Configs/<Naam>/` |
| Proxmox | `apps/proxmox/hosts/<host>/` | `/etc/pve/` op betreffende node |

## 5. Proxmox hosts

Zie [apps/proxmox/README.md](apps/proxmox/README.md).

## Poorten

| Poort | App |
|-------|-----|
| 3000 | Gitea |
| 3002 | Grafana |
| 4222 | NATS |
| 4755 | Homarr |
| 5433 | PostgreSQL |
| 5434 | pgAdmin |
| 8080 | Remotely |
| 8765 | Homelab Command |
| 9090 | Prometheus |
| 9000 | Portainer |
