Tried to modify a successful compose file of Home Assistant on Qnap server by setup bridge, static IP address. But I got error “ipv4_address is not allowed” Anyone can help me correct the code?
I don’t think you can use this ip address as ip address in a bridge mode is defined in docker. This is very likely why you are getting this error. I use it with host mode and it is working fine. If you remove ip address it should work.
Any reason you must use bridge mode?
When I do manual setup, I found out using bridge mode with static ip works great. However, looks like it is easier to use host mode. Just worry about security since my NAS ip will be exposed to external (when I use outside of my home). However, After testing a few applications. I found out. host mode works. bridge mode without setup ip works. all I need to do is edit docker and manual change IP address to my existing one. it works as well. your listed chatgpt recommanded script returns with warning and set docker not in bridge mode. I can change it to bridge mode as well.
If you use a host mode than ip address will be mapped to your host ip, as I know.
In bridge mode you will need a reverse proxy to access it. There are some differences but you can check docker networking for details.
If you run
sudo netstat -plnt
you can see difference between host and bridge mode containers.