Networking13 min read

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.

ZoneTypical servicesAllowed access
Trusted ClientsPersonal laptops, phones, desktop appsAuthenticated UI or API gateway
AI ComputeOllama, llama.cpp, MLX, ComfyUI, GPU workersTrusted clients and approved applications only
Application LayerOpen WebUI, RAG, agents, Home AssistantUsers plus the exact downstream services required
Private DataNAS, documents, vector stores, camera mediaApplication and backup identities; no guest or IoT access
ManagementRouter, Proxmox, SSH, container adminAdministrator 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.

RangePurposeAssignment
192.168.1.1Router / GatewayFixed — your router's LAN IP
192.168.1.2–49Router DHCP PoolDynamic — laptops, phones, tablets
192.168.1.50–99Homelab ServersStatic — AI compute, Proxmox, NAS, Docker hosts
192.168.1.100–149Homelab ServicesStatic/DHCP reservation — Open WebUI, Pi-hole, Home Assistant
192.168.1.150–179VLANs / IoTDHCP pool for IoT VLAN
192.168.1.180–199VLANs / GuestsDHCP pool for guest VLAN
192.168.1.200–254Reserved / SpecialManual 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>

CIDRUsable IPsWhen to Use
192.168.1.0/24254Small Homelab, single network
192.168.0.0/23510Medium Homelab with two /24s
172.16.0.0/1665,534Large Homelab with multiple VLANs
10.0.0.0/816.7MEnterprise or cluster setup

4. DHCP Configuration

Your router's DHCP server assigns IPs to new devices automatically. Configure it correctly from day one:

1

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.

2

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.

3

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.

4

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>

1

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.

2

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.

3

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.

NameIPPurpose
pi-hole.home.arpa192.168.1.100Ad blocking DNS server
proxy.home.arpa192.168.1.101Authenticated reverse proxy
ha.home.arpa192.168.1.102Home Assistant
ai.home.arpa192.168.1.110Authenticated local AI interface
gpu.home.arpa192.168.1.60Private model runtime or GPU worker
wireguard.home.arpa192.168.1.103WireGuard VPN
nas.home.arpa192.168.1.104NAS / file storage
uptime.home.arpa192.168.1.105Uptime 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.

1

Disable DHCP on your router

If you're running a firewall VM (OPNsense/pfSense), disable the router's built-in DHCP to avoid conflicts.

2

Configure DHCP on your firewall VM

In OPNsense: Services → DHCPv4. Create a DHCP range for each VLAN interface.

3

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.