Certbot NGINX Unit plugin
This is a certbot plugin for using certbot in combination with NGINX Unit https://unit.nginx.org/
Requirement
The command unitc should be installed and executable.
Current Features
- Supports NGINX Unit/1.31*
- Supports certbot 3+ (Python 3.10+)
- install certificates
- automatic renewal certificates
Installation
-
Via Snap (requires certbot to be installed via snap):
install snapd
install certbot
snap install --classic certbotinstall and configure this plugin
sudo snap install certbot-nginx-unit sudo snap set certbot trust-plugin-with-root=ok sudo snap connect certbot:plugin certbot-nginx-unit -
Via Pip
pip install certbot certbot-nginx-unit -
Via Pip virtual env
Create a virtual environment, to avoid conflicts
python3 -m venv /some/pathuse the pip in the virtual environment to install or update
/some/path/bin/pip install -U certbot certbot-nginx-unituse the cerbot from the virtualenv, to avoid accidentally using one from a different environment that does not have this library
/some/path/bin/certbotor uninstall other certbot system installation and link it to /usr/bin
ln -s /some/path/bin/certbot /usr/bin
Usage
Configure the unit listener with *:80 or *:443
# unitc /config
{
"listeners": {
"*:80": {
"pass": "routes"
}
"routes": [
{
"action": {
"share": "/srv/www/unit/index.html"
}
}
]
}
}
Now, generate and automatically install the certificate with
# certbot --configurator nginx-unit -d www.myapp.com
The result is a certificate created and installed.
# unitc /certificates
{
"www.myapp.com_20240202145800": {
"key": "RSA (2048 bits)",
"chain": [
{
<omissis>
}
]
}
}
and the configuration updated
# unitc /config
{
"listeners": {
"*:80": {
"pass": "routes"
},
"*:443": {
"pass": "routes",
"tls": {
"certificate": [
"www.myapp.com_20240202145800"
]
}
}
},
"routes": [
{
"match": {
"uri": "/.well-known/acme-challenge/*"
},
"action": {
"share": "/srv/www/unit/$uri"
}
},
{
"action": {
"share": "/srv/www/unit/index.html"
}
}
]
}
Auto-renew certificates
Certbot installs a timer on the system to renew certificates one month before the certificate expiration date.
Multiple domains/applications
You can run the certbot command for each domain
# certbot --configurator nginx-unit -d www.myapp1.com
# certbot --configurator nginx-unit -d www.myapp2.com
# unitc '/config/listeners/*:443'
{
"pass": "routes",
"tls": {
"certificate": [
"www.myapp1.com_20240202145800"
"www.myapp2.com_20240202145800"
]
}
}
Metadata
Release files for certbot-nginx-unit 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| certbot_nginx_unit-1.1.2.tar.gz | 19.3 kB | With provenance | Details for certbot_nginx_unit-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| certbot_nginx_unit-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for certbot_nginx_unit-1.1.2-py3-none-any.whl |
Total release size: 36.8 kB
Release files / certbot_nginx_unit-1.1.2.tar.gz
| Download URL | certbot_nginx_unit-1.1.2.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c2f8ceb9be9364418912a26138481e4ace4f8be586adcb05a1e9e866c904a8b
|
|
BLAKE2b-256 checksum How to use checksums |
51a21d89ea2776f0e68b5d2244e6cbd72f7117cb7c186e885f82ecc58bbc66b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.
Transparency logRelease files / certbot_nginx_unit-1.1.2-py3-none-any.whl
| Download URL | certbot_nginx_unit-1.1.2-py3-none-any.whl |
|---|---|
| Size | 17.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d8901c76d70bc3cce484b277d0e24ec45115797a146f04356b53058375cc532
|
|
BLAKE2b-256 checksum How to use checksums |
6d9690602c764ad1faeae9bb122990d33442f5f824dc6f2c70be9bcf0a2662d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.
Transparency logSecurity for certbot-nginx-unit 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for certbot_nginx_unit-1.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.