Closed ceramey1997 closed 11 months ago
Thanks for the post. The environment variables that are used with docker compose file works only for the first time the container runs. Subsequently, the DNS server's config file will be used to load the settings.
however it seems that there is code that blocks that logic here.
You are referring to Block Page app in there which is totally not related to the DNS server's web service.
Currently, there is no environment variable available to set the certificate path. There is only DNS_SERVER_WEB_SERVICE_USE_SELF_SIGNED_CERT
which will generate a self signed cert for the web service.
If you wish to configure the TLS cert then you can use the HTTP API using curl and jq commands. For example, you can use the following bash script to setup HTTPS with your cert:
DNS_TOKEN=`curl "http://localhost:5380/api/user/login?user=admin&pass=admin" | jq -r ".token"`
curl "http://localhost:5380/api/settings/set?token=$DNS_TOKEN&webServiceEnableTls=true&webServiceTlsPort=53443&webServiceTlsCertificatePath=\path\to\cert.pfx"
This way you can configure anything that you wish to have when the DNS server is deployed.
I am running this dns service locally and would like to route its traffic using Traefik. I have a wildcart cert that i use for all my local services and house their dns records in technitium. But, I would also like to use the address dns.whatever.whatever instead of my.ip:5380
I was under the impression based on the sample docker files and docker compose files that if I set
DNS_SERVER_WEB_SERVICE_HTTPS_PORT
andDNS_SERVER_WEB_SERVICE_ENABLE_HTTPS
then I would be able to use the default https port of53443
which i could then route through traefik. however it seems that there is code that blocks that logic here.It looks like to me - in order to have the app listening on the https ports specified via the environment variables you also have to certs in the
_webServerTlsCertificateCollection
.If my statement is true, I think that either