https://github.com/ichikawayukko/docker-nginx_letsencrypt
Docker Nginx with Let's Encrypt client (certbot) and crond for auto renew. Let's Encrypt 証明書自動更新機能付きNginx Dockerコンテナ
https://github.com/ichikawayukko/docker-nginx_letsencrypt
certbot crontab docker-image dockerfile letsencrypt nginx nginx-docker
Last synced: 5 months ago
JSON representation
Docker Nginx with Let's Encrypt client (certbot) and crond for auto renew. Let's Encrypt 証明書自動更新機能付きNginx Dockerコンテナ
- Host: GitHub
- URL: https://github.com/ichikawayukko/docker-nginx_letsencrypt
- Owner: IchikawaYukko
- License: mit
- Created: 2020-04-13T11:43:42.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-05-30T23:21:31.000Z (8 months ago)
- Last Synced: 2025-05-31T10:07:02.046Z (8 months ago)
- Topics: certbot, crontab, docker-image, dockerfile, letsencrypt, nginx, nginx-docker
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/ichikawayukko/nginx_letsencrypt
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-nginx_letsencrypt
*Nginx* with *Let's Encrypt* client (certbot) and crond for **auto renewing**.
[**ChaCha20-Poly1305**](https://datatracker.ietf.org/doc/html/rfc7539) is the most preferred cipher suite in this container. (You can override this by `ssl_ciphers` directive on `nginx.conf`)
# Usage
## Launch server
Set HEALTHCHECK_URL (You will host that in this container) in docker-compose.yml
And just run
`docker-compose up -d`
## Get new certificate (or add domains)
Run
`docker-compose exec nginx sh`
Then you will get into container's prompt.
And run
`certbot certonly --webroot -w /var/www/html -d YOUR_DOMAIN`
to get certificate.
## Renew certificate (Auto!!)
Renew job will be automatically run by crond on every Monday 0:00.
So you don't need to run manually.
Renew job will reload nginx to apply new certificates.
If it fails renewing, you can run `certbot renew` to investigate.
Or run `certbot renew --dry-run` to test renewing.