Introduction

This article provides a detailed description on how to install Odoo on your own server. Here we rely on the script that was written by VentorTech (an official Odoo partner), which we use to install Odoo for our clients. We are pleased to share the script with the whole Odoo Community. This article assumes that Odoo will be installed on the same server as the PostgreSQL database.

What is included in the script (Odoo installer):

  • Checking the current Python version*
  • Creating a system user Odoo (in Linux)
  • Installation and configuration of the PostgreSQL database
  • Installation and configuration of selected Odoo version (including Odoo Enterprise installation if you have access to it on GitHub)
  • Installation and configuration of a web server (Odoo nginx or Odoo Apache 2)
  • Installation of an SSL certificate, so your Odoo database can be accessed via HTTPS using your domain
  • Installation and configuration of Logrotate**

*The script checks for the Python version to make sure that Odoo will be correctly installed. E.g. Odoo 14 can work on Python 3.6 and higher. If the system has an outdated Python, the script will automatically update it.

**Odoo records all logs into one file. Often it may have a huge file on your server (40Gb and more). The lack of space on the server can lead to Odoo crashes and slowing Odoo performance. So, we recommend configuring Logrotate to record logs in separate files and store a number of versions (10 or any).

Pre-Requirements

This instruction assumes that you have Linux skills.

Odoo server requirements

  • Dedicated or VPS server
  • OS: Debian 9/10 or Ubuntu 18.04/20.04
  • Open ports http (80), https (443) and ssh (22)
  • Root access
  • Access to DNS panel to manage your domain and assign domain name
  • It is better to choose a hoster where you can expand your server quickly
  • The server hardware configuration depends on your project (check Odoo system requirements here)

In this tutorial, we will install Odoo 14 Сommunity on Debian 10 with 4 core, 4 gb RAM, and 50 GB SSD. You can install Odoo on Ubuntu, but we chose Debian as a more stable, reliable, and secure system. Debian also provides a convenient platform for updating critical vulnerabilities.

Also, if you want to install Odoo Enterprise, you need to have a login and password from a GitHub user who has access to https://github.com/odoo/enterprise (see Odoo Editions to get access).

“The Enterprise git repository does not contain the full Odoo source code. It is only a collection of extra add-ons. The main server code is in the Community version. Running the Enterprise version actually means running the server from the Community version with the add-ons path option set to the folder with the Enterprise version. You need to clone both the Odoo Community and Enterprise repositories to have a working Odoo Enterprise installation.”

Change DNS Record

NOTE: This step is required only if you want to install an HTTPS certificate

Specify your new domain to your requested server IP address by creating an A-record in your DNS. In the example below, we had created the “demo” name and then used the domain demo.ventor.tech.

odoo installation

Install Git:

sudo apt install git

Change directory:

cd /opt/

Clone script from git:

git clone https://github.com/ventor-tech/odoo-install-script

Configuring Odoo Variables

Change folder:

cd odoo-install-script/

Open conf to configure your Odoo:

nano conf.sh

After opening the file, you will see something similar to the screenshot below. Stay with us here; it’s simple 😉

odoo install

You need to make some changes to fit your configuration

OE_VERSION="14.0" is the Odoo version to install, for example `14.0` for Odoo V14
OE_INSTALL_DIR="$OE_HOME/$OE_VERSION is the path where all environments will be installed to
OE_REPO="$OE_INSTALL_DIR/odoo"is the path to where Odoo will be cloned
INSTALL_WKHTMLTOPDF="True"set to `False` if you do not want to install it, but if you want to install it, this should be set to `True`
OE_PORT="8069"is the port where Odoo should run on, for example 8069
OE_NETRPC_PORT="8070"is the port where Odoo net-rpc should run on, for example 8070
OE_LONGPOOL_PORT="8072"is the port where Odoo long pool should run on, for example 8072
OE_WORKERS="4"is the number of Odoo workers, for example 4
IS_ENTERPRISE="False"his will install the Community version of Odoo; set this to “True” to install the Enterprise version on top of the Community version
NOTE!!For Enterprise, you need to login and use your Enterprise access password!
OE_SUPERADMIN="9XnSidxzaAFRZP" is the master password for this Odoo installation
INSTALL_PG_SERVER="True"then only the client will be installed
OE_DB_HOST="localhost"this is the path to install PG
OE_DB_PORT="5432"is the port where PG should run on, for example 5432
OE_DB_USER="odoo"is the DB user for Odoo
OE_DB_PASSWORD="x98pLem63tAHQf"is the password of postgres user
PG_VERSION=12select PG version, for example 12
WEB_SERVER="nginx"or "apache2" to select the web server
HTTP_PROTOCOL="https"indicates which protocol is needed
HTTPS_PORT="443"is the port where HTTPS should run on, for example 443
INSTALL_CERTIFICATE="True"if we need to install the certificate (this also increases Odoo security, as all Internet browsers require an SSL certificate)
PUBLIC_IP="X.XXX.XX.153"to set the public IP address your server
DOMAIN_NAME="demo.yourdomain.com"this is the DNS at which you configured for server
DOMAIN_ALIASES=()e.g., "www.demo.ventortech.com" "zzz.demo.ventortech.com"
LE_EMAIL="[email protected]"allows email notification about the certificate
LE_CRON_SCRIPT="/etc/cron.daily/certbot-renew"is the script to renew the certificate

Run script

Make the script executable:

Sudo chmod +x run.sh

Execute the script:

Sudo ./run.sh

After installation, you should see a successful script end.

how to install odoo

Commands to manage the Odoo service

systemctl status odoo-14.0 – Status of Odoo service
systemctl start odoo-14.0 – Start Odoo service
systemctl stop odoo-14.0 – Stop Odoo service
systemctl restart odoo-14.0 – Restart Odoo service

Check

Let’s check; go to your domain:
https://demo.ventor.tech/web/login
And now you can create the first database in Odoo.
odoo database

Input all needed data and create a database.
odoo database.
In the end, you will see this screen. Now install any Odoo apps as you wish.
odoo apps

Bingo! You are done with the Odoo installation using the Odoo install script.

Useful Odoo apps you will likely use:

Odoo Direct Print PRO – allows printing of any Odoo report or shipping labels directly and without downloading PDF or ZPL.
Picking and Reservation Strategy – allows changing reservation priority and making reservations the way that you want; also allows you to create optimal picking routes in Odoo Inventory.

Useful links (Odoo tutorials):

How To Install Custom Module In Odoo.sh.
How to Configure Emails to Work with Office 365 and Odoo.
How to Connect a Barcode Scanner with Odoo.

From the Author

In this article we reviewed the procedure of Odoo server installation using our installer Odoo. Also you can find useful tips on how to open Odoo after installation and how to start Odoo server as well as how to run Odoo. In the settings section you can learn how to change Odoo port in ubuntu. We didn’t cover cases for Windows. Let us know if you wish us to publish how to start Odoo server in Windows or how to restart Odoo server in Windows. Also, we didn’t install Odoo cPanel because it restricts the ability to install and configure services. It is much more convenient to install on a clean system.

If you think that this article is helpful, please share it on your social networks. Sharing icons are available below the article. Subscribe to our newsletter and follow VentorTech on Twitter to be kept in the loop.

If you have faced some issues in installing Odoo by following this guide, or found some mistakes in the article, please leave your comments below. We will be happy to assist you.
Keep in mind that we do not provide Odoo installation services, but we are interested in working on your whole project with you. You can fill in this short form to get initial price estimates for your Odoo project.

Calculate the price for your Odoo project

Get a quote >

Follow our twitter account and subscribe to our newsletter to make sure you don’t miss updates.

Website || + posts

- 7+ years experience of System administrator;
- 3+ years experience of Linux administrator;
- Main system: Debian, Ubuntu, Windows Servers, Windows;
- Main project roles: System administrator, Network administration/analyst and specialist, Security administrator;
- Primary objectives: Monitoring checks of systems/software, Performing backups of data, Applying operating system updates, and configuration changes, Installing and configuring new hardware/software, Responsibility for security, Troubleshooting any reported problem or reported problems, System performance tuning.

----------------------------------------------------------------------
Education: Bachelor's degree.
----------------------------------------------------------------------
Experience:
System Administration Specialist
HoDabby

System Administration Specialist
Synesis

System Administration Specialist
National Cadastral Agency

----------------------------------------------------------------------
Current position: System Administration Specialist
VentorTech
----------------------------------------------------------------------
Licenses & certifications:
IT Product Management (Basic Level)
IT Product Management (Professional Level)
My Monday

LFS211: Linux Networking and Administration
LFS201: Essentials of Linux System Administration
Linux System Administrator
Proxmox VE Installation and Administration and Proxmox VE Advanced
MikroTik MTCNA