{"id":23008944,"url":"https://github.com/getty/docker-letsencrypt-webroot-multi","last_synced_at":"2025-04-02T16:12:22.585Z","repository":{"id":136539087,"uuid":"132379771","full_name":"Getty/docker-letsencrypt-webroot-multi","owner":"Getty","description":"Docker Image which updates letsencrypt through webroot.","archived":false,"fork":false,"pushed_at":"2018-05-11T20:28:51.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T06:42:58.594Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Getty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-06T22:08:23.000Z","updated_at":"2021-08-22T09:01:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"1cd4d69d-581f-4e9c-8f68-08c2aed04436","html_url":"https://github.com/Getty/docker-letsencrypt-webroot-multi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Getty%2Fdocker-letsencrypt-webroot-multi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Getty%2Fdocker-letsencrypt-webroot-multi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Getty%2Fdocker-letsencrypt-webroot-multi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Getty%2Fdocker-letsencrypt-webroot-multi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Getty","download_url":"https://codeload.github.com/Getty/docker-letsencrypt-webroot-multi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246847140,"owners_count":20843444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T09:11:59.667Z","updated_at":"2025-04-02T16:12:22.553Z","avatar_url":"https://github.com/Getty.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Let’s Encrypt (webroot) in a Docker for multiply hosts\n\n![Letsencrypt Logo](https://letsencrypt.org/images/letsencrypt-logo-horizontal.svg)\n\nLetsencrypt cert auto getting and renewal script based on original [certbot/certbot](https://hub.docker.com/r/certbot/certbot/) base image. Inspired by [kvaps/docker-letsencrypt-webroot](https://github.com/kvaps/docker-letsencrypt-webroot) and its [forks](https://github.com/kvaps/docker-letsencrypt-webroot/network).\n\n  - [GitHub](https://github.com/Getty/docker-letsencrypt-webroot)\n  - [DockerHub](https://hub.docker.com/r/raudssus/letsencrypt-webroot-multi/)\n\n\n## Usage\n\n* First, you need to set up your web server so that it gave the contents of the `/.well-known/acme-challenge` directory properly. \n  Example, for nginx add location for your server:\n```nginx\n  location /.well-known/acme-challenge {\n    default_type \"text/plain\";\n    root         /tmp/letsencrypt;\n  }\n```\n\n\n* Then run your web server image with letsencrypt-webroot-multi connected volumes:\n```bash\n  -v /var/www/letsencrypt:/tmp/letsencrypt\n```\n\n\n* Write a `/etc/letsencrypt/certs.txt` file for configuration:\n```text\n  email@example.com example.com www.example.com\n  email@universe.org universe.org\n```\n\n\n* Run letsencrypt-webroot-multi image:\n```bash\n  docker run \\\n    --restart always \\\n    --name letsencrypt \\\n    -v /data/letsencrypt:/etc/letsencrypt \\\n    -v /data/letsencrypt-www:/tmp/letsencrypt \\\n    raudssus/letsencrypt-webroot-multi\n```\n\n\n* Configure your app to use certificates in the following path:\n\n  * **Private key**: `/etc/letsencrypt/live/example.com/privkey.pem`\n  * **Certificate**: `/etc/letsencrypt/live/example.com/cert.pem`\n  * **Intermediates**: `/etc/letsencrypt/live/example.com/chain.pem`\n  * **Certificate + intermediates**: `/etc/letsencrypt/live/example.com/fullchain.pem`\n\n  * **Private key**: `/etc/letsencrypt/live/universe.org/privkey.pem`\n  * **Certificate**: `/etc/letsencrypt/live/universe.org/cert.pem`\n  * **Intermediates**: `/etc/letsencrypt/live/universe.org/chain.pem`\n  * **Certificate + intermediates**: `/etc/letsencrypt/live/universe.org/fullchain.pem`\n\n**NOTE**: You should connect `/etc/letsencrypt` directory fully, because if you connect just `/etc/letsencrypt/live`, then symlinks to your certificates inside it will not work!\n\n\n## Docker-compose\n\nThis is example of letsencrypt-webroot-multi `docker-compose.yml` with nginx configuration:\n\n```yaml\nnginx:\n  restart: always\n  image: nginx\n  hostname: example.com\n  volumes:\n    - /etc/localtime:/etc/localtime:ro\n    - ./nginx:/etc/nginx:ro\n    - ./letsencrypt/conf:/etc/letsencrypt\n    - ./letsencrypt/html:/tmp/letsencrypt\n  ports:\n    - 80:80\n    - 443:443\n\nletsencrypt:\n  image: raudssus/letsencrypt-webroot-multi\n  volumes:\n    - /etc/localtime:/etc/localtime:ro\n    - /var/run/docker.sock:/var/run/docker.sock\n    - ./letsencrypt/conf:/etc/letsencrypt\n    - ./letsencrypt/html:/tmp/letsencrypt\n```\n\n\n## Environment variables\n\n* **EXP_LIMIT**: The number of days before expiration of the certificate before request another one. Defaults to 30.\n* **CHOWN**: Owner for certs. Defaults to `root:root`.\n* **CHMOD**: Permissions for certs. Defaults to `644`.\n* **CHMOD_DIRECTORY**: Permissions for cert directories. Defaults to `755`.\n* **CERTBOT_ADDITIONAL**: Additional parameter for the `certonly` call to `certbot`\n* **WAITING_TIME**: Waiting this many hours between checks of `certs.txt` and renewal check of certs. Defaults to 6.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetty%2Fdocker-letsencrypt-webroot-multi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetty%2Fdocker-letsencrypt-webroot-multi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetty%2Fdocker-letsencrypt-webroot-multi/lists"}