99% of people using the Home Assistant OS, don’t need to change the IP address, it will be assigned by DHCP. Even cheap ISP routers provide the ability to reserve an IP address so the same IP is always delivered by DHCP.
Aside from the fact that there IS a way to change the IP address via the CLI as has been indicated, you obviously also had the option to temporarily set any computer on the network to an IP address in the old range that you were previously using so that you could have accessed the GUI, to change the IP address via the Supervisor page.
I am developer with experience in Linux, Docker, Python and whatnot and it’s not obvious to my how I can get to the host terminal after reaching the HA> prompt after booting.
Yes, that login command is not listed anywhere. It was present the early days before they changed the OS interface, but still works. Maybe someday will be depreciated, but at this moment it works and let you use docker as usual from the root prompt.
I have had a very hard time getting this far with HA, but I still do not get what you are showing. My nmcli does not understand set and I do not see a ready replacement.Have tried numerous versions of HA with no joy at all.This new way is not very good?First the dictatorial removal of YAML now a startup that is incomprehensible not an auspicious follow up. Is there complete help for this?
NOTE: This post was written several years ago and outlines a way to set a static IP using low level tools. If your network uses DHCP to assign IP addresses (if you aren’t sure, it does) then please scroll down to this post that describes a newer method.
You want to:
Be connected to the HA CLI, you should see an ha> prompt
Run ‘login’, you should now see a # prompt
Run ‘nmcli connection show’ to see your list of connections and choose which one you intend to edit. In my install there was only one listed, “HassOS default”
Run ‘nmcli con edit “HassOS default”’ (or whatever your connection is), you should now have an nmcli> prompt
Once in the nmcli prompt, run these commands filling in whatever your network details are:
nmcli> set ipv4.addresses 192.168.1.10/24
Do you also want to set ‘ipv4.method’ to ‘manual’? [yes]: yes
nmcli> set ipv4.dns 1.1.1.1
nmcli> set ipv4.gateway 192.168.1.1
nmcli> save
nmcli> quit
Just to add to this, if one has two connection profiles, for example this is how mine seems to be setup:
$nmcli con show
NAME UUID TYPE DEVICE
Supervisor enp0s3 c14e9fbc-98dc-49e0-b65e-c39d18abdef9 ethernet enp0s3
HassOS default f62bf7c2-e565-49ff-bbfc-a4cf791e6add ethernet --
only one connection profile can be active at a time, so pick the one that has a device listed under DEVICE (i.e. pick “Supervisor enp0s3”)
Guys you saved me today. Yesterday after a power outage the Home Assistant OS wasn’t coming up anymore. No IP no matter what. It’s running on Odroid N2+.
I found out that ipv4.method was disabled. So using nmcli I brought it back to life. Awesome.
@phobiac your the difference between someone who wants to help and someone that … your write up was soooo helpful and to the point. There are so many posts looking for this info and definitly HA needs to do work in this area.
If you install your HA on a Raspberrypi you should be able to simply config the net without having to connect to a live network that has a dhcp server running…wth.
In my case I build my system got it all configured and restored my backup from my VM. My last step before putting it away was to configure the Wifi. I setup the WIFI and then disabled the lan…Bam, I forgot to enable the wifi and now the system is bricked. and I did not know how to get out of docker to the OS…
Thanks again!!!
Glad I could be of service! Funny enough, I ran into this exact issue again just a few weeks ago and ended up finding this thread and my own post… So like many lessons with documentation, I ultimately helped future me out too.