Odoo 17 installation on Digital Ocean with Ubuntu 22.04
Detailed Guide to Installing Odoo 17 on a Digital Ocean Ubuntu 22.04 Droplet
Odoo is a comprehensive and flexible open-source business management software suite that includes a wide range of applications. This guide provides a detailed, step-by-step tutorial on installing Odoo 17 on a Digital Ocean droplet running Ubuntu 22.04.

Prerequisites
Before starting the installation process, ensure you have the following prerequisites:
– A Digital Ocean account.
– A droplet running Ubuntu 22.04.
– Access to the server via SSH.
– Basic knowledge of the command line.
Step-by-Step Installation
Log in to Digital Ocean and create a new droplet with Ubuntu 22.04 as the operating system.
Choose the droplet specifications based on your company’s size and requirements. For Odoo, a droplet with at least 2GB of RAM is recommended.
Set the authentication method to a password and ensure you create a secure password (e.g., `PassF@1or17s`).
Use SSH to connect to your droplet:
ssh root@your_droplet_ip
Ensure you are running the correct version of Ubuntu:
lsb_release -a
Update the package lists and upgrade the system packages:
sudo apt update && sudo apt upgrade -y
Create a dedicated system user for running Odoo:
sudo adduser –system –home=/opt/odoo –group odoo
Odoo requires Python 3.10 and some additional dependencies:
sudo apt install python3.10 python3-pip
Install all necessary dependencies for Odoo:
sudo apt install build-essential wget git python3-dev python3-venv libfreetype6-dev libxml2-dev libzip-dev libsasl2-dev python3-setuptools libjpeg-dev zlib1g-dev libpq-dev libxslt1-dev libldap2-dev libtiff5-dev libopenjp2-7-dev libffi-dev fontconfig xfonts-75dpi xfonts-base nodejs npm pgcli libxmlsec1-dev libxmlsec1-openssl -y
Odoo uses PostgreSQL as its database:
sudo su – postgres
createuser –createdb –username postgres –no-createrole –no-superuser –pwprompt odoo
pgcli
ALTER USER odoo WITH SUPERUSER;
\q
exit
Odoo requires `wkhtmltopdf` for printing PDF reports:
sudo apt install wkhtmltopdf -y
Switch to the `odoo` user and clone the Odoo 17 repository:
sudo su – odoo -s /bin/bash
git clone https://www.github.com/odoo/odoo –depth 1 –branch 17.0 –single-branch .
exit
Install required Python packages and Odoo dependencies:
sudo pip3 install –upgrade pip
sudo pip3 install cffi==1.15.0 testresources Pillow==9.0.1 xlrd==1.2.0 reportlab==3.6.8 numpy
sudo pip3 install -r /opt/odoo/requirements.txt
sudo apt-get install -y npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g less less-plugin-clean-css
sudo apt-get install -y node-less
Create and edit the Odoo configuration file:
sudo cp /opt/odoo/debian/odoo.conf /etc/odoo.conf
sudo nano /etc/odoo.conf
Replace the contents with:
[options]
; This is the password that allows database operations:
admin_passwd = admin
db_host = False
db_port = False
db_user = odoo
db_password = <your_postgresql_password>
addons_path = /opt/odoo/addons
logfile = /var/log/odoo/odoo.log
http_port=8069
Set the appropriate permissions:
sudo chown odoo: /etc/odoo.conf
sudo chmod 640 /etc/odoo.conf
sudo mkdir /var/log/odoo
sudo chown odoo:root /var/log/odoo
Create a systemd service file for Odoo:
sudo nano /etc/systemd/system/odoo.service
Add the following configuration:
[Unit]
Description=Odoo
Documentation=http://www.odoo.com
[Service]
Type=simple
User=odoo
ExecStart=/opt/odoo/odoo-bin -c /etc/odoo.conf
[Install]
WantedBy=default.target
Set permissions and start the service:
sudo chmod 755 /etc/systemd/system/odoo.service
sudo chown root: /etc/systemd/system/odoo.service
sudo systemctl start odoo.service
sudo systemctl status odoo.service
Open your web browser and visit the following URL to access Odoo:
http://<your_domain_or_IP_address>:8069
Monitor Odoo logs to ensure everything is running smoothly:
sudo tail -f /var/log/odoo/odoo.log
Enable the Odoo service to start on system boot:
sudo systemctl enable odoo.service
Congratulations! You have successfully installed Odoo 17 on a Digital Ocean droplet with Ubuntu 22.04. This guide covered the creation of a droplet, installation of necessary dependencies, configuration of PostgreSQL, and setting up Odoo to run as a systemd service. If you encounter any issues, refer to the Odoo logs and adjust the configuration as needed. For additional configurations like enabling Let’s Encrypt SSL and configuring Nginx for performance optimization, you may need to perform further steps not covered in this basic installation guide.
For more insights and professional Odoo Community/Enterprise implementations, connect with us at hashcodeit.com or drop an email at info@hashcodeit.com Transform your Odoo journey with precision and expertise!
Sign up for a Digital Ocean account using the following link: https://m.do.co/c/5104f438ca06. This link provides you with a generous $200 USD credit.
Hi, this is a comment.
To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
Commenter avatars come from Gravatar.