tsujamin / hass-addons

108 stars 35 forks source link

adding tailscale cert #29

Closed patlux closed 2 years ago

patlux commented 2 years ago

Hi, I did it 🚀

This MR adds support for Tailscale HTTPS which lets you to create a valid SSL Certificate authorised by a public Certificate Authority.

It's necessary to set the exact domain under which your Home Assistance is running at cert_domain:

hostname: hassio
auth_key: tskey-....
cert_domain: hassio.your-domain.ts.net # <----

Then on startup it will create two files under /ssl which you can use for any Webserver.

E.g. Home Assistance /config/configuration.yaml:

http:
  server_port: 443
  ssl_certificate: /ssl/hassio.your-domain.ts.net
  ssl_key: /ssl/hassio.your-domain.ts.net

Your Home Assistance should now be available under https://hassio.your-domain.ts.net

I personally needed it for my running vaultwarden instance which needs the following options to set:

certfile: hassio.your-domain.ts.net.crt
keyfile: hassio.your-domain.ts.net.key
ssl: true
tsujamin commented 2 years ago

This is fantastic work, many thanks for the contribution! Will merge it in now and do a point release