Addon duckdns+letsecrypt

hello everyone,
I´m needing a help I´m trying to instal addon of duckdns + let´s encrypt I´m following the instructions here https://home-assistant.io/addons/duckdns/ I made a duck dns account got my token and my domain fullfilled I set true to let´s encrypt but when I try to star gives me this:
Missing option keyfile in lets_encrypt for dictionary value @ data[‘options’]. Got {‘lets_encrypt’: {‘accept_terms’: True}, ‘token’: ‘sdfj-2131023-dslfjsd-12321’, ‘domains’: [‘my-domain.duckdns.org’]}

am I missing something?

Probably a typo somewhere. Here is mine.

{
  "lets_encrypt": {
    "accept_terms": true,
    "certfile": "fullchain.pem",
    "keyfile": "privkey.pem"
  },
  "token": "YOUR_TOKEN",
  "domains": [
    "YOURS.duckdns.org"
  ],
  "seconds": 300
}

Tks very much ill try, do i have to port forward 8123? Do i have to ser a fix ip something like this?

Port forward of 8123… depends. All the docs/videos say you don’t need to specify the port anymore when you have duckdns and ssl installed. I found in practice even though I had 443 forwarded to the Pi that I couldn’t get a connection unless I also had port 8123 forwarded and I had to specify :8123 or the web page would not connect.

I needed to port forward WAN 443 to LAN 8123 for the Hassio IP when connecting using the iOS app on iPhone using cellular data service. URL is https://my_domain.duckdns.org. (No 8123) So you probably need port forwarding for external access.

do I need to do this on the firewall

I tried to forward the port but its saying that this port is being already used (443) l, im trying to access mydomain.duckdns.org outside my network and its not happening. I have a modem that is also a router maybe its him that is blocking?

The port forwarding goes on the router. My biggest problem getting this to work is I kept trying to go to .COM instead of .ORG. Took me a couple days to figure that one out.

I’ve tried all combinations , I can enter inside my network but cant outside, I’ve tried to triggered aomething from hass.io to ifttt and didnt get any response, I think ita my router or my modem that is blocking something, wben I try to forward my port os given me that the lort is already being used 443, also if i dont fix my ip duck dns cant find my ip even inside my network

I had my port 443 to my xbox, thats why I was having problems, today I was able to send a trigger from my hassio to ifttt and my drive as a test, I still cant access my hass.io from my mobile outside my network and still didnt get my tv to turn on through ifttt and my GH i will revised my commands to see whats wrong

you’ll need to be forwarding port 8123 external to 8123 internal as well. When you set up LetsEncrypt, if 443 wasn’t forwarded to the Pi - that might explain the issue with LetsEncrypt as well. Did your certificate actually work?

So ill need to forward port 443 to 8123 and 8123 to 8123 is that rigth? How can i say that my certificate are working?

my certificate it´s not working it´s failing to find my duckdns server

I’m curious where to find all this information about port forwarding. I only forwarded 443 external to 8123 internal and I can access my system from the iOS app and a browser from the internet fine. My problem is internally on my network I can no longer ssh or samba in so my config is locked away now.

so still strugling to find a answer I forwarded the ports I was able to install duck dns, but I´m still not able to reach my hass.io outside my network, I know that in the tutorial says it´s not necessary to install let´s encrypt but i did anyway to try and gives me this message:

starting version 3.2.2
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for arissaraiva.duckdns.org
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. arissaraiva.duckdns.org (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Timeout
IMPORTANT NOTES:

  • The following errors were reported by the server:
    Domain: arissaraiva.duckdns.org
    Type: connection
    Detail: Timeout
    To fix these errors, please make sure that your domain name was
    entered correctly and the DNS A record(s) for that domain
    contain(s) the right IP address. Additionally, please check that
    your computer has a publicly routable IP address and that no
    firewalls are preventing the server from communicating with the
    client. If you’re using the webroot plugin, you should also verify
    that you are serving files from the webroot path you provided.

It´s not a problem with my domain, but I don´t know anymore what can I try, maybe it´s my router?

Just spent the last couple of hours fighting with this… (hassio)

Hopefully this isn’t completely wrong and helps someone…

  1. Go to duckdns.org, sign in with whichever method you like, create subdomain (Note your token here as well)
  2. Install duckdns add-on
  3. Modify duckdns add-on options (accept_terms, token, domains)
{
  "lets_encrypt": {
    "accept_terms": true,
    "certfile": "fullchain.pem",
    "keyfile": "privkey.pem"
  },
  "token": "paste-token-here",
  "domains": [
    "your-domain-name-here.duckdns.org"
  ],
  "seconds": 300
}

Some have mentioned disabling SSH and Samba before starting add-on to avoid breaking anything.

  1. Save and Start
  2. Add the following to configuration.yaml
http:
  base_url: your-domain-name-here.duckdns.org:8123
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
  api_password: super-secret-password-goes-here
  1. Reboot
  2. Set up a port forward on router from 443 (https) to hassio IP
  3. And that should do it.

Access locally from https://hassio.local:8123/ and externally from your-domain-name-here.duckdns.org:8123

As for the error you’re getting.

Failed authorization procedure. arissaraiva.duckdns.org (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Timeout

Have you tried refreshing/updating your IP on duckdns.org manually?

5 Likes

Great run down.

I’m guessing I somehow “broke” my ssh and samba because I never saw anything about turning them as you outline? Any guesses/leads on how to un-break them? I’m also seeing threads that talk about samba being possibly broken by one of the HA updates, particularly for Windows users (I’m on a Mac, and running Hass.io on my Pi), so maybe I didn’t break anything and its a larger problem? grasping at straws here…

Saw someone else mentioning it while I was scouring the forums for info, so thought I’d mention it to be safe.

I’m assuming you can still access the frontend? What happens when you modify or restart the add-ons for samba and ssh?

Otherwise you could also try loading terminal and running a update from there if you’re not already on the latest version?

I think I just got things working again, but I’m not sure exactly what the solution (or problem) was. I’m on the latest versions as of 2 days ago. Thankfully I could still access the front end, and even perform the latest Hass.io upgrade from that, but I would like to know how to use this terminal you’re referring to? (Mac OS Terminal? what commands?)

  • Uninstalled DuckDNS add-on
  • Uninstalled SSH
  • Uninstalled Samba
  • removed port forwarding
  • deleted the known_hosts file from my machine
  • rebooted Pi
  • started reinstalling add-ons

suddenly my Samba shares showed up and I can access them. added back other things I had removed.

I’m leaning toward problems somehow stored in my known_hosts file, as when I deleted that it seemed to resolve lot of scary SSH and browser “invalid certificate” errors I was seeing, as well as fixing SSH and Samba.

Glad you got it up and running again.

Was referring to the terminal add-on https://github.com/hassio-addons/addon-terminal