Close Menu
Rob FaulsRob Fauls
    What's Hot

    Odoo 17- Change default email address

    March 10, 2024

    Odoo 17- Automated Install on Debian 12

    December 26, 2023

    Odoo 17- Manual Install on Debian 10/Debian 11/Debian 12

    November 8, 2023
    Facebook X (Twitter) LinkedIn
    • Home
    • VMware
      • Storage
    • Odoo
    • Linux
    • About
      • About Me
      • Privacy Policy
    Rob FaulsRob Fauls
    Home » Odoo 17- Manual Install on Debian 10/Debian 11/Debian 12
    Odoo

    Odoo 17- Manual Install on Debian 10/Debian 11/Debian 12

    Rob FaulsBy Rob FaulsNovember 8, 2023Updated:April 8, 20243 Comments
    Facebook Twitter LinkedIn Email Reddit Telegram
    Share
    Facebook Twitter LinkedIn Pinterest Email

    This guide will help you install Odoo17 Community Edition on your Debian 10/11/12 server. All commands assume you are running from a user account (not root), with sudo permissions.

    I’ve provided the instructions for installation below. If you’d rather use a script that I’ve created to automate the installation, I’ve created separate guides to cover the automated install process:

    Odoo 17- Automated Install on Debian 12

    1: Update your system

    Before installing, ensure your system is up to date. This will avoid any packages being out of sync/incompatible. As always, it is preferred to have a fresh system with no other software installed. Reboot after updating to ensure everything is running current code.

    				
    					$ sudo apt update
    $ sudo apt upgrade -y
    $ sudo reboot
    				
    			

    2: Install wkhtmltopdf

    In order to generate PDFs or print reports, you will need to install wkhtmltopdf. I’ve covered the installation on Debian here:
    Debian 11: Install wkhtmltopdf on Debian
    Debian 12: Install wkhtmltopdf on Debian12

    3: Install Odoo 17

    Import Odoo’s 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’s repository:

    				
    					$ echo "deb http://nightly.odoo.com/17.0/nightly/deb/ ./" | sudo tee /etc/apt/sources.list.d/odoo.list
    				
    			

    Update apt cache:

    				
    					$ sudo apt update
    				
    			

    Install Odoo 16:

    				
    					$ sudo apt install odoo
    				
    			

    4: Set Odoo to start on boot

    When installation completes, the Odoo service will be started for you. It will not start automatically after you reboot. To set it to automatically start, run the following command:

    				
    					$ sudo systemctl enable --now odoo
    				
    			

    5: Configure Nginx with LetsEncrypt SSL certificate

    It is possible to use Nginx without SSL, but I do not recommend it, and will not be covering it in this article.

     

    				
    					#Debian 11/12
    sudo apt update
    sudo apt install certbot python3-certbot-nginx
    
    #Debian 10
    sudo apt update
    sudo apt install certbot python-certbot-nginx
    
    #stop Nginx
    sudo systemctl stop nginx
    
    #Generate SSL certificates
    export DOMAIN="odoo.robfauls.com"
    export EMAIL="rockinit@robfauls.com"
    sudo /usr/bin/certbot certonly --standalone -d ${DOMAIN} --preferred-challenges http --agree-tos -n -m ${EMAIL} --keep-until-expiring
    				
    			

    Set up cron job for certificate renewal:

    				
    					$ sudo crontab -e
    15 3 * * * /usr/bin/certbot renew --pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx"
    				
    			

    Create Nginx configuration file.

    				
    					$ sudo nano /etc/nginx/sites-available/odoo.conf
    				
    			

    Paste the following into odoo.conf:

    				
    					#odoo server
    upstream odoo {
      server 127.0.0.1:8069;
    }
    upstream odoochat {
      server 127.0.0.1:8072;
    }
    map $http_upgrade $connection_upgrade {
      default upgrade;
      ''      close;
    }
    
    # http -> https
    server {
      listen 80;
      server_name odoo.robfauls.com;
      rewrite ^(.*) https://$host$1 permanent;
    }
    
    server {
      listen 443 ssl;
      server_name odoo.robfauls.com;
      proxy_read_timeout 720s;
      proxy_connect_timeout 720s;
      proxy_send_timeout 720s;
    
      # Add Headers for odoo proxy mode
      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;
    
      # SSL parameters
      ssl_certificate /etc/letsencrypt/live/odoo.robfauls.com/fullchain.pem;
      ssl_certificate_key /etc/letsencrypt/live/odoo.robfauls.com/privkey.pem;
      ssl_trusted_certificate /etc/letsencrypt/live/odoo.robfauls.com/chain.pem;
      ssl_session_timeout 30m;
      ssl_protocols TLSv1.2;
      ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
      ssl_prefer_server_ciphers off;
    
      # log
      access_log /var/log/nginx/odoo.access.log;
      error_log /var/log/nginx/odoo.error.log;
    
      # Redirect websocket requests to odoo gevent port
      location /websocket {
        proxy_pass http://odoochat;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        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;
      }
    
      # Redirect requests to odoo backend server
      location / {
        proxy_redirect off;
        proxy_pass http://odoo;
      }
    
      # common gzip
      gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;
      gzip on;
    }
    				
    			

    Enable the configuration (symlink from sites-available to sites-enabled):

    				
    					ln -s /etc/nginx/sites-available/odoo.conf /etc/nginx/sites-enabled/
    				
    			

    Double check that the Nginx configuration is in a healthy state:

    				
    					$ 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
    				
    			

    7: Optimize Odoo.conf

    Edit odoo.conf:

    				
    					$ sudo nano /etc/odoo/odoo.conf
    				
    			

    Insert/edit the following lines:

    				
    					[options]
    db_host = False
    db_port = False
    db_user = odoo
    db_password = False
    default_productivity_apps = True
    proxy_mode = True
    max_cron_threads = 2
    workers = 3
    longpolling_port = 8072
    addons_path = /var/lib/odoo/.local/share/Odoo/addons/17.0
    xmlrpc = True
    xmlrpc_interface =
    xmlrpc_port = 8069
    xmlrpcs = True
    xmlrpcs_interface =
    xmlrpcs_port = 8071
    
    				
    			

    Restart odoo:

    				
    					$ sudo systemctl restart odoo
    				
    			

    8: Access Odoo and configure it

    9: All done! (for now)

    Now that you’ve completed the initial installation of Odoo 16, it’s time to begin configuring everything. There are a number of tweaks you’ll want to perform in order to get things working the way you’d expect. Please check Odoo – Overview for more information and additional guides. A few of my “top annoyances” have been covered, and I’ll include more as I’m able to dedicate some time to this documentation.

    Debian 10 Debian 11 Debian 12 Featured install Odoo Odoo 17 Odoo17
    Previous ArticleWhat’s with the photos?
    Next Article Odoo 17- Automated Install on Debian 12

    Related Posts

    Odoo 17- Change default email address

    March 10, 2024

    Odoo 17- Automated Install on Debian 12

    December 26, 2023

    Migrate from Github to Gitea

    September 21, 2023

    Upgrade Debian 11 to Debian 12

    August 17, 2023

    3 Comments

    1. tim on November 23, 2023 2:26 pm

      Thank you for sharing, it helped me solve a lot of problems

      Reply
    2. Rob Fauls on December 26, 2023 2:22 am

      Changelog:
      1) Updated the instructions to reference /etc/nginx/sites-available instead of editing /etc/nginx/cond.f/odoo.conf. This is better practice. Not sure why I had that behavior previously.
      2) Added auto-installer guide and linked at top of article. Auto-installer is where most of my efforts go. As features/options/configurations are added, they will be applied to the auto-installer first, and documented in this article as time permits. Example feature not documented here: Cloudflare DNS Proxy Client IP Logging- when following this guide, if using cloudflare, your server will log Cloudflare IP addresses. It will not log client IP addresses. The script addresses this issue and also installs a cron job to update CF IPs on a daily basis.

      Reply
    3. Francisco Arrona on February 14, 2024 1:36 am

      Hi Rob, what are the lines that optimize odoo?, could you help to understand or where can I read about this concepts:
      *default_productivity_apps
      *proxy_mode
      *workers
      *longpolling
      *xmlrpc(s)
         thanks in advance!—

      Reply
    Leave A Reply Cancel Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Editors Picks
    Latest Posts

    Odoo 17- Change default email address

    March 10, 2024

    Odoo 17- Automated Install on Debian 12

    December 26, 2023

    Odoo 17- Manual Install on Debian 10/Debian 11/Debian 12

    November 8, 2023

    Subscribe to Updates

    Get the latest content from Rob.

    I've worked in IT for over 20 years, servicing Government, Healthcare, and Private Sector customers. This is a relatively new adventure into blogging, mostly out of a realization that I need to organize some of my notes on various subjects. Hopefully the articles posted will help others along the way.

    You can connect with me here:

    LinkedIn X (Twitter) Facebook

    Subscribe to Updates

    Keep up to date with new articles posted about 'stuff and things'.

    © 2025 Rob Fauls. Hosted by Flatiron Networks.
    • Home

    Type above and press Enter to search. Press Esc to cancel.