Home assistant remote access

Hey,

I’ve been trying to set up remote access using DuckDNS. Whenever I input the html settings into configuration.yaml and restart home assistant, I lose all local access to home assistant and also am unable to access remotely.

My DuckDNS config is:

lets_encrypt:
  accept_terms: true
  certfile: fullchain.pem
  keyfile: privkey.pem
token: *xxxxxmytoken*
domains:
  - *xxxxxxxxxx.duckdns.org* 
aliases: []
seconds: 300

and my configuration.yaml is:

http:
base_url: https://*xxxxxxxxxx.duckdns.org:8123*
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem

I’ve tried to port forwarded 8123 to 8123 on my router which isn’t working and have also tried 443 to 8123 which doesn’t work either.
Every time I edit the configuraion.yaml and cannot gain access I have to remove port forwarding, restart the router and pi and access the config through my computer network, restart everything again and then I’m able to get into home assistant again.

Can anybody please tell me what I’m doing wrong?

Kind Regards.

What do the logs say?

It’s been a long time since I’ve had to set up my HA like you are now, but it looks like you’re putting a certificate on your HA which means you can no longer access it with http://your.pi.ip.address:8123.

Try access with https://your.pi.ip.address:8123 (note the ‘S’ in https and not http).

Also, I am reasonably absolutely sure that base_url is now deprecated and no longer used. So try without that.

Looks like you’re following a guide or something. Please include that in your questions so people are aware of what you’re trying to copy.

Lastly, please format your code using code blocks. Besides making it much easier for people to see which part is code and which is commentary, you are using YAML which is a whitespace sensitive language.

I even got a pop-up when I posted asking for posts to wrap code …

Firstly, apologies for the code formatting. I initially tried adding ‘’’ on top of and below each block of code but I was still receiving the same pop-up so I figured it wasn’t working and removed the ‘’’. Any ideas on how to do this properly in the future?

Secondly, thank you for your insight! I’ve removed base_url and added the s to the url on both local and remote access. One (or both) of those have fixed my issue of not being able to access home assistant.

Thanks again!

Edit: Fixed the code formatting. I was using quotations ’ instead of these `

1 Like

Yeah they are “backticks” and not “apostrophes”.

That’s awesome you got it working! You’re welcome :slight_smile: