Raspbian + Docker + Hass.io and static ip?

I installed succesfully Hass.io to RaspberryPi 3B+:

sudo -i

apt-get update

apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq 
network-manager socat software-properties-common

curl -fsSL get.docker.com | sh

usermod -aG docker pi
    
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install" 
| bash -s -- -m raspberrypi3

But problem is, after this Raspberrys mac address changes every time when Raspberry is rebooted, so I cannot set static IP for it in my router. So how to do it?

I know this is more Docker question, but I’m sure that here are many people who have similar setup.
I’m trying to learn both, Hass.io and Docker, so be gentle :slight_smile:

As you are running on top of raspbian that would control the IP address of the host.

https://www.raspberrypi.org/forums/viewtopic.php?t=221060

2 Likes

It’s not, because Docker doesn’t have anything to do with the IP address on your host. :wink:

Is it normal behaviour that after I installed these packages MAC address (propably) changed, beacause it got a new ip from my routers dhcp?

apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq 
network-manager socat software-properties-common

Im trying to understand what is behind this.

It is NETWORK-MANAGER causing it, but it’s not a problem

1 Like

Is network-manager necessary for this kind of setup?
I tried some other methods to setup static mac for wlan, but no success. Even macchanger didn’t work.
With google I found some others complaining same issues with Pi 3B+.

sudo apt-get remove network-manager

Fixes the problem, but does this affect necessary processes?

No idea. I don’t use hassio.

I use home assistant in docker. :wink:

It is not normal at all for a mac address to change. At least not on a non-mobile device. The whole purpose of a mac address is to hard code an identity of the hardware.

Hardcoded stays same, but the mac visible to the network changes when network-manager is installed.
When I tested macchanger it identified macs as

Current MAC:   bb:bb:bb:bb:bb:bb (unknown)
Permanent MAC: aa:aa:aa:aa:aa:aa (Raspberry Pi Foundation)

So mac spoofing any other ways but random mac didnt work.

This all changed in the last couple of years. It’s a network manager thing.

Hi everyone. I reopen this topic because I have a strange problem with this kind of installation.

After installing Raspbian, i have assigned the static IP 192.168.1.30 in the dhcpcd.conf file. That IP is outside of the DHCP range of my router. I have used Raspbian without Home Assistant for several days without problems, and it has only the fixed IP (192.168.1.30).

The problem begin when I installed Home Assistant Supervised because it needs NetworkManager. After installing docker and Home Assistant, i have observed that i have 2 IPs for my Raspberry, one i had fixed outside the DHCP range (192.168.1.30) and other one within the DHCP range.

I think DHCPCD get the fixed IP, and Network Manager ask a DHCP for my router, i don’t know why.

have any of you had this problem? How have you solved it?

Try

sudo apt-get purge network-manager