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 16- Manual Install on Debian 10/Debian 11/Debian 12
    Odoo

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

    Rob FaulsBy Rob FaulsOctober 21, 2022Updated:April 8, 202412 Comments
    Facebook Twitter LinkedIn Email Reddit Telegram
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Odoo 16 Enterprise introduced a new pricing model, with all apps included, and only charges per user. This guide will help you install Odoo16 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 16- Automated Install on Debian 11
    Odoo 16- Automated Install on Debian 12

    Note: Revisions have been made to this post, notated in the comments at the end.

    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 11
    Debian 12: Install wkhtmltopdf on Debian12

    3: Install Odoo 16

    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/16.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
    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/conf.d/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;
    }
    				
    			

    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: Tweak odoo.conf settings:

    Edit odoo.conf:

    				
    					$ sudo nano /etc/odoo/odoo.conf
    				
    			

    Insert the following lines and edit as needed:

    				
    					;Certain values copied from: https://www.odoo.com/documentation/16.0/administration/install/deploy.html
    ;Lines beginning with semi-colon are commented out and will not be applied.
    proxy_mode = True
    ;Maximum number of cron threads.
    ;max_cron_threads = 3
    ;Maximum number of workers.
    ;workers = 4
    longpolling_port = 8072
    addons_path = /var/lib/odoo/.local/share/Odoo/addons/16.0
    ;Soft limit for virtual memory, after which new requests will spawn new workers.
    ;limit_memory_soft = 629145600
    ;Maximum allowed virtual memory per Odoo worker, beyond which the worker is killed and recycled.
    ;limit_memory_hard = 1677721600
    ;Maximum number of requests a worker can handle before it is recycled.
    ;limit_request = 8192
    ;Maximum allowed CPU time per request.
    ;limit_time_cpu = 600
    ;Maximum allowed real time per request.
    ;limit_time_real = 1200
    ;regular XML-RPC
    xmlrpc = True
    xmlrpc_interface =
    xmlrpc_port = 8069
    ;XML-RPC over SSL
    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 Odoo16
    Previous ArticleOdoo – Enable Large Uploads (>1MB)
    Next Article Install wkhtmltopdf on Debian11

    Related Posts

    Odoo 17- Automated Install on Debian 12

    December 26, 2023

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

    November 8, 2023

    Migrate from Github to Gitea

    September 21, 2023

    Upgrade Debian 11 to Debian 12

    August 17, 2023

    12 Comments

    1. Jake on November 29, 2022 11:14 pm

      This is great, keep it up! Really helped me and good to see someone working on Odoo tutorials!!

      Reply
      • Rob on January 18, 2023 9:01 pm

        Thanks, Jake! I put up a reddit post asking for what things people would like to see and need to follow up on that thread with some articles. Is there anything you’d like to know more about, Odoo or otherwise?

        Reply
    2. Rob Fauls on February 22, 2023 12:34 am

      I noticed an issue with the dicuss/chat application not working with a previous version of this document (and the auto-installer). I’ve updated the instructions and the script to include the fix. If you’d like to see the history, you may review the history of the auto-installer script here: https://code.sparkedhosting.com/rob/robfauls.com-scripts/-/commits/main/Odoo/Install-Odoo16-Debian11-Basic.sh

      Reply
    3. Hans on April 4, 2023 9:45 am

      Hello, I’ve just finished the tutorial’s test instance. Nice and simple. nothing similar to anything I have previously discovered. Well done! I am currently attempting to troubleshoot the error I receive when attempting to access Odoo’s settings.

      “`
      Error: Missing field string information for the field ‘module_stock_landed_costs’ from the ‘res.config.settings’ model
      at https://some.domain.xyz/web/assets/541-dcda3e2/web.assets_backend.min.js:6614:258
      at traverse (https://some.domain.xyz/web/assets/541-dcda3e2/web.assets_backend.min.js:6609:200)
      at https://some.domain.xyz/web/assets/541-dcda3e2/web.assets_backend.min.js:6609:242
      at _.each._.forEach (https://some.domain.xyz/web/assets/540-bc09ad5/web.assets_common.min.js:63:404)
      at traverse (https://some.domain.xyz/web/assets/541-dcda3e2/web.assets_backend.min.js:6609:211)
      at https://some.domain.xyz/web/assets/541-dcda3e2/web.assets_backend.min.js:6609:242
      at _.each._.forEach (https://some.domain.xyz/web/assets/540-bc09ad5/web.assets_common.min.js:63:404)
      at traverse (https://some.domain.xyz/web/assets/541-dcda3e2/web.assets_backend.min.js:6609:211)
      at https://some.domain.xyz/web/assets/541-dcda3e2/web.assets_backend.min.js:6609:242
      at _.each._.forEach (https://some.domain.xyz/web/assets/540-bc09ad5/web.assets_common.min.js:63:404)
      “`

      I am guessing it is some miss-configuration in the nginx config file. Could someone assist?

      Reply
      • Rob Fauls on April 4, 2023 2:14 pm

        Hi Hans,
        This is going to be an Odoo error. Can you try regenerating assets? To regenerate assets, please do the following:
        1) Add “debug=1” to the end of your base URL: https://odoo.robfauls.com/web?debug=1
        2) In the top-right, you will see a debug icon appear. Click it, then select “Regenerate Assets Bundles” near the bottom.
        3) Check to see if you’re able to access the settings page now.

        As we’re using the nightly branch of Odoo, we are quite literally testing the product for Odoo. It’s our contribution to the community. That said, since you presumably haven’t done much setup and they may have released an update since you installed, you could check to see if there’s a new release that may or may not have fixed whatever is causing your issue.

        To check if there’s an update available, please do the following:
        1) Run: “apt update”
        2) Run: “apt list –upgradeable”
        3) Check for this line: “odoo/unknown 16.0.20230404 all [upgradable from: 16.0.20230221]”
        This is will show the release version for Odoo, which is noted by the date of the release. If there has not been a release since you last installed/updated, then you won’t see this line.

        As always, if you need more help, just holler!

        Reply
    4. Lorenzo on April 22, 2023 3:15 pm

      In step five I got this error, and I could not continue:
      Problem binding to port 80: Could not bind to IPv4 or IPv6.

      Reply
      • Rob Fauls on April 22, 2023 4:53 pm

        Hi Lorenzo,
        This message indicates that you have another service already running on port 80 and the system is not able to bind to port 80.

        Reply
    5. Rob on June 16, 2023 3:25 pm

      I’ve updated the guide for Debian12 “Bookworm”. While the manual process has not changed, there is a new release for WKHTMLtoPDF, which required a new script for Debian12. That said, I can script out the version change on the original script…I just need to take the time to do it and I’m not able to make those changes right now.

      Reply
    6. Francisco Arrona on November 7, 2023 3:53 pm

      It works just fine thanks Rob, I do not see the path for the addons that I have seen on other installs on the odoo.conf file, so in case I need to add an app where should I put the custom addons and should I reference the odoo addons?

      Reply
      • Rob Fauls on November 7, 2023 4:01 pm

        Hi Francisco,
        Great catch! I just updated the guide. Looks to be one of the items that was left off the manual install, but was covered in the automated install. One of the pieces that you might find particularly valuable in the automated install is the fix for Cloudflare client IP logging. I admittedly didn’t test the last build that I pushed, but if you’re able to read the code, you can deconstruct it: https://code.flatironnetworks.com/RobFauls-Com/website-scripts/src/branch/main/Odoo/Install-Odoo16-Debian12.sh

        I also posted it as a separate project here: https://code.flatironnetworks.com/RobFauls-Com/website-scripts/src/branch/main/Cloudflare/Fix_IP_Logging.sh

        Reply
        • Francisco Arrona on February 6, 2024 3:49 am

          Thanks Rob, although I do not know CloudFare, I read that upspeed a site, is tis correct?, how much?

          Another question; Which is the odoo user password on debian?, or what is the best practice to work with the custom addons directory . I tried to go in this:/var/lib/odoo/.local/share/Odoo/addons ,  with my user I used to install odoo but I can not see anything , so I think I should be an odoo user.

          Reply
          • Rob Fauls on February 6, 2024 4:34 pm

            Hi Francisco,
            CloudFlare is a reverse proxy. If you aren’t using CloudFlare, you don’t need to worry about this step. I built it into the installer as an option because there are a lot of people/companies that do use Cloudflare. For those users, it’s important to have accurate IP logs when troubleshooting. Without the modifications, Cloudflare would obfuscate the IP addresses.

            As part of Odoo’s repository installation, the “odoo” user is created as a service account. In some cases, you could “su – odoo” (replace with the username you want for whatever system you’re accessing). In this case, the “odoo” account has been disabled, so you won’t be able to switch to it. This is by design. You may consider running “sudo -i” to switch to root, then “ls /var/lib/odoo/.local/share/Odoo/addons” to see if you get different behavior.

            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.