Installing Odoo¶
There are multiple ways to install Odoo, or not install it at all, depending on the intended use case.
This documents attempts to describe most of the installation options.
- Online
The easiest way to use Odoo in production or to try it.
- Packaged installers
Suitable for testing Odoo, developing modules and can be used for long-term production use with additional deployment and maintenance work.
- Source install
Provides greater flexibility: e.g. allow multiple running Odoo versions on the same system. Good for developing modules, can be used as base for production deployment.
- Docker
If you usually use docker for development or deployment, an official docker base image is available.
Editions¶
There are two different Editions of Odoo: the Community and Enterprise versions. Using the Enterprise version is possible on Odoo Online and accessing the code is restricted to Enterprise customers and partners. The Community version is freely available to anyone.
If you already use the Community version and wish to upgrade to Enterprise, please refer to Switch from Community to Enterprise (except for Source install).
Online¶
Demo¶
To simply get a quick idea of Odoo, demo instances are available. They are shared instances which only live for a few hours, and can be used to browse around and try things out with no commitment.
Demo instances require no local installation, just a web browser.
Odoo Online¶
Trivial to start with, fully managed and migrated by Odoo S.A., Odoo Online provides private instances and starts out free. It can be used to discover and test Odoo and do non-code customizations (i.e. incompatible with custom modules or the Odoo Apps Store) without having to install it locally.
Can be used for both testing Odoo and long-term production use.
Like demo instances, Odoo Online instances require no local installation, a web browser is sufficient.
Packaged installers¶
Odoo provides packaged installers for Windows, deb-based distributions (Debian, Ubuntu, …) and RPM-based distributions (Fedora, CentOS, RHEL, …) for both the Community and Enterprise versions.
These packages automatically set up all dependencies (for the Community version), but may be difficult to keep up-to-date.
Official Community packages with all relevant dependency requirements are available on our nightly server. Both Community and Enterprise packages can be downloaded from our download page (you must to be logged in as a paying customer or partner to download the Enterprise packages).
Windows¶
Download the installer from our nightly server (Community only) or the Windows installer from the download page (any edition).
Execute the downloaded file.
Warning
On Windows 8 and later you may see a warning titled “Windows protected your PC”.Click on More Info and then on Run anyway.Accept the UAC prompt.
Go through the various installation steps.
Odoo will automatically be started at the end of the installation.
Linux¶
Prepare¶
Odoo needs a PostgreSQL server to run properly. The default configuration for the Odoo ‘deb’ package is to use the PostgreSQL server on the same host as your Odoo instance. Execute the following command in order to install the PostgreSQL server:
$ sudo apt install postgresql -y
Odoo needs a PostgreSQL server to run properly. Make sure that the sudo
command is
available and well configured and, only then, execute the following command in order to
install the PostgreSQL server:
$ sudo dnf install -y postgresql-server
$ sudo postgresql-setup --initdb --unit postgresql
$ sudo systemctl enable postgresql
$ sudo systemctl start postgresql
Repository¶
Odoo S.A. provides a repository that can be used with Debian and Ubuntu distributions. It can be used to install Odoo Community Edition by executing the following commands:
$ wget -q -O - https://nightly.odoo.com/odoo.key | sudo gpg --dearmor -o /usr/share/keyrings/odoo-archive-keyring.gpg
$ echo 'deb [signed-by=/usr/share/keyrings/odoo-archive-keyring.gpg] https://nightly.odoo.com/16.0/nightly/deb/ ./' | sudo tee /etc/apt/sources.list.d/odoo.list
$ sudo apt-get update && sudo apt-get install odoo
You can then use the usual apt-get upgrade
command to keep your installation up-to-date.
Odoo S.A. provides a repository that can be used with the Fedora distributions. It can be used to install Odoo Community Edition by executing the following commands:
$ sudo dnf config-manager --add-repo=https://nightly.odoo.com/16.0/nightly/rpm/odoo.repo
$ sudo dnf install -y odoo
$ sudo systemctl enable odoo
$ sudo systemctl start odoo
Note
At this moment, there is no nightly repository for the Enterprise Edition.
Distribution package¶
Instead of using the repository as described above, the ‘deb’ packages for both the Community and Enterprise editions can be downloaded from the official download page.
Note
Odoo 16 ‘deb’ package currently supports Debian 11 (Bullseye), Ubuntu 22.04 (Jammy) or above.
Next, execute the following commands as root:
# dpkg -i <path_to_installation_package> # this probably fails with missing dependencies
# apt-get install -f # should install the missing dependencies
# dpkg -i <path_to_installation_package>
This will install Odoo as a service, create the necessary PostgreSQL user and automatically start the server.
Warning
The
python3-xlwt
Debian package does not exists in Debian Buster nor Ubuntu 18.04. This python module is needed to export into xls format.If you need the feature, you can install it manually with:
$ sudo pip3 install xlwt
The
num2words
python package does not exists in Debian Buster nor Ubuntu 18.04. Textual amounts will not be rendered by Odoo and this could cause problems with thel10n_mx_edi
module.If you need this feature, you can install manually with:
$ sudo pip3 install num2words
Instead of using the repository as described above, the ‘rpm’ packages for both the Community and Enterprise editions can be downloaded from the official download page.
Note
Odoo 16 ‘rpm’ package supports Fedora 36.
Once downloaded, the package can be installed using the ‘dnf’ package manager:
$ sudo dnf localinstall odoo_16.0.latest.noarch.rpm
$ sudo systemctl enable odoo
$ sudo systemctl start odoo
Source install¶
The source “installation” is really about not installing Odoo, and running it directly from source instead.
It can be more convenient for module developers as the Odoo source is more easily accessible than using packaged installation.
It also makes starting and stopping Odoo more flexible and explicit than the services set up by the packaged installations, and allows overriding settings using command-line parameters without needing to edit a configuration file.
Finally it provides greater control over the system’s set up, and allows to more easily keep (and run) multiple versions of Odoo side-by-side.
Fetch the sources¶
There are two ways to obtain the source code of Odoo: as a zip archive or through git.
Archive¶
Community Edition:
Enterprise Edition:
Git¶
The following requires Git to be installed on your machine and that you have basic knowledge of Git commands. To clone a Git repository, you must choose between cloning with HTTPS or SSH. If you do not know the difference between the two, the best option is most likely HTTPS. If you are following the Getting started developer tutorial, or plan on contributing to Odoo source code, choose SSH.
C:\> git clone https://github.com/odoo/odoo.git
C:\> git clone https://github.com/odoo/enterprise.git
C:\> git clone git@github.com:odoo/odoo.git
C:\> git clone git@github.com:odoo/enterprise.git
$ git clone https://github.com/odoo/odoo.git
$ git clone https://github.com/odoo/enterprise.git
$ git clone git@github.com:odoo/odoo.git
$ git clone git@github.com:odoo/enterprise.git
$ git clone https://github.com/odoo/odoo.git
$ git clone https://github.com/odoo/enterprise.git
$ git clone git@github.com:odoo/odoo.git
$ git clone git@github.com:odoo/enterprise.git
Note
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 addons-path option set to the folder with the Enterprise version. You need to clone both the Community and Enterprise repository to have a working Odoo Enterprise installation. See Editions to get access to the Enterprise repository.
Prepare¶
Python¶
Odoo requires Python 3.7 or later to run. Visit Python’s download page to download and install the latest version of Python 3 on your machine.
During installation, check Add Python 3 to PATH, then click Customize Installation and make sure that pip is checked.
Note
If Python 3 is already installed, make sure that the version is 3.7 or above, as previous versions are not compatible with Odoo.
C:\> python --version
Verify also that pip is installed for this version.
C:\> pip --version
Odoo requires Python 3.7 or later to run. Use your package manager to download and install Python 3 on your machine if it is not already done.
Note
If Python 3 is already installed, make sure that the version is 3.7 or above, as previous versions are not compatible with Odoo.
$ python3 --version
Verify also that pip is installed for this version.
$ pip3 --version
Odoo requires Python 3.7 or later to run. Use your preferred package manager (homebrew, macports) to download and install Python 3 on your machine if it is not already done.
Note
If Python 3 is already installed, make sure that the version is 3.7 or above, as previous versions are not compatible with Odoo.
$ python3 --version
Verify also that pip is installed for this version.
$ pip3 --version
PostgreSQL¶
Odoo uses PostgreSQL as database management system. Download and install PostgreSQL (supported version: 12.0 and later).
By default, the only user is postgres
but Odoo forbids connecting as postgres
, so you need
to create a new PostgreSQL user:
Add PostgreSQL’s
bin
directory (by default:C:\Program Files\PostgreSQL\<version>\bin
) to yourPATH
.Create a postgres user with a password using the pg admin gui:
Open pgAdmin.
Double-click the server to create a connection.
Select
.Enter the username in the Role Name field (e.g.
odoo
).Open the Definition tab and enter the password (e.g.
odoo
), then click Save.Open the Privileges tab and switch Can login? to
Yes
and Create database? toYes
.
Odoo uses PostgreSQL as database management system. Use your package manager to download and install PostgreSQL (supported version: 12.0 and later).
It can be achieved by executing the following:
$ sudo apt install postgresql postgresql-client
By default, the only user is postgres
but Odoo forbids connecting as postgres
, so you need
to create a new PostgreSQL user:
$ sudo -u postgres createuser -s $USER
$ createdb $USER
Note
Because your PostgreSQL user has the same name as your Unix login, you will be able to connect to the database without password.
Odoo uses PostgreSQL as database management system. Use postgres.app to download and install PostgreSQL (supported version: 12.0 and later).
Tip
To make the command line tools bundled with postgres.app
available, make sure to setup your
$PATH
variable by following the Postgres.app CLI Tools Instructions.
By default, the only user is postgres
but Odoo forbids connecting as postgres
, so you need
to create a new PostgreSQL user:
$ sudo -u postgres createuser -s $USER
$ createdb $USER
Note
Because your PostgreSQL user has the same name as your Unix login, you will be able to connect to the database without password.
Dependencies¶
Before installing the dependencies, you must download and install the Build Tools for Visual Studio. When prompted, select C++ build tools in the Workloads tab and install them.
Odoo dependencies are listed in the requirements.txt
file located at the root of the Odoo
community directory.
Tip
It can be preferable to not mix python modules packages between different instances of Odoo or with your system. You can use virtualenv to create isolated Python environments.
Navigate to the path of your Odoo Community installation (CommunityPath
) and run pip on
the requirements file in a terminal with Administrator privileges:
C:\> cd \CommunityPath
C:\> pip install setuptools wheel
C:\> pip install -r requirements.txt
For languages with right-to-left interface (such as Arabic or Hebrew), the package rtlcss
is needed:
Download and install nodejs.
Install
rtlcss
:C:\> npm install -g rtlcss
Edit the System Environment’s variable
PATH
to add the folder wherertlcss.cmd
is located (typically:C:\Users\<user>\AppData\Roaming\npm\
).
Using your distribution packages is the preferred way of installing dependencies. Alternatively, you can install the python dependencies with pip.
For Debian-based systems, the packages are listed in the debian/control file of the Odoo sources.
On Debian/Ubuntu, the following commands should install the required packages:
$ cd /CommunityPath
$ sed -n -e '/^Depends:/,/^Pre/ s/ python3-\(.*\),/python3-\1/p' debian/control | sudo xargs apt-get install -y
As some of the python packages need a compilation step, they require system libraries to be installed.
On Debian/Ubuntu-based systems, the following command should install these required libraries:
$ sudo apt install python3-pip libldap2-dev libpq-dev libsasl2-dev
Odoo dependencies are listed in the requirements.txt
file located at the root of
the Odoo community directory.
Note
requirements.txt
are based on their stable/LTS
Debian/Ubuntu corresponding version at the moment of the Odoo release.python3-babel
package version is 2.8.0 in Debian
Bullseye and 2.6.0 in Ubuntu Focal. The lowest version is then chosen in the
requirements.txt
.Tip
It can be preferable to not mix python modules packages between different instances of Odoo or with your system. You can use virtualenv to create isolated Python environments.
Navigate to the path of your Odoo Community installation (CommunityPath
) and run
pip on the requirements file to install the requirements for the current user.
$ cd /CommunityPath
$ pip install -r requirements.txt
For languages with right-to-left interface (such as Arabic or Hebrew), the package rtlcss
is
needed:
Download and install nodejs and npm with your package manager.
Install
rtlcss
:$ sudo npm install -g rtlcss
Odoo dependencies are listed in the requirements.txt
file located at the root of the Odoo
community directory.
Tip
It can be preferable to not mix python modules packages between different instances of Odoo or with your system. You can use virtualenv to create isolated Python environments.
Navigate to the path of your Odoo Community installation (CommunityPath
) and run pip on
the requirements file:
$ cd /CommunityPath
$ pip3 install setuptools wheel
$ pip3 install -r requirements.txt
Warning
Non-Python dependencies need to be installed with a package manager:
For languages with right-to-left interface (such as Arabic or Hebrew), the package rtlcss
is
needed:
Running Odoo¶
Once all dependencies are set up, Odoo can be launched by running odoo-bin
, the
command-line interface of the server. It is located at the root of the Odoo Community directory.
To configure the server, you can either specify command-line arguments or a configuration file.
Tip
For the Enterprise edition, you must add the path to the enterprise
addons to the addons-path
argument. Note that it must come before the other paths in addons-path
for addons to be loaded
correctly.
Common necessary configurations are:
PostgreSQL user and password.
Custom addon paths beyond the defaults, to load your own modules.
A typical way to run the server would be:
C:\> cd CommunityPath/
C:\> python odoo-bin -r dbuser -w dbpassword --addons-path=addons -d mydb
Where CommunityPath
is the path of the Odoo Community installation, dbuser
is the
PostgreSQL login, dbpassword
is the PostgreSQL password, and mydb
is the name of the
PostgreSQL database.
$ cd /CommunityPath
$ python3 odoo-bin --addons-path=addons -d mydb
Where CommunityPath
is the path of the Odoo Community installation, and mydb
is the name
of the PostgreSQL database.
$ cd /CommunityPath
$ python3 odoo-bin --addons-path=addons -d mydb
Where CommunityPath
is the path of the Odoo Community installation, and mydb
is the name
of the PostgreSQL database.
After the server has started (the INFO log odoo.modules.loading: Modules loaded.
is printed), open
http://localhost:8069 in your web browser and log in with the base administrator account: Use
admin
for the Email and, again, admin
for the Password. That’s it, you
just logged into your own Odoo database!
Tip
Docker¶
The full documentation on how to use Odoo with Docker can be found on the official Odoo docker image page.