Duckdns config fails - not a file for dictionary value

Hi, I followed exactly the installation manual of JuanMTech for DuckDNS.

setup Duckdns with token
add router forwarding
install Duckdns add-on
add lines to config.yaml

Added these lines in the configuration.yaml:

http:
  base_url: xxxxxx.duckdns.org
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

Unfortunately it fails with his error message:

Invalid config for [http]: not a file for dictionary value @ data[‘http’][‘ssl_key’]. Got ‘/share/ssl/privkey.prem’. (See /config/configuration.yaml, line 14).

Hass.io (ERROR) -
The ‘base_url’ option is deprecated, please remove it from your configuration
HTTP (WARNING)

Does anyone have any idea how to solve this.
I am new to this so a bit detailed explanation would be very appreciated.

BR, Rinco van der Beek

That guide is out of date. See here for allowed http options:

You want to define the internal and external URLs (both same as your base URL was) here now:

I believe this can be done in the UI if you have set up your basic information that way.

In addition to @tom_l 's comments, you need to carefully check what the actual contents of your configuration.yaml are, as the error message clearly shows that you have supplied a different path in your configuration to the one you pasted here, and have misspelled ‘pem’ in your configuration also.

Hi,
Thanks for your quick reply! Really appreciated.
Prem wasn’t in the script, I do not know why it was in my email, typo?
Just to try, I copied the SSL directory into the config directory and changed the lines to:

http:
  base_url: xxxxx.duckdns.org
  ssl_certificate: /config/ssl/fullchain.pem
  ssl_key: /config/ssl/privkey.pem

The good news is that something changed after a restart of the HA server.
HA now cannot be reached from the local address (what I expected) but unfortunately also not from duckDNS.
So something still is not right.

As I look on the newer instructions, should this be like this?
I put a # for the lines I’m not sure if needed.

http:
  server_port: 8123
  ssl_certificate: /config/ssl/fullchain.pem
  ssl_key: /config/ssl/privkey.pem
# cors_allowed_origins:
    - https://xxxxx.duckdns.org
# use_x_forwarded_for: true
  trusted_proxies:
    - 10.0.0.200
    - 172.30.33.0/24
  ip_ban_enabled: true
  login_attempts_threshold: 5`

Impossible to say as you have not formatted your post correctly so we can not see if you have the correct indentation. This is very important. Please read point 11 here, then edit your post.

pretty likely those paths are wrong

Hi, yes you are totally right, I need to indent properly.
Many thanks for your support, I’ll be more careful with that.

So far I experienced 2 issues;

  1. configuration HA
  2. no connection between duckdns and my Pi.

I copied the fullchain.pem and the privkey.pem to the config directory so these are in the same directory as the configuration.yaml. Can’t go wrong.

This is the config I have in my configuration.yaml:

http:
  ssl_certificate: /config/fullchain.pem
  ssl_key: /config/privkey.pem

The problem turns out my Surfshark VPN, all my internet traffic is routed tru this VPN.
It is centrally running on a QNAP server.
If I shut off Surfshark VPN, it works!

But… I want it to work with VPN.
Any suggestion?