Static IP for HA in Proxmox

How can I assign a static IP to Home Assistant in Proxmox?
(Is this better posted on a Proxmox board)?

Not sure what you mean but can’t you just do this in HA?

I just do a reservation for the MAC address in my router. Otherwise what @sender said

I just set it in Home Assistant GUI after setting up the VM in ProxMox, worked no problem. I struggle the most with getting the UEFI shell not to appear every time the VM is restarted and I’ve already forgot how I fixed that :laughing:

Really Matt… it was that simple?

Supervisor → System → IP Address Change :slight_smile:

That is the ‘dirty’ way. The proper way is, as David says above, to allocate a permanent lease in DHCP.

I think it depends a little bit and I probably should clarify I have my DHCP setup to serve a block of addresses, then when I have manually assigned static IP machines I assign them outside the DCHP assignable block. Don’t think that is a bad practice, but I’m definitely not a network expert.

That is the correct way to do it.
Set a DHCP range and use the rest for permanent leases. Doing it this way avoids problems when more IP devices are added later when the HA bug bites hard. :grin:

Sorry for reviving this old thread, but because it is (currently) the first result, when searching for “proxmox home assistant static ip”, I wanted to add something to consider… :slight_smile:

@Tromperie is basically right, that assigning a static lease is the most elegant and from a network administrator’s perspective most “correct” way assigning IP’s in your local network. In fact, I’ve done this for years, ignoring the issues associated with this approach, just because static IP’s are, you know, … “evil” :imp:

But finally I came to the conclusion, that, in real life, you spare yourself much trouble, assigning static IP’s for the most essential two or three devices in your local network on the devices itself and also using IP’s instead of FQDN’s for the core configuration of these servers, i.e. using an IP instead of a hostname for the HA recorder connection string confguration.

Just pay attention to not assign these static IP’s to more than one host. F.e. keep track of them as commented out entries in your dhcp and /etc/hosts config.

The big advantage of using static IPs for such devices is, that they are not affected by dhcp or dns server problems on your network, i.e. a dns and/or dhcp server going dark or running wild for some reason.

In the past few years I had more than enough trouble with unstable pihole instances, stubborn routers and the like. Especially HAOS has a bad habit in constantly trying to mess up local name resolution, as some of you might know.

Since using a static IP for my HA instance at least my home automations are still running fine, even while debugging the next obscure dhcp or name resolution problem appearing out of thin air.

I can assure you, a robust HA server is greatly improving the WAF for your home automation… :wink: