Odoo is a set of popular web based open source business applications created to solve all business needs and demands. This guide has been written to help Linux users install Odoo on Debian 11 / Debian 10 Linux. Odoo comprises of a range of business applications such CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management just to mention a few.
Install Odoo ERP on Debian 10 / Debian 11
All the Odoo packages that we’ll need are available on Debian and Odoo repository to be added. We won’t be doing any manual building of packages. Now dive into the installation of Odoo on Debian 11/10 Linux.
Step 1: Update system
Start by updating your Debian Linux.
sudo apt update
sudo apt -y upgrade
A reboot is necessary whenever an upgrade is performed.
sudo reboot
Step 2: Install PostgreSQL Database
Odoo uses PostgreSQL database as primary storage for its data. The PostgreSQL database server has to be installed manually on our Debian system.
Step 3: Install wkhtmltopdf
Odoo requires wkhtmltopdf for reports generation and printing. The version of wkhtmltopdf available in the upstream Debian repositories does not support headers and footers so it is not used as a direct dependency.
Install wkhtmltopdf & wkhtmltoimage on Ubuntu / Debian
Step 4: Install Odoo 15 on Debian 10 / Debian 11
Before installing Odoo 15 on Debian 10 / Debian 11, we need to add Odoo apt repository to our local system.
Import GPG repository key:
sudo apt update
sudo apt install gnupg2
wget https://nightly.odoo.com/odoo.key
cat odoo.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/odoo.gpg >/dev/null
Add Odoo repository to your system:
echo "deb http://nightly.odoo.com/15.0/nightly/deb/ ./" | sudo tee /etc/apt/sources.list.d/odoo.list
Once the repository is added, update your Apt cache.
sudo apt update
See command output sample below:
...
The following NEW packages will be installed:
docutils-common fontconfig fontconfig-config fonts-dejavu-core fonts-font-awesome fonts-inconsolata fonts-liberation fonts-roboto-unhinted graphviz gsfonts
javascript-common libcairo2 libcdt5 libcgraph6 libdatrie1 libfontconfig1 libfribidi0 libgd3 libgraphite2-3 libgts-0.7-5 libgts-bin libgvc6 libgvpr2
libharfbuzz0b libice6 libimagequant0 libjbig0 libjpeg62-turbo libjs-jquery libjs-underscore liblab-gamut1 liblcms2-2 libllvm7 libltdl7 libpango-1.0-0
libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils libpaper1 libpathplan4 libpixman-1-0 libpq5 libsass1 libsensors-config libsensors5 libsm6 libthai-data
libthai0 libtiff5 libusb-1.0-0 libwebp6 libwebpdemux2 libwebpmux3 libx11-6 libx11-data libxau6 libxaw7 libxcb-render0 libxcb-shm0 libxcb1 libxdmcp6 libxdot4
libxext6 libxmu6 libxpm4 libxrender1 libxt6 odoo postgresql postgresql-11 postgresql-client postgresql-client-11 postgresql-client-common postgresql-common
python-babel-localedata python3-aiohttp python3-appdirs python3-async-timeout python3-attr python3-babel python3-bs4 python3-cached-property python3-dateutil
python3-decorator python3-defusedxml python3-distutils python3-docutils python3-feedparser python3-freezegun python3-gevent python3-greenlet python3-html2text
python3-html5lib python3-isodate python3-ldap python3-lib2to3 python3-libsass python3-lxml python3-mako python3-mock python3-multidict python3-num2words
python3-ofxparse python3-olefile python3-openssl python3-passlib python3-pbr python3-pil python3-polib python3-psutil python3-psycopg2 python3-pyasn1
python3-pyasn1-modules python3-pydot python3-pygments python3-pyinotify python3-pyparsing python3-pypdf2 python3-qrcode python3-renderpm python3-reportlab
python3-reportlab-accel python3-requests-toolbelt python3-roman python3-serial python3-setuptools python3-soupsieve python3-stdnum python3-tz python3-usb
python3-vobject python3-webencodings python3-werkzeug python3-xlrd python3-xlsxwriter python3-xlwt python3-yarl python3-zeep sgml-base ssl-cert sysstat
x11-common xml-core xz-utils
0 upgraded, 144 newly installed, 0 to remove and 11 not upgraded.
Need to get 234 MB of archives.
After this operation, 1,002 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Then install Odoo 15 on Debian 11 / Debian 10.
sudo apt install odoo
Accept all installation prompts presented to you:
...
The following NEW packages will be installed:
docutils-common fontconfig fontconfig-config fonts-dejavu-core fonts-font-awesome fonts-inconsolata fonts-liberation fonts-roboto-unhinted graphviz gsfonts
javascript-common libcairo2 libcdt5 libcgraph6 libdatrie1 libfontconfig1 libfribidi0 libgd3 libgraphite2-3 libgts-0.7-5 libgts-bin libgvc6 libgvpr2
libharfbuzz0b libice6 libimagequant0 libjbig0 libjpeg62-turbo libjs-jquery libjs-underscore liblab-gamut1 liblcms2-2 libllvm7 libltdl7 libpango-1.0-0
libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils libpaper1 libpathplan4 libpixman-1-0 libpq5 libsass1 libsensors-config libsensors5 libsm6 libthai-data
libthai0 libtiff5 libusb-1.0-0 libwebp6 libwebpdemux2 libwebpmux3 libx11-6 libx11-data libxau6 libxaw7 libxcb-render0 libxcb-shm0 libxcb1 libxdmcp6 libxdot4
libxext6 libxmu6 libxpm4 libxrender1 libxt6 odoo postgresql postgresql-11 postgresql-client postgresql-client-11 postgresql-client-common postgresql-common
python-babel-localedata python3-aiohttp python3-appdirs python3-async-timeout python3-attr python3-babel python3-bs4 python3-cached-property python3-dateutil
python3-decorator python3-defusedxml python3-distutils python3-docutils python3-feedparser python3-freezegun python3-gevent python3-greenlet python3-html2text
python3-html5lib python3-isodate python3-ldap python3-lib2to3 python3-libsass python3-lxml python3-mako python3-mock python3-multidict python3-num2words
python3-ofxparse python3-olefile python3-openssl python3-passlib python3-pbr python3-pil python3-polib python3-psutil python3-psycopg2 python3-pyasn1
python3-pyasn1-modules python3-pydot python3-pygments python3-pyinotify python3-pyparsing python3-pypdf2 python3-qrcode python3-renderpm python3-reportlab
python3-reportlab-accel python3-requests-toolbelt python3-roman python3-serial python3-setuptools python3-soupsieve python3-stdnum python3-tz python3-usb
python3-vobject python3-webencodings python3-werkzeug python3-xlrd python3-xlsxwriter python3-xlwt python3-yarl python3-zeep sgml-base ssl-cert sysstat
x11-common xml-core xz-utils
0 upgraded, 144 newly installed, 0 to remove and 11 not upgraded.
Need to get 234 MB of archives.
After this operation, 1,002 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
After the installation of Odoo 15 on Debian 11 / 10, the service is started automatically.
$ systemctl status odoo
● odoo.service - Odoo Open Source ERP and CRM
Loaded: loaded (/lib/systemd/system/odoo.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2019-10-19 20:57:11 UTC; 20s ago
Main PID: 8793 (odoo)
Tasks: 4 (limit: 4719)
Memory: 61.5M
CGroup: /system.slice/odoo.service
└─8793 /usr/bin/python3 /usr/bin/odoo --config /etc/odoo/odoo.conf --logfile /var/log/odoo/odoo-server.log
Oct 19 20:57:11 deb10 systemd[1]: Started Odoo Open Source ERP and CRM.
Set the service to start on every system reboot.
sudo systemctl enable --now odoo
The Odoo service should bind to TCP port 8069 once started.
$ ss -tunelp | grep 8069
tcp LISTEN 0 128 0.0.0.0:8069 0.0.0.0:* uid:113 ino:1906251 sk:d <->
You can access the web console finish Odoo configuration.
http://[ServerIP_Hostname]:8069
Step 5: Configure Nginx Proxy (Without SSL) – Not recommended
Install Nginx onto your system:
sudo apt -y install nginx vim
Create a new configuration file for odoo.
sudo vim /etc/nginx/conf.d/odoo.conf
Modify this configuration snippet to fit your setup.
# Odoo Upstreams
upstream odooserver {
server 127.0.0.1:8069;
}
server {
listen 80;
server_name erp.geeksforgeeks.org;
access_log /var/log/nginx/odoo_access.log;
error_log /var/log/nginx/odoo_error.log;
# Proxy settings
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
# Request for root domain
location / {
proxy_redirect off;
proxy_pass http://odooserver;
}
# Cache static files
location ~* /web/static/ {
proxy_cache_valid 200 90m;
proxy_buffering on;
expires 864000;
proxy_pass http://odooserver;
}
# Gzip
gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;
gzip on;
}
My service domain in this example is erp.geeksforgeeks.org, replace it with your correct domain to be used with Odoo. A valid DNS record is required for external access as well.
Check your configuration syntax:
$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
If the settings are deemed ok, restart nginx service.
sudo systemctl restart nginx
Step 6: Configure Nginx Proxy (With SSL Certificate) – Recommended
It is always recommended to use SSL encryption for production
deployments. Let’s Encrypt is a free SSL offering that you can use in
your Setup.
Get Let’s Encrypt SSL certificates for your domain.
#Debian 11
sudo apt-get update
sudo apt-get install certbot python3-certbot-nginx
#Debian 10
sudo apt-get update
sudo apt-get install certbot python-certbot-nginx
### Generate SSL
sudo systemctl stop nginx
export DOMAIN="erp.geeksforgeeks.org"
export EMAIL="[email protected]"
sudo /usr/bin/certbot certonly --standalone -d ${DOMAIN} --preferred-challenges http --agree-tos -n -m ${EMAIL} --keep-until-expiring
If the execution went through, paths to the certificate and chain files will be printed out.
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/erp.geeksforgeeks.org/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/erp.geeksforgeeks.org/privkey.pem
Your cert will expire on 2020-01-17. To obtain a new or tweaked
version of this certificate in the future, simply run certbot-auto
again. To non-interactively renew *all* of your certificates, run
"certbot-auto renew"
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
Create cron to renew certificate.
$ sudo crontab -e
15 3 * * * /usr/bin/certbot renew --pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx"
Create Nginx configuration file.
sudo vim /etc/nginx/conf.d/odoo.conf
Paste below into the file and modify it to suit your environment.
# Odoo Upstreams
upstream odooserver {
server 127.0.0.1:8069;
}
# http to https redirection
server {
listen 80;
server_name erp.geeksforgeeks.org;
return 301 https://erp.geeksforgeeks.org$request_uri;
}
server {
listen 443 ssl;
server_name erp.geeksforgeeks.org;
access_log /var/log/nginx/odoo_access.log;
error_log /var/log/nginx/odoo_error.log;
# SSL
ssl_certificate /etc/letsencrypt/live/erp.geeksforgeeks.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/erp.geeksforgeeks.org/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/erp.geeksforgeeks.org/chain.pem;
# Proxy settings
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
# Request for root domain
location / {
proxy_redirect off;
proxy_pass http://odooserver;
}
# Cache static files
location ~* /web/static/ {
proxy_cache_valid 200 90m;
proxy_buffering on;
expires 864000;
proxy_pass http://odooserver;
}
# Gzip Compression
gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;
gzip on;
}
Validate your Nginx configurations.
$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Restart Nginx.
sudo systemctl restart nginx
Step 7: Access Odoo on Debian 10 / Debian 11 Linux
Access Odoo Web page on your domain name from a web – https://DNShostname
Set database name, admin user email address and password for the admin user.
Input required details to create Database. After you click “Create Database”, you’ll be redirected to Administration page from where you can install Odoo business applications.
Have a happy time working with Odoo 15 on Debian 11 / Debian 10 Linux. Fore more information, visit Odoo documentation page.
Similar guides:
How To Install Odoo 15 on Ubuntu
Install Dolibarr ERP & CRM on Ubuntu
How to Install ERPNext ERP System on Ubuntu