Letsencrypt certificate

Hi

I’ve got Home Assistant Container running on a Pi behind a fixed IP address. I’m trying to get HTTPS to work for Alexa integration. I’ve got my certificate from letsencrypt and I’ve added the following lines to configuration.yaml:

# Example configuration.yaml entry for the HTTP component
http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

I’ve copied fullchain.pem and privkey.pem to those folders. When I restart home assistant I get the following:

[2855329360] The system cannot restart because the configuration is not valid: Invalid config for [http]: not a file for dictionary value @ data['http']['ssl_certificate']. Got '/ssl/fullchain.pem' not a file for dictionary value @ data['http']['ssl_key']. Got '/ssl/privkey.pem'. (See /config/configuration.yaml, line 10).
[2851818488] The system cannot restart because the configuration is not valid: Invalid config for [http]: not a file for dictionary value @ data['http']['ssl_certificate']. Got '/ssl/fullchain.pem' not a file for dictionary value @ data['http']['ssl_key']. Got '/ssl/privkey.pem'. (See /config/configuration.yaml, line 10).
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 728, in admin_handler
    await result
  File "/usr/src/homeassistant/homeassistant/components/homeassistant/__init__.py", line 161, in async_handle_core_service
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: The system cannot restart because the configuration is not valid: Invalid config for [http]: not a file for dictionary value @ data['http']['ssl_certificate']. Got '/ssl/fullchain.pem'
not a file for dictionary value @ data['http']['ssl_key']. Got '/ssl/privkey.pem'. (See /config/configuration.yaml, line 10). 

Any ideas why this isn’t working??

Thanks

Sam

looks pretty ok to me…
Happen to have edited in windows and the copied it ti HA?
Asking because of this

Text files created on DOS/Windows machines
 have different line endings than files 
created on Unix/Linux. 
DOS uses carriage return and 
line feed ("\r\n") as a line ending, 
which Unix uses just line feed ("\n"). ... 
Shell programs, in particular, will fail in 
mysterious ways if they contain DOS line 
endings.

If that is the case, use line feed only instead of cr + lf.
(maybe use the build-in file editor)

Edited in nano on the pi :frowning:

You mapped /ssl to your container, right?
Or you created the dir under /config, in which case you need /config/ssl

Hi

I did think that could be the problem, I’ve never used containers before.

I will do some research, I assume your saying the container can’t access the whole filling system.

Sam

Hi

Any points on what I should check Very much appreciated…

Sam

I told you above what to do: put the ssl directory inside your config one.

@koying Thanks, didn’t notice that suggestion, but that works just great!

Sam