Thanks for your help, I got it working. For any searchers ending up on this thread, here’s what I found:
I’m running a Ubiquiti EdgeRouter X. Getting to ‘https:example.duckdns.org:8123’ from the internal network was as simple as logging into the router, clicking “Firewall/NAT”, checking “Enable hairpin NAT”, clicking “apply”
Now I have one homesceen bookmark on my iPhone that works at home or away!
As for the SSL keys, the default privileges that are generated when the keys are made will not work for AIO installs. You will need to change permissions or change ownership to get them working. What I did was make a copy of the keys into the homeassistant virtual environment, created a group called ‘hass’ with homeassistant and pi as users, then chown’d the keys to homeassistant:hass. Here’s how:
Copy Keys into homeassistant virtual environment:
sudo cp -R /etc/letsencrypt /home/homeassistant/.homeassistant/letsencrypt/
Create new group called ‘hass’ with users ‘homeassistant’ and ‘pi’:
sudo groupadd hass sudo usermod -aG hass pi sudo usermod -aG hass homeassistant
Give ownership of SSL keys to homeassistant:hass (I did the whole ‘live’ and ‘archive’ folders because I read other posters doing that)…no idea if that’s best practices:
sudo chown -R homeassistant:hass /home/homeassistant/.homeassistant/www/letsencrypt/live/ sudo chown -R homeassistant:hass /home/homeassistant/.homeassistant/www/letsencrypt/archive/
Add SSL keys to home assistant config:
http:
ssl_certificate: /home/homeassistant/.homeassistant/letsencrypt/live/example.duckdns.org/fullchain.pem
ssl_key: /home/homeassistant/.homeassistant/letsencrypt/live/example.duckdns.org/privkey.pem
Log into router and forward external 443 to internal 8123 on host IP
Test that it worked by visiting from outside network: https://hass-example.duckdns.org:8123
Test that it worked by visiting from inside network: https://192.168.1.111:8123
After setting up NAT hairpin or DNSMasq on your router, test that duckdns address works inside the network. All set!