How to Set Up a Homelab Network for Local AI
Plan IP addressing, DHCP, DNS, and access boundaries for Ollama, Open WebUI, ComfyUI, Home Assistant, private data, and the devices that use them.
Local AI network baseline
Keep model APIs private and expose one controlled entry point
Trusted clients
Laptops and phones reach an authenticated UI or API gateway.
AI compute
GPU hosts accept requests only from approved clients and services.
Private data
Documents, vector stores, cameras, and backups use narrower rules.
Remote access
Use a VPN instead of forwarding raw model or admin ports.
1. Local AI Access Boundaries
A local AI homelab usually combines a high-memory compute host, one or more user interfaces, private documents, automation services, and management consoles. Treating every service as an equal member of one flat LAN makes accidental exposure and agent side effects harder to control.
Start with logical boundaries even if your router does not support VLANs yet. Bind services to the LAN interface only when another device needs them, restrict host firewalls to known subnets, and never forward a raw inference or management port to the internet.
Single Mac or PC
Keep the model runtime on the same machine and bind it to localhost. Other devices do not need direct access until you deliberately add a private UI or gateway.
Always-on controller plus AI workstation
Run DNS, monitoring, Home Assistant, and the gateway on a low-power host. Wake or call the GPU machine only for inference.
Multi-user AI homelab
Separate trusted clients, AI compute, private data, IoT, and management. Put authentication and rate limits in front of shared model endpoints.
| Zone | Typical services | Allowed access |
|---|---|---|
| Trusted Clients | Personal laptops, phones, desktop apps | Authenticated UI or API gateway |
| AI Compute | Ollama, llama.cpp, MLX, ComfyUI, GPU workers | Trusted clients and approved applications only |
| Application Layer | Open WebUI, RAG, agents, Home Assistant | Users plus the exact downstream services required |
| Private Data | NAS, documents, vector stores, camera media | Application and backup identities; no guest or IoT access |
| Management | Router, Proxmox, SSH, container admin | Administrator devices or VPN only |
2. IP Address Planning
Good IP address planning prevents chaos as your Homelab grows. Without it, you end up with conflicting DHCP ranges, hard-to-remember static IPs, and services that break when you add new devices.
The key principle: <strong class="text-white">choose a private subnet you're comfortable with and allocate ranges for each use case</strong>. Most home networks use 192.168.1.0/24 — it works fine for Homelabs too.
| Range | Purpose | Assignment |
|---|---|---|
| 192.168.1.1 | Router / Gateway | Fixed — your router's LAN IP |
| 192.168.1.2–49 | Router DHCP Pool | Dynamic — laptops, phones, tablets |
| 192.168.1.50–99 | Homelab Servers | Static — AI compute, Proxmox, NAS, Docker hosts |
| 192.168.1.100–149 | Homelab Services | Static/DHCP reservation — Open WebUI, Pi-hole, Home Assistant |
| 192.168.1.150–179 | VLANs / IoT | DHCP pool for IoT VLAN |
| 192.168.1.180–199 | VLANs / Guests | DHCP pool for guest VLAN |
| 192.168.1.200–254 | Reserved / Special | Manual assignment only |
3. Subnet Design
For most Homelabs, a single /24 subnet (254 usable addresses) is sufficient. As you grow to multiple VLANs or need more granular control, consider splitting into multiple /24 subnets.
<strong class="text-white">Private IP ranges (RFC 1918):</strong>
| CIDR | Usable IPs | When to Use |
|---|---|---|
| 192.168.1.0/24 | 254 | Small Homelab, single network |
| 192.168.0.0/23 | 510 | Medium Homelab with two /24s |
| 172.16.0.0/16 | 65,534 | Large Homelab with multiple VLANs |
| 10.0.0.0/8 | 16.7M | Enterprise or cluster setup |
4. DHCP Configuration
Your router's DHCP server assigns IPs to new devices automatically. Configure it correctly from day one:
Set the DHCP range correctly
Configure your router's DHCP to only assign IPs in a specific range (e.g., 192.168.1.2–192.168.1.49). Never let DHCP touch the static IP range you reserved for servers.
Set DHCP lease time
For a stable Homelab, set a long lease time (24–72 hours). Short leases can cause IPs to change unexpectedly when devices reconnect.
Configure DNS servers
Point DHCP clients to your local resolver. If you need redundancy, run a second local resolver; a public secondary DNS can bypass local filtering and private service names.
Reserve IPs for your servers
Use DHCP reservations (MAC address → fixed IP) for your Homelab servers instead of static IPs on the servers themselves. This makes server migration easier.
5. DNS Setup for Your Homelab
A well-configured DNS is the backbone of a smooth Homelab. Instead of memorizing IPs, you access services by name.
<strong class="text-white">DNS hierarchy for a Homelab:</strong>
Set Pi-hole as your network DNS
Configure your router to hand out your Pi-hole IP as the primary DNS for all DHCP clients.
Add local DNS records in Pi-hole
In Pi-hole Admin UI → Local DNS → DNS Records. Add A records mapping your service names to IPs.
Configure upstream DNS in Pi-hole
Set upstream DNS in Pi-hole to 1.1.1.1 (Cloudflare) and 8.8.8.8 (Google). This is how Pi-hole resolves internet domains while blocking ads.
| Name | IP | Purpose |
|---|---|---|
| pi-hole.home.arpa | 192.168.1.100 | Ad blocking DNS server |
| proxy.home.arpa | 192.168.1.101 | Authenticated reverse proxy |
| ha.home.arpa | 192.168.1.102 | Home Assistant |
| ai.home.arpa | 192.168.1.110 | Authenticated local AI interface |
| gpu.home.arpa | 192.168.1.60 | Private model runtime or GPU worker |
| wireguard.home.arpa | 192.168.1.103 | WireGuard VPN |
| nas.home.arpa | 192.168.1.104 | NAS / file storage |
| uptime.home.arpa | 192.168.1.105 | Uptime Kuma monitoring |
6. Network Topology
A well-structured Homelab network looks like this:
🌐 Internet
WAN side of your router. Your router has one public IP.
🖧 Router / Gateway
NAT, firewall, and DHCP server. Connects WAN to LAN. This is the single choke point controlling all traffic.
🔀 Managed Switch
Connects all wired devices. Supports VLANs for segmentation. One trunk port to router carries all VLANs.
AI Compute VLAN
GPU hosts, Ollama, llama.cpp, ComfyUI, and model APIs. Accept requests from trusted clients and approved applications, not from the internet or IoT devices.
Private Data VLAN
NAS, documents, vector databases, and backups. Permit only the application and backup paths you can explain.
💻 Main LAN VLAN (192.168.1.2–49)
Family laptops, phones, personal devices. Normal internet access.
📱 IoT VLAN (192.168.1.150–179)
Smart devices. Internet access allowed. No access to Main LAN or Homelab VLAN.
7. Running Your Own DHCP Server
Advanced Homelabs often run their own DHCP server (e.g., on a Proxmox VM running OPNsense or pfSense) instead of relying on the consumer router. This gives you finer control over DHCP ranges per VLAN.
Disable DHCP on your router
If you're running a firewall VM (OPNsense/pfSense), disable the router's built-in DHCP to avoid conflicts.
Configure DHCP on your firewall VM
In OPNsense: Services → DHCPv4. Create a DHCP range for each VLAN interface.
Set static mappings
Reserve IPs for your Homelab servers by MAC address. DHCP will always assign the same IP regardless of which port the server connects to.
8. IPv6 in Your Homelab
Most ISPs now provide IPv6 prefixes. Enabling IPv6 in your Homelab is future-proofing — but requires careful configuration to avoid security issues.
<strong class="text-white">Key consideration:</strong> Unlike IPv4 NAT, every device with a public IPv6 address is directly reachable from the internet (unless your router blocks it). This is a significant security change.
🛡️ Enable IPv6 with firewall rules
Allow outgoing IPv6 connections from your LAN but block inbound unless explicitly forwarded (similar to IPv4). OPNsense and pfSense handle this well.
📊 Track IPv6 prefix changes
Most residential ISPs use dynamic prefix delegation — your IPv6 prefix changes periodically. Use a dynamic DNS service that supports IPv6 AAAA records to keep your domain pointing to your current IP.
🔒 Disable IPv6 if unsure
If you're not ready to configure IPv6 firewall rules, disable IPv6 on your Homelab VLANs. It won't affect IPv4 connectivity.
Frequently Asked Questions
Should I expose Ollama or ComfyUI directly to the internet?
No. Keep raw inference, workflow, vector database, and management ports private. For personal remote access, use WireGuard or Tailscale. For multiple users, expose an authenticated HTTPS application gateway with explicit access controls instead of the runtime itself.
Should I use 192.168.x.x or 10.x.x.x for my Homelab?
192.168.x.x is more common and sufficient for most Homelabs. 10.x.x.x is typically used in enterprise environments or when you need more than 254 addresses in a single subnet. Stick with 192.168.1.x — it's simpler and works perfectly for a Homelab.
How do I choose between static IPs and DHCP reservations?
Use DHCP reservations for servers — it's cleaner. The server gets an IP automatically on boot, but the router always assigns the same IP based on MAC address. If you migrate the server, it still gets the right IP. With static IPs, you have to reconfigure every server manually when migrating.
Can I have multiple DHCP servers on one network?
Only one DHCP server should be active per subnet/VLAN at a time. If two DHCP servers conflict, devices get confused and may get wrong IPs. If you want to run your own DHCP server (e.g., on OPNsense), disable the router's DHCP on that VLAN first.
What is the difference between DNS and DHCP?
DHCP assigns IP addresses to devices automatically. DNS translates domain names (like pi-hole.home.arpa) to IP addresses. They work together: DHCP tells a device which DNS server to use, and DNS resolves names to IPs for all devices.
How do I connect to my Homelab when I'm away from home?
WireGuard VPN is the best option. Set up WireGuard on your Homelab server, forward port 51820/UDP to it, and install the WireGuard app on your phone/laptop. You'll get an IP inside your home network and can access everything as if you were home.