{"id":27985051,"url":"https://github.com/kea/certbot-nginx-unit","last_synced_at":"2025-05-08T06:38:20.660Z","repository":{"id":218579584,"uuid":"746367229","full_name":"kea/certbot-nginx-unit","owner":"kea","description":"Certbot plugin for installing certificates to Nginx Unit","archived":false,"fork":false,"pushed_at":"2024-12-21T17:23:29.000Z","size":42,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-08T06:38:12.376Z","etag":null,"topics":["certbot","nginx-unit","plugin","unit"],"latest_commit_sha":null,"homepage":"","language":"Python","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/kea.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":"2024-01-21T20:51:42.000Z","updated_at":"2025-01-04T02:42:33.000Z","dependencies_parsed_at":"2024-04-13T17:00:32.454Z","dependency_job_id":"6e8f263c-f13f-475a-badc-fc091b472c30","html_url":"https://github.com/kea/certbot-nginx-unit","commit_stats":null,"previous_names":["kea/certbot-nginx-unit"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kea%2Fcertbot-nginx-unit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kea%2Fcertbot-nginx-unit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kea%2Fcertbot-nginx-unit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kea%2Fcertbot-nginx-unit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kea","download_url":"https://codeload.github.com/kea/certbot-nginx-unit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253017011,"owners_count":21840881,"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":["certbot","nginx-unit","plugin","unit"],"created_at":"2025-05-08T06:38:20.090Z","updated_at":"2025-05-08T06:38:20.649Z","avatar_url":"https://github.com/kea.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Certbot NGINX Unit plugin #\n\nThis is a certbot plugin for using certbot in combination with NGINX Unit https://unit.nginx.org/\n\n## Requirement ##\n\nThe command `unitc` should be installed and executable. \n\n## Current Features ##\n\n* Supports NGINX Unit/1.31*\n* Supports cerbot 2.12+ / 3+\n* install certificates\n* automatic renewal certificates\n\n## Installation ##\n\n* Via Snap (requires certbot to be installed via snap):\n\n    install [snapd](https://snapcraft.io/docs/installing-snapd)\n    \n    install certbot\n    ```\n    snap install --classic certbot\n    ```\n    install and configure this plugin\n    ```\n    sudo snap install certbot-nginx-unit \n    sudo snap set certbot trust-plugin-with-root=ok\n    sudo snap connect certbot:plugin certbot-nginx-unit\n    ```\n\n* Via Pip\n    ```\n    pip install certbot certbot-nginx-unit\n    ```\n\n* Via Pip virtual env\n\n    Create a virtual environment, to avoid conflicts\n    ```\n    python3 -m venv /some/path\n    ```\n\n    use the pip in the virtual environment to install or update\n\n    ```\n    /some/path/bin/pip install -U certbot certbot-nginx-unit\n    ```\n\n    use the cerbot from the virtualenv, to avoid accidentally\n    using one from a different environment that does not have this library\n    ```\n    /some/path/bin/certbot\n    ```\n\n    or uninstall other certbot system installation and link it to /usr/bin\n    ```\n    ln -s /some/path/bin/certbot /usr/bin\n    ```\n\n## Usage ##\n\nConfigure the unit listener with `*:80` or `*:443`\n\n```\n# unitc /config\n```\n```\n{\n    \"listeners\": {\n        \"*:80\": {\n            \"pass\": \"routes\"\n        }\n        \"routes\": [\n            {\n                \"action\": {\n                    \"share\": \"/srv/www/unit/index.html\"\n                }\n            }\n        ]\n    }\n}\n```\n\nNow, generate and automatically install the certificate with\n\n```\n# certbot --configurator nginx-unit -d www.myapp.com\n```\n\nThe result is a certificate created and installed. \n\n```\n# unitc /certificates\n```\n\n```\n{\n\t\"www.myapp.com_20240202145800\": {\n\t\t\"key\": \"RSA (2048 bits)\",\n\t\t\"chain\": [\n\t\t\t{\n\t\t\t\t\u003comissis\u003e\n\t\t\t}\n\t\t]\n\t}\n}\n```\nand the configuration updated\n\n```\n# unitc /config\n```\n\n```\n{\n\t\"listeners\": {\n\t\t\"*:80\": {\n\t\t\t\"pass\": \"routes\"\n\t\t},\n\n\t\t\"*:443\": {\n\t\t\t\"pass\": \"routes\",\n\t\t\t\"tls\": {\n\t\t\t\t\"certificate\": [\n\t\t\t\t\t\"www.myapp.com_20240202145800\"\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t},\n\n\t\"routes\": [\n\t\t{\n\t\t\t\"match\": {\n\t\t\t\t\"uri\": \"/.well-known/acme-challenge/*\"\n\t\t\t},\n\n\t\t\t\"action\": {\n\t\t\t\t\"share\": \"/srv/www/unit/$uri\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"action\": {\n\t\t\t\t\"share\": \"/srv/www/unit/index.html\"\n\t\t\t}\n\t\t}\n\t]\n}\n```\n\n## Auto-renew certificates ##\n\nCertbot installs a timer on the system to renew certificates one month before the certificate expiration date.\n\n## Multiple domains/applications ## \n\nYou can run the certbot command for each domain\n\n```\n# certbot --configurator nginx-unit -d www.myapp1.com\n# certbot --configurator nginx-unit -d www.myapp2.com\n# unitc '/config/listeners/*:443' \n```\n\n```\n{\n    \"pass\": \"routes\",\n    \"tls\": {\n        \"certificate\": [\n            \"www.myapp1.com_20240202145800\"\n            \"www.myapp2.com_20240202145800\"\n        ]\n    }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkea%2Fcertbot-nginx-unit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkea%2Fcertbot-nginx-unit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkea%2Fcertbot-nginx-unit/lists"}