The Home Assistant Server serves **three distinct roles** in the KingDezigns network:
1.**Central smart‑home automation controller** — manages device integrations, automations, discovery protocols, and orchestrates communication between IoT devices and internal services.
2.**Network-wide reverse proxy** — runs Nginx Proxy Manager (NPM) as a Home Assistant add-on, acting as the single external entry point for all publicly accessible internal services.
3.**Network-wide intrusion prevention** — runs CrowdSec and CrowdSec Firewall Bouncer as Home Assistant add-ons, providing real-time threat detection, community-sourced IP blocking, and nftables-level enforcement at the network perimeter.
This system is the **single point of coordination** for VLAN 30 (IoT), the **single ingress point** for all external web traffic, and the **primary intrusion prevention layer** for the KingDezigns network.
---
## 🖥️ Hardware
- Raspberry Pi 5 (8GB RAM)
- High‑performance microSD or SSD (recommended)
- Gigabit Ethernet connection
---
## 🌐 Network Placement
- VLAN: **50 — Lab / Servers**
- IP: **192.168.150.30**
- Access Type: LAN / Cable
This placement ensures:
- Isolation from trusted user devices
- Controlled access to IoT devices
- Direct access to Pi‑hole DNS
- Reduced attack surface
- Central proxy position for all VLAN 50 services
---
## ⚙️ Primary Functions
### **Home Automation**
- Home Assistant core platform
- Automation orchestration
- Device discovery
- Alarm integrations
- IoT control
- ESPHome, HomeKit, WiZ, Chromecast, AirPlay, and other integrations
### **Reverse Proxy (Nginx Proxy Manager)**
- **Add-on:** Nginx Proxy Manager (NPM)
- **Admin UI:** `http://192.168.150.30:81`
- **Function:** Terminates all external HTTPS traffic and proxies to internal services
- **SSL:** Let's Encrypt certificates per proxy host
- **Real IP forwarding:** Passes `X-Forwarded-For` and `X-Real-IP` headers to all backends
| 192.168.150.40:3000 | Forgejo — self-hosted Git server (`forgejo.kingdezigns.com`, Force SSL, see `server_forgejo.md`) |
| 192.168.150.40:8000 | Fund Tracker — multi-profile mutual fund/stock tracking web app (`funds.kingdezigns.com`, Force SSL, see `server_fundtracker.md` and `server_nas16.md`) |
- **Applies uniformly to every service proxied through NPM**, including Fund Tracker and Forgejo — no per-service CrowdSec configuration is required; anything routed through NPM inherits this protection automatically.
| profiles.yaml | `/config/.storage/crowdsec/config/profiles.yaml` | Ban decisions only — notifications disabled |
| LAN whitelist | `/config/.storage/crowdsec/config/postoverflows/s01-whitelist/kingdezigns-lan-whitelist.yaml` | Prevents all LAN IPs from being banned |
Native CrowdSec email notifications are **disabled**. All alerting is handled by NAS16:
- **Immediate red alert** — sent within 5 minutes of any local `crowdsec` origin detection
- **Daily midnight digest** — summary of all CAPI community blocklist bans for the day
- See `server_nas16.md` for full notification script details
#### Important: LAPI Port Exposure
Port 8080 must remain exposed on the host network interface for NAS16 to reach the LAPI stream endpoint. This is configured in the CrowdSec add-on Network settings (Show disabled ports → enable 8080/tcp → map to host port 8080).
#### Important: config.yaml User/Group
```yaml
# /config/.storage/crowdsec/config/config.yaml
user: root
group: root
```
Required even though native notifications are disabled — reverting breaks the add-on.
#### Useful Commands (run from CrowdSec OPEN WEB UI terminal)
- **New public services only need a proxy host entry here** — CrowdSec/Fail2Ban protection applies automatically to anything proxied through NPM, no per-service security configuration needed.