Package: odoo9-addon-letsencrypt
Request SSL certificates from letsencrypt.orgThis module was written to have your Odoo installation request SSL certificates
fromhttps://letsencrypt.orgautomatically.InstallationAfter installation, this module generates a private key for your account at
letsencrypt.org automatically in$data_dir/letsencrypt/account.key. If you
want or need to use your own account key, replace the file.For certificate requests to work, your site needs to be accessible via plain
HTTP, see below for configuration examples in case you force your clients to
the SSL version.After installation, trigger the cronjobUpdate letsencrypt certificatesand
watch your log for messages.This addon depends on theopensslbinary and theacme_tinyandIPypython modules.For installing the OpenSSL binary you can use your distro package manager.
For Debian and Ubuntu, that would be:sudo apt-get install opensslFor installing the ACME-Tiny python module, use the PIP package manager:sudo pip install acme-tinyFor installing the IPy python module, use the PIP package manager:sudo pip install IPyConfigurationThis addons requests a certificate for the domain named in the configuration
parameterweb.base.url- if this comes back aslocalhostor the like,
the module doesn’t request anything.If you want your certificate to contain multiple alternative names, just add
them as configuration parametersletsencrypt.altname.NwithNstarting
from0. The amount of domains that can be added are subject torate
limiting.Note that all those domains must be publicly reachable on port 80 via HTTP, and
they must have an entry for.well-known/acme-challengepointing to your odoo
instance.UsageThe module sets up a cronjob that requests and renews certificates automatically.After the first run, you’ll find a file calleddomain.crtin$datadir/letsencrypt, configure your SSL proxy to use this file as certificate.For further information, please visit:https://www.odoo.com/forum/help-1In depth configurationThis module usesopensslto generate CSRs suitable to be submitted to
letsencrypt.org. In order to do this, it copies/etc/ssl/openssl.cnfto a
temporary and adapts it according to its needs (currently, that’s just adding a[SAN]section if necessary). If you want the module to use another configuration
template, set config parameterletsencrypt.openssl.cnf.After refreshing the certificate, the module attempts to run the content ofletsencrypt.reload_command, which is by defaultsudo service nginx reload.
Change this to match your server’s configuration.You’ll also need a matching sudo configuration, like:your_odoo_user ALL = NOPASSWD: /usr/sbin/service nginx reloadFurther, if you force users to https, you’ll need something like for nginx:if ($scheme = "http") {
    set $redirect_https 1;
}
if ($request_uri ~ ^/.well-known/acme-challenge/) {
    set $redirect_https 0;
}
if ($redirect_https) {
    rewrite ^   https://$server_name$request_uri? permanent;
}and this for apache:RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} "!^/.well-known/"
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]In case you need to redirect other nginx sites to your Odoo instance, declare
an upstream for your odoo instance and do something like:location /.well-known {
    proxy_pass    http://yourodooupstream;
}If you’re using a multi-database installation (with or without dbfilter option)
where /web/databse/selector returns a list of more than one database, then
you need to addletsencryptaddon to wide load addons list
(by default, onlywebaddon), setting--loadoption.
For example,--load=web,letsencryptBug TrackerBugs are tracked onGitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedbackhere.CreditsContributorsHolger Brunn <hbrunn@therp.nl>Antonio Espinosa <antonio.espinosa@tecnativa.com>Dave Lasley <dave@laslabs.com>Ronald Portier <ronald@therp.nl>ACME implementationhttps://github.com/diafygi/acme-tiny/blob/master/acme_tiny.pyIconhttps://helloworld.letsencrypt.orgMaintainerThis module is maintained by the OCA.OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.To contribute to this module, please visithttps://odoo-community.org.