Automated configuration not working properly #1117
Unanswered
kfitgitds24
asked this question in
Q&A
Replies: 1 comment
-
Hi. I think you should check the versions of acme-companion and nginx-proxy (or the nginx.tmpl file) you're using, double check the acme-companion documentation (because the certificate generation on every container startup sounds a bit like you upgraded from v1 to v2 without the required configuration changes) and remove your certificate related customisations to the nginx.tmpl file. acme-companion is meant to and does work out of the box with the current nginx-proxy / nginx.tmpl version. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently setting up a server, where I run nginx-proxy together with jrcs/letsencrypt-nginx-proxy-companion. From logs I noticed the companion tried getting new certificates after each docker compose up, until it reached rate limit. I investigated further and found out the nginx.tmpl is written in a way that instructs the companion to look for certificates and keys with
.crt
and.key
extensions (respectively), but the companion obtained certificates and keys all end with.pem
. Also the pathing per domain never worked.Okay so I changed the nginx.tmpl to fit my configuration, by doing this:
And surprisingly, when I left the containers running overnight, in the morning everything ran as it should - the letsencrypt companion saw the certificates, didn't try to acquire new ones. Then I restarted containers and the same old "rate limit" is here.
My nginx.tmpl still has the changes inside, but when I run manually docker-gen /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf in my nginx-proxy container, the resulting default.conf file says "No certificate found for this vhost, so use the default certificate...". Automated runs (like scheduled nginx -s reload) always end up over-writing the default.conf file.
Any ideas on why is this happening?
Beta Was this translation helpful? Give feedback.
All reactions