so I am trying to get traefik to work and so far im failing miserably and I dont know further. I cannot find any information on the net so im creating this.
I want to open Homeassistant, Vaultwarden and Tandoor to the Web using DuckDNS. (but for the sake of simplicity I will start out with just homeassistant).
Now I have everything set up and running. But when I access my domain it will just tell me SEC_ERROR_UNKNOWN_ISSUER and when I ignore the warning it will forward me to 404 page not found
.
Now when I check the docker logs I get the following:
time="2023-12-31T15:48:36Z" level=error msg="service \"homeassistant-documents\" error: unable to find the IP address for the container \"/homeassistant\": the server is ignored" providerName=docker container=homeassistant-documents-0ed45ac004655cb73b9d3b37426c247d906d3369cb705c983e4b9d4cf95edd8d
Now I dont know why but nothing I have is called homeassistant-documents.
Thank you very much for the reply.
I updated it now to the following Compose file and I get a big big log file and it looks like its working but when I try to connect I just get a network timeout
Usually you would run Traefik and your target services connected to a Docker network, the Traefik Docker Configuration Discovery would then use the internal container IP of the target service to forward requests.
But you use network_mode: host for homeassistant, so there is no internal container IP. Not sure this is going to work.
I see two options:
Either you create an additional dynamic config file with Traefik http router and service, pointing to the host IP of your node (not localhost/127.0.0.1), so manual config for homeassistant.
Or you don't use network_mode: host, but instead expose all required ports with ports.
The same topic is currently discussed on the Docker forum (link).
Note that you have an ACME LetsEncrypt error in you logs, your domain needs to point to the Traefik instance`s node and be reachable from the Internet.
I want to say that I have done quite some testing ( I have tested your configuration from github! ) but not really with any result
So two issues:
Homeassistant Network Mode:
Do you know if there is any way of finding out which port a container is using?
running docker ps -a only shows 5683 and 8123 like configured.
Wouldnt this technically all work if I put every container in the same network (atleast for the ones which homeassistant interacts with so Influxdb, MQTT Broker, etc.)?
Because when removing the host flag and adding a network to homeassistant and influxdb, changing the server ip for influxdb from localhost to "influxdb" in the homeassistant configuration and restarting both will just lead that it fails to connect them together
ACME Letsecnrypt Error:
Thats the second weird thing. Right now I am running your github traefik configuration with whoami like this:
When using Traefik LetsEncrypt, it will automatically create a TLS cert for every domain you have in Host(). For this to work they must all be registered in DNS and point to your Traefik instance, which needs to be available on the Internet.
Your SEC_ERROR_UNKNOWN_ISSUER error is shown in your browser when a TLS cert can’t be generated, then Traefik is falling back to use a custom generated (untrusted) TLS cert.