Getting LetsEncrypt Certificate
Now it’s time to get your SSL certificates. Here’s how I did mine, feel free to adapt and find the solution that works best
- Forward port 80 to your Home Assistant internal IP. If you’re unfamiliar with how to do this, go to this website and follow the guide for your router: https://portforward.com/
- Make sure you don’t already have anything running on port 80 and 443. If there are, stop them for now.
SSH into your Home Assistant setup, and run the following commands:
$ sudo apt-get update $ sudo apt-get install software-properties-common -y $ sudo add-apt-repository ppa:certbot/certbot $ sudo apt-get update $ sudo apt-get install certbot -y
Once certbot is installed, run the following command (replace your_domain.duckdns.org with your own domain):
certbot certonly --standalone -d your_domain.duckdns.org
Follow the prompts of certbot. If everything works, you should see the following:
- Congratulations! Your certificate and chain have been saved at:
Your key file has been saved at:
Your cert will expire on 2018-05-11. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew *all* of your certificates, run
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
- You can now remove the port 80 forward you created in step 1.
Go to the next page for Home Assistant configuration.