duckDns issues

Hi i am trying to install duckDNS but have this issue bellow,what should i do to fix it?

2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setting up introduction
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setup of domain introduction took 0.0 seconds.
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.config] Invalid config for [http]: not a file for dictionary value @ data[‘http’][‘ssl_certificate’]. Got ‘/etc/letsencrypt/live/stewartpi.duckdns.org/fullchain.pem’
not a file for dictionary value @ data[‘http’][‘ssl_key’]. Got ‘/etc/letsencrypt/live/stewartpi.duckdns.org/privkey.pem’. (See /home/homeassistant/.homeassistant/configuration.yaml, line 24). Please check the docs at https://home-assistant.io/components/http/
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.setup] Setup failed for http: Invalid config.
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setting up recorder
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.0 seconds.
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of api. Setup failed for dependencies: http
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.setup] Setup failed for api: Could not setup all dependencies.
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of websocket_api. Setup failed for dependencies: http
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.setup] Setup failed for websocket_api: Could not setup all dependencies.
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of history. Setup failed for dependencies: http
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.setup] Setup failed for history: Could not setup all dependencies.
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of frontend. Setup failed for dependencies: api, websocket_api
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Could not setup all dependencies.
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setting up group
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setting up sun
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setting up conversation
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setting up discovery
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setting up updater
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setting up automation
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setup of domain group took 0.1 seconds.
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.1 seconds.
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setup of domain conversation took 0.1 seconds.
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setup of domain discovery took 0.1 seconds.
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setup of domain updater took 0.0 seconds.
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setting up zone
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of config. Setup failed for dependencies: http
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.setup] Setup failed for config: Could not setup all dependencies.
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of tts. Setup failed for dependencies: http
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.setup] Setup failed for tts: Could not setup all dependencies.
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of logbook. Setup failed for dependencies: frontend
2017-06-12 11:20:38 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Could not setup all dependencies.
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setup of domain automation took 0.0 seconds.
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setup of domain zone took 0.0 seconds.
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setting up device_tracker
2017-06-12 11:20:38 INFO (MainThread) [homeassistant.setup] Setup of domain device_tracker took 0.0 seconds.
Failed config
http:
ssl_certificate: /etc/letsencrypt/live/stewartpi.duckdns.org/fullchain.pem
ssl_key: /etc/letsencrypt/live/stewartpi.duckdns.org/privkey.pem

General Errors:
- Setup failed for http: Invalid config.
- Unable to setup dependencies of api. Setup failed for dependencies: http
- Setup failed for api: Could not setup all dependencies.
- Unable to setup dependencies of websocket_api. Setup failed for dependencies: http
- Setup failed for websocket_api: Could not setup all dependencies.
- Unable to setup dependencies of history. Setup failed for dependencies: http
- Setup failed for history: Could not setup all dependencies.
- Unable to setup dependencies of frontend. Setup failed for dependencies: api, websocket_api
- Setup failed for frontend: Could not setup all dependencies.
- Unable to setup dependencies of config. Setup failed for dependencies: http
- Setup failed for config: Could not setup all dependencies.
- Unable to setup dependencies of tts. Setup failed for dependencies: http
- Setup failed for tts: Could not setup all dependencies.
- Unable to setup dependencies of logbook. Setup failed for dependencies: frontend
- Setup failed for logbook: Could not setup all dependencies.

Sounds like your issue is with LetsEncrypt, not DuckDNS.

DuckDNS is a dynamic DNS - a way to make it so that you have a consistent URL. That’s stuff that you set up outside of Home Assistant.

You’ll need to be sure that you’ve correctly set up LetsEncrypt if you plan to use SSL with Home Assistant.
BRUH Automation has a good guide and video covering the steps:

Thanks for the reply, so i got this far but now have this message. the email and duckdns address has been changed for obvious reasons.

pi@hassbian:~/letsencrypt $ ./letsencrypt-auto certonly --email [email protected] -d example.duckdns.org
WARNING: unable to check for updates.
Requesting root privileges to run certbot…
/home/pi/.local/share/letsencrypt/bin/letsencrypt certonly --email [email protected] -d example.duckdns.org
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Failed to find executable apache2ctl in PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

How would you like to authenticate with the ACME CA?

1: Spin up a temporary webserver (standalone)
2: Place files in webroot directory (webroot)

Select the appropriate number [1-2] then [enter] (press ‘c’ to cancel): 1
An unexpected error occurred:
ConnectionError: HTTPSConnectionPool(host=‘acme-v01.api.letsencrypt.org’, port=443): Max retries exceeded with url: /directory (Caused by NewConnectionError(’<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x75d820b0>: Failed to establish a new connection: [Errno -2] Name or service not known’,))
Please see the logfiles in /var/log/letsencrypt for more details.

Have you forwarded ports 80 and 443 to your Pi? You’ll need to have port forwarding set up before running that command.

If memory serves, the first time you run certbot, you need to have 443 forwarded to certbot, not to HA. So 443->443, not 443->8132 (HA’s port). From then on (when renewing), you only need to forward port 80. I leave 80 forwarding to my Pi all the time. (most of the time, there’s nothing running at 80)

Thanks, I did port forward so that 443 is on a start port and end port with 80 being the same. i ran the code after doing that with the error.

./letsencrypt-auto certonly --email [email protected] -d blank.duckdns.org
WARNING: unable to check for updates.
Requesting root privileges to run certbot…
/home/pi/.local/share/letsencrypt/bin/letsencrypt certonly --email [email protected] -d blank.duckdns.org
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Failed to find executable apache2ctl in PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

How would you like to authenticate with the ACME CA?

1: Spin up a temporary webserver (standalone)
2: Place files in webroot directory (webroot)

Select the appropriate number [1-2] then [enter] (press ‘c’ to cancel): 1
An unexpected error occurred:
ConnectionError: HTTPSConnectionPool(host=‘acme-v01.api.letsencrypt.org’, port=443): Max retries exceeded with url: /directory (Caused by NewConnectionError(’<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x75e350b0>: Failed to establish a new connection: [Errno -2] Name or service not known’,))
Please see the logfiles in /var/log/letsencrypt for more details.

when I do run the https://example.duckdns.org it takes me to my router?

Looks like you’ve still got a port forwarding issue. After setting up DuckDNS, did you test to see if you were able to reach your HA device from outside your network? It’d be on port 8132 and not SSL, but you should at least be able to confirm that first. If you can’t do that, then your issue lies with port forwarding or perhaps your DuckDNS configuration.[quote=“Stewart_Clay, post:5, topic:19661”]
when I do run the https://example.duckdns.org it takes me to my router?
[/quote]

This is true from outside your network?

Yes this is true but as a mistake it isnt using the 8123 port, when i run ./duck.sh is says
curl: no URL specified!
curl: try ‘curl --help’ or ‘curl --manual’ for more information
What would this indicate?

Not really sure what you’re saying here.

But port forwarding is handled by your router, not by any script on your HA device.

So, test that DuckDNS is working first. Make sure that port 8132 is forwarded to your Pi. Then test with your phone. Turn off WiFi so that you’re on mobile data, then go to http://YOURDOMAIN.duckdns.org:8132

If that works, then DuckDNS is set up correctly. So then go back to your port forwarding settings on your router and have 443 forward to your Pi. Then run certbot. Certbot is going to ask an outside server to confirm your identity by connecting to the script from outside of your network. So it depends on DuckDNS (give it the the right IP address) and port forwarding (make sure that the ports forward from your router to the Pi).

If that completes correctly, then finish up by restoring your port forwarding so that 443 forwards to 8123 on your Pi. If all is well, you should be able to reach https://YOURDOMAIN.duckdns.org

from running the search on my phone it searches for a while and then says safari could not open the page because the server stopped responding.

Search?

You’ve got a problem with DuckDNS or with port forwarding. Since you were redirected to your router when you went to

http://YOURDOMAIN.duckdns.org

That suggests it’s a port forwarding issue. Be sure to get those ports forwarded like I mentioned. That’ll be in the settings for your router.

Here are pictures of my port forwarding.

Looks like your router has a firewall. Are you allowing those ports to pass the firewall?

Also: Is there a step where you need to “apply” the settings? On some routers, that may require a restart.

i cant access my Pi now at all but only through putty

If you don’t have port forwarding working, you should be able to go to port 8123 on the pi. Depending on your base_url setting for http in Home Assistant.

Any errors in home-assistant.log?

Looks like you have to do a bit more work on that router if you want loopback (being redirected to the right place when inside the network).

To go right back to the first post, the problem there is either:

  • there are no files at the location you’ve given
  • Home Assistant does not have permission to access the files.

Please follow the guide from start to finish…