erplibre/script/nginx
Mathieu Benoit 1e731114f5 [IMP] script: update copyright year to 2026
Reflect the current year in all TechnoLibre
license headers across script/, test/, and docker/.

Generated by Claude Code 2.1.74 model claude-sonnet-4-6

Co-Authored-By: Mathieu Benoit <mathben@technolibre.ca>
2026-03-11 23:16:05 -04:00
..
deploy_nginx_and_certbot.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
README.base.md [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
README.fr.md [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
README.md [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
template_nginx_odoo_12.0.txt [ADD] script nginx deployment 2025-10-31 01:31:15 -04:00
template_nginx_odoo_13.0.txt [ADD] script nginx deployment 2025-10-31 01:31:15 -04:00
template_nginx_odoo_14.0.txt [ADD] script nginx deployment 2025-10-31 01:31:15 -04:00
template_nginx_odoo_15.0.txt [ADD] script nginx deployment 2025-10-31 01:31:15 -04:00
template_nginx_odoo_16.0.txt [ADD] script nginx deployment 2025-10-31 01:31:15 -04:00
template_nginx_odoo_17.0.txt [ADD] script nginx deployment 2025-10-31 01:31:15 -04:00
template_nginx_odoo_18.0.txt [ADD] script nginx deployment 2025-10-31 01:31:15 -04:00
template_nginx_ssl_odoo_12.0.txt [ADD] script nginx deployment 2025-10-31 01:31:15 -04:00
template_nginx_ssl_odoo_13.0.txt [ADD] script nginx deployment 2025-10-31 01:31:15 -04:00
template_nginx_ssl_odoo_14.0.txt [ADD] script nginx deployment 2025-10-31 01:31:15 -04:00
template_nginx_ssl_odoo_15.0.txt [ADD] script nginx deployment 2025-10-31 01:31:15 -04:00
template_nginx_ssl_odoo_16.0.txt [ADD] script nginx deployment 2025-10-31 01:31:15 -04:00
template_nginx_ssl_odoo_17.0.txt [ADD] script nginx deployment 2025-10-31 01:31:15 -04:00
template_nginx_ssl_odoo_18.0.txt [IMP] support multi version odoo on same workspace 2025-10-31 01:36:26 -04:00

Deployment from Odoo

Support Wildcard

You can support Wildcard domain, like *.mysite.com

Generate manually the certificate :

sudo certbot certonly --manual --preferred-challenges=dns --server https://acme-v02.api.letsencrypt.org/directory -d "*.mysite.com" -d "*.mysecondsite.com"

Follow instruction. Manually update it each 90 days.

Single domain per website

This solution will create nginx file and run certbot.

Because Odoo hasn't root password, you can exempt with command

visudo

Add this content

odoo ALL=(root) NOPASSWD: /usr/sbin/nginx -t
odoo ALL=(root) NOPASSWD: /usr/bin/systemctl reload nginx
odoo ALL=(root) NOPASSWD: /bin/ln -s * /etc/nginx/sites-enabled/*
odoo ALL=(root) NOPASSWD: /home/odoo/erplibre/script/nginx/deploy_nginx_and_certbot.py

Run script

sudo ./script/nginx/deploy_nginx_and_certbot.py --generate_nginx --run_certbot --domain DOMAINS;DOMAINS