“Odoo is business management software including CRM, e-commerce, billing, accounting, manufacturing, warehouse, project management, and inventory management. The Community version is the LGPLv3 open source version, supplemented by the Enterprise version’s proprietary features and services. The source code for the framework and core ERP modules is curated by the Belgium-based Odoo S.A."

goals:

  • setup odoo on debian
  • create postgres database
  • tls over port 443 with nginy reverse proxy

guide:

install requirements

## install requirements
> apt install \
      postgresql \
      gnupg \
      wkhtmltopdf \
      nginx \
      -y

configure postgresql

## edit /etc/postgresql/11/main/postgresql.conf 
password_encryption = scram-sha-256

## enable & start postgres service
> systemctl enable postgres \
  && systemctl restart postgres

## substitute to postgres    
> su postgres

## create user and db as postgres
> createuser \
      --createdb \
      --username postgres \
      --no-createrole \
      --no-superuser \
      --pwprompt \
      odoo

fetch odoo

## add odoo repo
> wget https://nightly.odoo.com/odoo.key
> cat odoo.key | apt-key add
> echo "deb http://nightly.odoo.com/14.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list

## refresh and install
> apt update
> apt install odoo -y

Webinterface <host>:8069

create certificates

## generate self signed certificates
> openssl req -x509 -nodes -subj "/C=XX/ST=XX/L=XX/O=XX/OU=XX/CN=XX" -newkey rsa:4096 -keyout /etc/ssl/nginx.key -out /etc/ssl/nginx.crt -days 365

configure nginx

## configure /etc/nginx/sites-available/default
server {
        listen 80 default_server;
        listen [::]:80 default_server;

        listen 443 ssl;

        server_name odoo;
        ssl_certificate /etc/ssl/nginx.crt;
        ssl_certificate_key /etc/ssl/nginx.key;

        location / {
            proxy_pass http://localhost:8069;
        }
}
## enable & start nginx service
> systemctl enable nginx \
  && systemctl restart nginx

for now odoo is available under https://<host>