Odoo 12.0 Development: Odoo 12.0 CE Installation on Ubuntu Server 18.04 LTS with Nginx

Опубликовано: 08 Июнь 2026
на канале: Mohamed Magdy
4,494
47

Support me on #Patreon:   / mo7amed_ma9dy  
Odoo 12.0 CE Installation on Ubuntu Server 18.04 LTS with Nginx

Create a server on Digital Ocean
https://m.do.co/c/6a942903dcec

Install dependencies
sudo apt-get install git python3-pip python3-dev libjpeg-dev libxml2-dev libssl-dev libsasl2-dev node-less libldap2-dev libxslt-dev postgresql nginx

wget https://builds.wkhtmltopdf.org/0.12.1...
sudo apt install ./wkhtmltox_0.12.1.3-1~bionic_amd64.deb

Add odoo as a system user:
sudo adduser --system --group odoo --home /opt/odoo

Add odoo as a DB user
sudo su - postgres
createuser -s odoo
alter role odoo with password 'secret';

Clone Odoo 12.0 CE
sudo su - odoo -s /bin/bash
git clone https://www.github.com/odoo/odoo --depth=1 --branch=12.0 --single-branch

Odoo Conf File
[options]
; This is the password that allows database operations:
admin_passwd = secret
db_host = False
db_port = False
db_user = odoo12
db_password = False
addons_path = /opt/odoo12/odoo/addons
proxy_mode = True
xmlrpc_interface = 127.0.0.1
netrpc_interface = 127.0.0.1


Nginx Config File
server {
server_name 206.189.25.239 206.189.25.239; // replace with your IP or Domain
listen 80;
access_log /var/log/nginx/testing-access.log;
error_log /var/log/nginx/testing-error.log;
location /longpolling {
proxy_connect_timeout 3600;
proxy_read_timeout 3600;
proxy_send_timeout 3600;
send_timeout 3600;
proxy_pass http://127.0.0.1:8072;
}
location / {
proxy_connect_timeout 3600;
proxy_read_timeout 3600;
proxy_send_timeout 3600;
send_timeout 3600;
proxy_pass http://127.0.0.1:8069/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
gzip on;
gzip_min_length 1000;
}
upstream odoo {
server 127.0.0.1:8069 weight=1 fail_timeout=0;
}
upstream odoo-im {
server 127.0.0.1:8072 weight=1 fail_timeout=0;
}