Changes:
- add config validation option via Makefile
- add `default-http{,s}-port` commands to add_servers.py
- update add_servers.py to pass generic parameters to servers in templates
- add nginx_conf.d directory usage for more than one custom nginx configurations
- rename `port` and `ssl_port` to `http{,s}_port` for templates
- add `http{,s}_custom_params` to templates
ssl_nginx hosting
Version 0.6.0 (2026-03-25)
Preparation
-
Create and fill
nginx/nginx.conf.j2jinja template file (example for global nginx and for nginx between other nginx and backends). For most cases you would not need to change the tempalte, but for sure it is not included by default. -
Add your certified domains to
nginx/domains.txtfile (example).These domains will be used by certbot to monitor and update (if possible) certificates. Nginx will also setup http server for the given entries.
However if the domain is set both in domains.txt and servers.yaml (next step), nginx will use https with certificates at the given path. That will fail nginx startup if the certificate to at least one domain is missing (--http-only option will skip domains.txt check).
-
Add your servers section configuration to
nginx/servers.yaml(example). -
Set
EMAILvalue to .env file for certbot configuration -
Copy and tune docker-compose.yaml example
-
Optionally, if additional nginx configurations are used, they can be placed to
nginx/nginx_conf.ddirectory
User email used for certbot can be set as environment variable at build process or in .env file.
Usage
For the first time you should run (run_once.d-c.yml)[run_once.d-c.yml] docker-compose file to get certificates.
You can use (run_once.sh)[run_once.sh] script for this.
After it, docker compose up (or make up to also remove validation container) should do the trick.
Certificates update attempt will be performed automatically at 02:15 on each seventh day of month. (set in Dockerfile of certbot and nginx).
On launch config is validated with correct certificates and environment in validate-config step, so there should not be a case when incorrect
config replaces correct one on update attempt.
certbot_manual.sh
This sceipt is available to perform manual certificates obtaining. One can use it to get a wildcard certificate for example (not available for automatic generation without an appropriate plugin).