I needed a test instance since I can’t access my HA instance from the outside.
So I fired up a HassOS v.10.5 VM on Proxmox 8.0.2 and installed adv.SSH, MariaDB and VSCode AddOns.
Half an hour later, up and running. Fine.
My live instance is still the docker variant, but having to use network_mode: host drives you nuts if you have several NICs connected to multiple (V)LANs (the server routes just fine, only HA doesn’t seem to care for manually added routes and acts up when having to use SNMP and UPnP - mDNS works fine, though).
So after HA being nearly the last service not being proxmox’d, I thought it’d be a great idea to finally test a VM setup, getting rid of the mandatory host networking.
I was so wrong.
After hours of trying to get it to work (the way I want/need/understand it) I’m puzzled by the following WTH’s I discovered (and I’m sure the list will grow):
According to a two years old thread, the MariaDB AddOn stores its db within the container (/var/lib/mysql)? That’s a bad joke; I must have misread the threads (the documentation ofcourse states nothing on this account). Where do I find the db (for backup and disk usage purposes)? The phpMyAdmin AddOn is really nice, but I don’t see a possibility to setup an external (non-HA) automated backup. And I have no use for a sophisticated SQL-Sensor, when all you need is the size of the whole db dir (currently 30GB).
To upload my SSL certificate I briefly installed the SAMBA AddOn. What would I have to enter (and where) instead of a WORKGROUP? I’m on a domain network and cannot enter the right credentials (WORKGROUP\homeassistant with the right password errors out in Windows’ own network share connection dialog - “#53 path not found” and net use h: \\h.a.i.p password /USER:homeassistant does the same). For now I’ll have to upload the certificate via SSH, but I can’t be the only one within a domain network trying to faciliate an off-domain share…
The Studio Code Server AddOn starts @ /config, even though I entered /root into the config_path. The file open dialog allows me to enter the root folder but the explorer stubbornly stays @ /config. Where do I change this behaviour?
I think this could all be sorted out if I could access the storage of HAOS’ docker configuration folders to add volumes to the containers (MariaDB) and change their configuration files (even the late Portainer AddOn would not have me do this).
Is there any way to achieve this?
Or, –a totally different approach– at least bind/limit the homeassistant docker container with it’s darn host networking to a set of IPs and/or interfaces? Exposing 8123/tcp for the frontend on (just) one IP only is no problem, but if 40000/tcp, 1900/udp, 5353/udp and 5683/udp are bound to more than one IP, HA starts to act unreliably. Not to mention its route-agnostic SNMP (dport 161+162) dumbness.
Not sure if it will help for the HassOS case, but for my own HA in Docker setup I use a MACVLAN network.
This gives the container a virtual interface bound to whichever physical interface you like with it’s own MAC and IP (from memory the MAC is derived from the IP), the IP can be statically assigned, or you can let Docker DHCP it from the range you define…
You could probably use multiple MACVLAN networks if you wanted to connect to multiple physical interfaces on the host…
Cheers.
Regarding your samba issues, then it is most likely you who use windows wrongly.
The workgroup have no effect on the share as such. It is only for discovery on the old SMB protocol.
Username in a domain network has to be prefixed with .\ or windows will add it’s domain to the username, like <username>, which will fail on the samba share.
Don’t even bother with maria db anymore. The advantages of using it over the built in database are now gone. HA completely rewrote and optimized the database to work with sql-lite, all other databases are an afterthought, including mariadb.
You can’t, but you can just change directories. Regardless of that, you shouldn’t be editing OS files, meaning you shouldn’t have to do what you’re trying to do. HAOS is an appliance like software. If you want to do anything complicated outside the appliance like abilities, don’t go with HAOS.
Supervisor is meant to manage your addons and docker configuration, not you. This is the whole point of HAOS, it’s a hands-off setup.
I know, but if I use .\homeassistant, windows seems to add the machine name instead of the domain. Didn’t packet capture this but it doesn’t work either (“0x80070035 network path not found”). No matter if I mark the windows’ network as private or domain.
Would it work with 30 or 50GB of data too? I didn’t dive into InfluxDB/Grafana yet so the HA db is all I have for my weather data and stuff (currently purge_keep_days: 400).
Understandable.
I wanted to use it for it’s monolithic appearance (network wise; with its own IP I could even use port 443 (i.e. Alexa media_player) for HA) and because I wanted to be able to easily switch servers if need be.
A pity.
I’ve avoided to go the docker+macvlan route until now (connection issues with the other services on the host), but thanks to Fraddles’ link I feel confident to venture the leap into that rabbit hole again.