Use SSL certificate in Container installation

Hello folks,

I bought a domain name from a domain name provider and it includes SSL.
I have downloaded the certificate zip and it contains:

  • domain.cert.pem
  • intermediate.cert.pem
  • private.key.pem
  • public.key.pem

Few things to note:

  1. My Home Assistant installation is container.
  2. I port forwarded public ports 80-433 to private ports 8123-8123.
  3. Created a A Record of my domain that points to my ISP public IP address.
  4. I can access Home Assistant using http://subdomain.domain.com.

Can somebody guide me how I can use these certificate locally to access Home Assistant using https://subdomain.domain.com.

I don’t want to use Let’s Encrypt, DuckDNS or any third-party in middle.

You need to place the certificate chain pem file (server cert, intermediate cert and root cert) in the Home Assistants ssl folder. See the HTTP integration docs.

However, Let’s Encrypt and DuckDNS are not parties “in the middle”. They simply automate (free) certificate management so that you don’t have to to be messing with renewal, purchase and other manual operations. And the web is moving away from manual certificate management.

Add a volume mount to map the actual location of those to /ssl and then you can use them in the container.

Alternatively use a proxy server (and similarly map the location of the certs for that).