Odoo is a powerful open-source ERP software that includes a wide range of business applications, from CRM to inventory management. This guide will walk you through the steps required to install Odoo on an Ubuntu 22.04 server using root privileges. The installation process will be straightforward and easy to follow, making it accessible even for newcomers.

Step 1: Initiating Instance Creation

  • Creating a New Instance
    • To create a new instance, click on the blue “Create” button located in the top-right corner of the page.
    • Select “Add New Instance” to begin setting up a new virtual machine.
Shape.host Resources dashboard showing the Create menu and available instance templates.

Step 2: Choosing a Location

  • Select a Data Center
    • On the “Create New Instance” page, choose your preferred data center location. For example, you might select “Amsterdam, Netherlands”.
Shape.host instance form with Amsterdam selected as the data center location.

Step 3: Selecting a Plan

  • Choose a Plan
    • Pick a plan that meets your requirements. Options vary in specifications and price, from $3.5 to $22 per month, offering different CPU, memory, storage, and bandwidth.
  • Choose an Operating System
    • Scroll to the “Choose an image” section and select Ubuntu 22.04 from the list of available distributions.
Shape.host instance form with the $22 monthly plan and Ubuntu image selected.

Step 4: Authentication Method

  • Select an Authentication Method
    • Choose between SSH keys (recommended for better security) or a password for root access. In this guide, we’ll proceed with the password option.
  • Complete Instance Creation
    • Click the “Create Instance” button at the bottom of the page to finalize the setup.
Shape.host instance form showing authentication, hostname and instance creation options.

Step 5: Connecting to Your Instance

  • Retrieve SSH Credentials
    • Note the IP address of your newly created instance from the Shape.host dashboard.
  • Connect via SSH
  • Open a terminal on your local machine and use the following command to connect to your instance:
ssh root@your_instance_ip
  • Replace your_instance_ip with the actual IP address of your instance.

Prerequisites

  • A server running Ubuntu 22.04
  • Root access to the server
  • Basic knowledge of terminal commands

Step 6: Update Your System

Before starting the installation, ensure that your system packages are up-to-date:

apt update && apt upgrade -y
Terminal showing APT package management commands and output.

Step 7: Install Required Dependencies

Odoo requires several dependencies to be installed on your server. We’ll start by installing Python and other necessary packages.

  1. Install Python and other dependencies:
apt install python3-pip wget python3-dev python3-venv python3-wheel libxml2-dev libpq-dev libjpeg8-dev liblcms2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential git libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libblas-dev libatlas-base-dev -y
Terminal showing APT package management commands and output.
  1. Install Node.js and npm (for asset management):
   apt install -y nodejs npm
Terminal showing APT package management commands and output.
  1. Install wkhtmltopdf (for printing PDF reports):
   apt install -y wkhtmltopdf
Terminal showing APT package management commands and output.

Step 8: Install and Configure PostgreSQL

Odoo uses PostgreSQL as its database backend. Install PostgreSQL and set up a database user for Odoo.

  1. Install PostgreSQL:
   apt install -y postgresql
Terminal showing APT package management commands and output.
  1. Create a PostgreSQL user for Odoo:
   sudo -u postgres createuser -s odoo
Terminal showing sudo commands or output during Install and Configure PostgreSQL.

Step 9: Download and Install Odoo

We’ll download the latest version of Odoo from the official repository and install it.

  1. Clone the Odoo repository:
   cd /opt
   git clone https://www.github.com/odoo/odoo --depth 1 --branch 15.0 --single-branch odoo
Terminal showing Git repository cloning output.
  1. Create a Python virtual environment for Odoo:
   cd /opt/odoo
   python3 -m venv odoo-venv
Terminal showing Python environment or package installation output.
  1. Activate the virtual environment and install required Python packages:
   source odoo-venv/bin/activate
   pip3 install wheel
   pip3 install -r requirements.txt
   deactivate
Terminal showing Django or Python virtual environment commands.

Step 10: Configure Odoo

We’ll create a configuration file for Odoo and set it up to run as a systemd service.

  1. Create an Odoo user (if not already created):
   adduser --system --home=/opt/odoo --group odoo
Terminal showing Linux user account management commands.
  1. Change ownership of the Odoo directory (if not already owned by odoo):
   chown -R odoo:odoo /opt/odoo
Terminal showing file ownership or permission commands.
  1. Create an Odoo configuration file:
   nano /etc/odoo.conf
Terminal showing nano commands or output during Configure Odoo.

Add the following content to the file:

   [options]
   ; This is the password that allows database operations:
   admin_passwd = admin
   db_host = False
   db_port = False
   db_user = odoo
   db_password = False
   addons_path = /opt/odoo/addons
   logfile = /var/log/odoo/odoo.log
Terminal showing the GNU nano editor and configuration text.
  1. Create a log directory for Odoo and set permissions: If the directory already exists, simply set the correct ownership:
   chown -R odoo:odoo /var/log/odoo
Terminal showing file ownership or permission commands.
  1. Create a systemd service file for Odoo:
   nano /etc/systemd/system/odoo.service
Terminal showing nano commands or output during Configure Odoo.

Add the following content to the file:

   [Unit]
   Description=Odoo
   Documentation=http://www.odoo.com
   [Service]
   # Ubuntu/Debian convention:
   Type=simple
   User=odoo
   ExecStart=/opt/odoo/odoo-venv/bin/python3 /opt/odoo/odoo-bin -c /etc/odoo.conf
   [Install]
   WantedBy=default.target
Terminal showing a systemd service unit configuration.
  1. Reload systemd to apply the new service:
   systemctl daemon-reload
Terminal showing systemd service management commands or output.
  1. Enable and start the Odoo service:
   systemctl enable odoo
   systemctl start odoo
Terminal showing systemd service management commands or output.

Step 11: Access Odoo

Odoo should now be running and accessible. Open your web browser and navigate to your server’s IP address or domain name on port 8069:

http://your_server_ip:8069

You should see the Odoo database management screen, where you can create a new database and start using Odoo.

Odoo initial database creation form with administrator settings.
Odoo Apps page with installable application modules.

For hosting your Odoo ERP software, consider using Shape.host’s Cloud VPS services. Shape.host provides robust and scalable cloud solutions tailored to various needs, ensuring high performance and reliability for your Odoo application. With their Cloud VPS, you can easily scale resources as your application grows, providing an optimal user experience.