Invalid config for [http]: not a file for dictionary value @ data['http']['ssl_key']

Hello all! Already spent some hours trying to figure this out. I created a self signed wildcard certificate for my local domain. I don’t expose HA to the outside world but use a VPN instead.
The self signed certificate already worked for my Proxmox installation, now it’s HTTPS.

So I wanted the same with HA. But I keep getting this error:

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

I found several posts on the web, with several solutions but so far none worked for me. I changed the file permissions (now 755 so that shouldn’t be an issue anymore).
Tried moving the cert and key (both .pem files) to a different folder. Changed my configuration.yaml, checked indentation which seems to be good now.
Moved the files from the SSL folder to the config folder and back. Changed permissions again.
Read the documentation. I seem to be out of options for now.

I’m using HassOS 7.5 HA version is currently 2022.3.7.
My configuration.yaml currently looks like this:

http:
ssl_certificate: /config/ssl/cert.pem
ssl_key: /config/ssl/cert_key.pem

I get the error when checking the config (in ‘validate configuration’).
Didn’t yet try to ignore the warning and see if it works. I think this is something that can be approved in HA in the future.

1 Like

You haven’t formatted it properly. YAML requires specific indentation, and you need to indent it as shown in the docs:

http:
  ssl_certificate: /config/ssl/cert.pem
  ssl_key: /config/ssl/cert_key.pem

The error message that you quoted indicates that the files aren’t in the path that you provided.

It’s telling you the paths are wrong, or they can’t be read by the HA user.

Did this work? I am interested in doing the same because the VPN I use won’t let me connect to an unsecured site.

Thanks Rob. I see I pasted it wrong here. In the yaml file there are 2 spaces in front. It doesn’t show in my post but it’s correct. The files are in the path indeed, I double checked.

Edit: I saw it wrong! I got an underscore ( _ ) in the file name and in reality it’s a dash (-).
I feel stupid but thanks a lot !

Hello Stephen, yes it worked. I recommend watching this tutorial: How to create a valid self signed SSL Certificate? - YouTube