Help with DuckDNS needed! (using the hassio addon)

I had hassio running on a rpi3 which was working fine with my lights and duckdns (i was able to access it from outside my network and everything was working fine) However after messing with the config and then restarting my device, i could no longer reach the frontend (and the homebridge addon had stopped working as it showed it wasn’t responding on my phone). I couldn’t get back onto the frontend so i decided to start again, so after a fresh install of hassio, i started again. Everything was running fine except the duckdns addon - which i haven’t managed to get working since the fresh install. If I have

http:
  api_password: "xxxxxx"
  base_url: https://xxxxxxx.org:8123
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

in my config, the hassio frontend wouldn’t startup, whereas if I just had

http:
  api_password: "xxxxxx"

the frontend would load, and i could control my devices through alexa and siri

The problem was that I couldn’t get the duck dns addon working, I tried while the config only had the http password, and it said that the domain challenge was invalid each time, and I couldn’t try while the config was how it should be as the frontend didn’t load.

I have just tried changing the duckdns addon to start on boot and had the config with the base_url, ssl certificate and key and restarted the device. However now I can no longer reach the frontend even if I remove everything but the api_password from the http config.

My DuckDNS Addon config is:

{
  "lets_encrypt": {
    "accept_terms": true
  },
  "token": "xxxxxxxxxxxxxxxxxxxxx",
  "domains": ["xxxxxx.duckdns.org"],
  "seconds": 300
}

I am not sure if there is any way that
a) I can get the hassio server back up so that I can reach the frontend and use it with alexa and siri
b) setup DuckDNS so I can use it outside my local network

I am running headless and I don’t have the SSH addon installed.

Any help would be appreciated

Might be asking the obvious here, but did you enable port forwarding on your router, and is it pointing to the correct IP address of your PI? If you did a reinstallation, perhaps your PI got a new IP?

Hi,
I fowarded port 8123 external to 8123 internal at my pi’s ip address
I have checked and the IP is still the same as before the reinstallation.

Thanks, Billy

Can you access it from the outside, by using your external IP address? If I understand correctly, you can’t even access it locally?

It is working when i go to http://mypublicip:8123/

My cert and key files are defined there too:

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

Thanks I’ll try using that

Update: I can access it through localip:8123 or publicip:8123 at the moment but I only have api_password under http:

I am going to try with that duckdns addon config though

ok, no difference
here’s my log from the duckdns addon

starting version 3.2.2
# INFO: Using main config file /data/workdir/config
+ Account already registered!
Fri Dec 29 20:17:28 GMT 2017: KO
# INFO: Using main config file /data/workdir/config
Processing xxxxxxx.duckdns.org
 + Signing domains...
 + Generating private key...
 + Generating signing request...
 + Requesting challenge for xxxxxxxx.duckdns.org...
KO + Responding to challenge for xxxxxxxxxxx.duckdns.org...
KOUnknown hook invalid_challenge
ERROR: Challenge is invalid! (returned: invalid) (result: {
  "type": "dns-01",
  "status": "invalid",
  "error": {
    "type": "urn:acme:error:connection",
    "detail": "DNS problem: NXDOMAIN looking up TXT for _acme-challenge.xxxxxxx.duckdns.org",
    "status": 400
  },
  "uri": "https://acme-v01.api.letsencrypt.org/acme/challenge/1jwnYFSXfgH64SxGlagT4_3xglO9OlVna5L2TWn9YyI/2914484304",
  "token": "xxxxxx",
  "keyAuthorization": "xxxx.xxxx-xx-xx"
})

You might want to take out the token and keyauth infor there mate.

Also what do you have in the lets encrypt addon.

Mine looks like this:

{
  "challenge": "https",
  "email": "[email protected]",
  "domains": [
    "xxxx.duckdns.org"
  ],
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

i dont have letsencrypt set up as i thought that the duckdns addon takes care of all of it?? that’s what I’ve seen on quite a few of these forums but maybe I’m wrong

The lets encrypt addon manages your certificates, so you need that as well. If you did a clean installation you probably dont have any certificates, so the addon will create a new one for you.

ok, I’m trying again from scratch with a new clean install and I’ve copied my config so I don’t lose my lights and stuff.
Thanks for the help, I’ll let you know how it goes

Looks like a lot of the same issue what I got. What for me did the job was to generate a new token key on the DuckDNS website :slight_smile:

So after two days struggling hopefully I can help you within some minutes :wink:

ok if it doesn’t work with the clean install I’ll try that
Thanks

I dont think you need to do a clean install, just try adding the lets encrypt addon and create a certificate

I’ve got everything working now! Thanks everyone for the help

2 Likes

Anything special what you’ve changed or done?

i did a clean install, then first ran the letsencrypt addon, then the duckdns addon THEN added the base url, ssl and certificate to my config, then restarted

I am also having a problem with the duckdns v1.1 (i havn’t got this problem on v1.0). The add-on cannot activate. When i push to start it immediately goes back to off and generate a log entry:

18-03-01 08:28:47 ERROR (SyncWorker_15) [hassio.docker] Can’t create container from addon_core_duckdns: 500 Server Error: Internal Server Error (“error creating aufs mount to /var/lib/docker/aufs/mnt/7118812a9c55a433f0736b60187cac32c2ff43bf22fb31cb8a78b6e3b4cbd34c-init: invalid argument”)