Networking
Incus networking can be simple NAT for labs or advanced routed/bridged/OVN networking for larger environments.
Official docs:
- Networks: https://linuxcontainers.org/incus/docs/main/explanation/networks/
- Network how-to guides: https://linuxcontainers.org/incus/docs/main/howto/network_create/
See networks
Most simple hosts use a managed bridge such as incusbr0 with NAT.
Instance IP addresses
Add a NIC device
Most instances already get this from the default profile.
Static DHCP lease on a managed bridge
For a stable lab IP, set the NIC IPv4 address:
Verify:
This works when the network is an Incus-managed bridge with DHCP.
Proxy device for port forwarding
Expose host port 8080 to instance port 80:
Remove it:
Security note: binding to 0.0.0.0 exposes the port on all host interfaces. Use firewall rules or bind a specific address when needed.
Bridge to the LAN
For LAN-addressed instances, create or use a bridge connected to your LAN. Exact commands depend on your host network manager.
Typical Incus side:
incus network create lanbr0 --type=bridge
incus config device add web-01 eth1 nic network=lanbr0 name=eth1
For production-like LAN bridging, document:
- bridge name;
- physical NIC;
- VLAN ID if used;
- DHCP/static IP plan;
- firewall rules.
DNS names
Incus managed bridges can provide DNS for instance names. Check the network domain:
Set a lab domain:
Then instances may resolve as web-01.lab.local from clients using the bridge DNS.
Troubleshooting network issues
incus network list
incus network show incusbr0
incus list
incus exec web-01 -- ip addr
incus exec web-01 -- ip route
incus exec web-01 -- ping -c 3 1.1.1.1
incus exec web-01 -- getent hosts example.com
Common causes:
- instance has no NIC device;
- wrong profile attached;
- duplicate static IP;
- host firewall blocks forwarding;
- DNS works on host but not inside instance;
- proxy device listens on the wrong address or port.