Hi,
I have been pulling my hair out for days now with this one.
I have recently stood up a new Raspberry Pi config for Homeassistant running in docker.
Previously this was HAOSS and with add-ons for Duck Dns / Lets Encrypt and NGINX things were working OK (well those bits anyway)
Now I am having great difficulty setting these up in my new world. I have been following others suggestions eg
Create a certificate using Certbot through Docker | An honest place where you can learn things about programming.
How to Set Up letsencrypt with Nginx on Docker
I think I have it down to a consistent error 'Connection refused' and that seems to be coming from Certbot trying to get keys.
Having said that 'connection refused getting new certificates' is a recurrent theme acoss the web but there appears to be an infinite number of possible causes
(a, sanatized, full log is attached)
It should not be too bad because it was working a week or two ago - so DuckDns should be valid, ports open etc.
Rather than me over thinking it I would appreciate if somebody who knew something about this stuff could look at the attached log and pinpoint where line 229 (and better yet 'why') it has fallen off the rails.
Being aware of the 'chicken/egg' issue the relevant setting for
docker-compose.yaml are
nginx:
container_name: nginx
image: nginx:latest
ports:
- 80:80
# - 443:443
restart: always
volumes:
- /home/jc/docker/nginx/:/etc/nginx/conf.d/:ro
- /home/jc/docker/certbot/www:/var/www/certbot:ro
- /home/jc/docker/certbot/conf:/etc/letsencrypt:rw
certbot:
container_name: certbot
image: certbot/certbot:latest
volumes:
- /home/jc/docker/certbot/www:/var/www/certbot:rw
- /home/jc/docker/certbot/conf:/etc/letsencrypt:rw
- /home/jc/docker/certbot/lib:/var/lib/letsencrype:rw
- /home/jc/docker/certbot/log:/var/log/letsencrypt:rw
and the nginx app.conf...
server {
listen 80;
listen [::]:80 ipv6only=off;
server_name campbellshouse.duckdns.org;
# server_tokens off;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://campbellshouse.duckdns.org$request_uri;
}
}
certbot_log_evidence_sanitised.txt (16.5 KB)
Thanks for any help you can offer
JC