DanielDent / docker-nginx-ssl-proxy

SSL Front-End Proxy With Automatic Free Certificate Management
https://hub.docker.com/r/danieldent/nginx-ssl-proxy/
Other
204 stars 68 forks source link

too many certificates issued #20

Open echohtp opened 5 years ago

echohtp commented 5 years ago

looks like nginx was not picking up the certificates it had already created.

nginx-ssl-proxy_1 | Saving debug log to /var/log/letsencrypt/letsencrypt.log nginx-ssl-proxy_1 | Obtaining a new certificate nginx-ssl-proxy_1 | Performing the following challenges: nginx-ssl-proxy_1 | http-01 challenge for maker.gifts nginx-ssl-proxy_1 | Using the webroot path /usr/share/nginx/html for all unmatched domains. nginx-ssl-proxy_1 | Waiting for verification... nginx-ssl-proxy_1 | Cleaning up challenges nginx-ssl-proxy_1 | Generating key (2048 bits): /etc/letsencrypt/keys/0003_key-certbot.pem nginx-ssl-proxy_1 | Creating CSR: /etc/letsencrypt/csr/0003_csr-certbot.pem nginx-ssl-proxy_1 | An unexpected error occurred: nginx-ssl-proxy_1 | There were too many requests of a given type :: Error creating new cert :: too many certificates already issued for exact set of domains: DOMAIN.TLD: see https://letsencrypt.org/docs/rate-limits/ nginx-ssl-proxy_1 | Please see the logfiles in /var/log/letsencrypt for more details.

what am I missing?

bolencki13 commented 5 years ago

+1 Experiencing the same issue

GMory commented 5 years ago

Set a volume to store your certs so they persist:

proxy-ssl:
    image: danieldent/nginx-ssl-proxy
    restart: always
    environment:
        ...
    ports:
        - 80:80
        - 443:443
    volumes:
      - proxy-ssl:/etc/letsencrypt

volumes:
  proxy-ssl:

If you want the cert to live locally in a folder you can also bind mount a local directory instead of a volume. The important thing is to preserve the certs and have them injected in the container so it sees they exist before attempting to provision new ones.