Odoo offers a variety of installation methods, or even the option to use it without a local installation, to cater to diverse use cases. This guide provides a detailed overview of the most common installation approaches, helping you choose the best fit for your requirements.
Whether you need a quick trial, a robust production environment, or a flexible development setup, Odoo provides suitable options:
- Online: The most straightforward approach for trying Odoo or deploying it in a production environment.
- Packaged Installers: Ideal for testing, module development, and long-term production use, though they may require additional deployment and maintenance effort.
- Source Install: Offers maximum flexibility, allowing multiple Odoo versions on a single system. This method is excellent for module development and serves as a solid foundation for production deployments.
- Docker: For users familiar with Docker for development or deployment, an official Odoo Docker base image is readily available.
Understanding Odoo Editions
Odoo is available in two distinct editions: the Community version and the Enterprise version. The Enterprise version offers advanced features and is accessible via Odoo Online, with its code restricted to Enterprise customers and partners. Conversely, the Community version is open-source and freely available to all users. For those currently using the Community version and planning an upgrade to Enterprise, comprehensive guidance can be found in the Switch from Community to Enterprise documentation, except for source installations.
Online Options
For immediate access and minimal setup, Odoo provides convenient online options.
Demo Instances
To quickly explore Odoo\'s capabilities, demo instances are available. These shared environments are ephemeral, typically lasting only a few hours, and allow users to navigate the system and experiment without any long-term commitment. Demo instances require no local installation; all that\'s needed is a web browser to begin exploring.
Odoo Online
Odoo Online offers private, fully managed instances, migrated and maintained by Odoo S.A., with free starting tiers. This platform simplifies the process of discovering and testing Odoo, enabling non-code customizations that are compatible with custom modules or the Odoo Apps Store, all without the need for a local installation. Odoo Online is suitable for both initial testing phases and sustained production use. Similar to demo instances, Odoo Online instances are entirely web-based, requiring only a web browser.
Packaged Installers
Odoo offers convenient packaged installers for various operating systems, including Windows, deb-based distributions (such as Debian and Ubuntu), and RPM-based distributions (like Fedora, CentOS, and RHEL). These installers are available for both the Community and Enterprise versions of Odoo.
While these packages automate the setup of all necessary dependencies (for the Community version), users should be aware that keeping them up-to-date might require some manual effort. Official Community packages, complete with all relevant dependency requirements, can be found on our nightly server. Both Community and Enterprise packages are available for download from our download page. Please note that a login as a paying customer or partner is required to download the Enterprise packages.
Windows Installation
- Download the appropriate installer from our nightly server (Community only) or the download page (for any edition).
- Execute the downloaded file.
Warning: On Windows 8 and later, you might encounter a "Windows protected your PC" warning. In such cases, click on More Info and then on Run anyway to proceed.
- Accept the User Account Control (UAC) prompt.
- Follow the on-screen instructions through the various installation steps.
Upon completion of the installation, Odoo will automatically launch.
Linux Installation
Prepare Your Environment
Odoo relies on a PostgreSQL server for proper operation. The default configuration for the Odoo ‘deb’ package anticipates the PostgreSQL server residing on the same host as your Odoo instance. To install the PostgreSQL server, execute the following command in your terminal:
$ sudo apt install postgresql -y
Warning: The `wkhtmltopdf` tool is not installed via **pip** and must be manually installed in version 0.12.5 to ensure support for headers and footers in PDF generation. Refer to our wiki for detailed information on different versions and installation instructions.
Using the Odoo Repository
Odoo S.A. maintains a repository compatible with Debian and Ubuntu distributions, facilitating the installation of _Odoo Community Edition_. To utilize this repository, execute 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
Once installed, you can use the standard `apt-get upgrade` command to keep your Odoo installation updated.
Note: Currently, there is no nightly repository available for the Enterprise Edition.
Installing from a Distribution Package
Alternatively, ‘deb’ packages for both the _Community_ and _Enterprise_ editions can be downloaded directly from the official download page.
After downloading, 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 process will install Odoo as a system service, create the necessary PostgreSQL user, and automatically start the server.
Warning:
- The `python3-xlwt` Debian package is not available in Debian Buster or Ubuntu 18.04. This Python module is essential for exporting data into XLS format. If this feature is required, you can install it manually.
- The `num2words` Python package is also absent in Debian Buster and Ubuntu 18.04. Without it, textual amounts will not be rendered by Odoo, which could lead to issues with the `l10n_mx_edi` module. If this functionality is needed, install it manually using:
$ sudo pip3 install num2words
Source Installation
A source "installation" effectively means running Odoo directly from its source code rather than installing pre-compiled packages. This method is particularly advantageous for module developers, as it provides easier access to the Odoo source code compared to packaged installations.
Furthermore, running from source offers greater flexibility and explicit control over starting and stopping Odoo, bypassing the services set up by packaged installations. It also allows for overriding settings using command-line parameters, eliminating the need to modify a configuration file directly. This approach ultimately provides superior control over your system\'s setup and simplifies the management and concurrent execution of multiple Odoo versions.
Fetching the Sources
There are two primary methods to obtain the Odoo source code: as a compressed **archive** or through **Git**.
Archive Download
For the Community Edition, sources can be downloaded from:
- The Official download page
- The GitHub repository
- The Nightly server
For the Enterprise Edition, sources are available from:
Git Clone
This method requires Git to be installed on your system and a basic understanding of Git commands. When cloning a Git repository, you can choose between HTTPS and SSH. If you are unsure, HTTPS is generally the recommended option. If you are following the Getting Started developer tutorial or intend to contribute to the Odoo source code, SSH is the preferred choice.
C:\> git clone https://github.com/odoo/odoo.git
C:\> git clone https://github.com/odoo/enterprise.git
Note: The Enterprise Git repository does not contain the complete Odoo source code; it is solely a collection of additional add-ons. The core server code resides within the Community version. To run the Enterprise version, you must launch the server from the Community version and configure the `addons-path` option to include the folder containing the Enterprise version. Therefore, you need to clone both the Community and Enterprise repositories to establish a functional Odoo Enterprise installation. Refer to the Editions section for information on accessing the Enterprise repository.
Prepare the Environment for Source Installation
Before running Odoo from source, several prerequisites must be met.
Python Setup
Odoo requires Python 3.7 or a later version to operate. Visit Python’s download page to obtain and install the latest compatible version of Python 3 on your machine.
During the installation process, ensure that you check the option **Add Python 3 to PATH**. Subsequently, click **Customize Installation** and confirm that **pip** is selected for installation.
Note: If Python 3 is already installed, verify that its version is 3.7 or newer, as older versions are not compatible with Odoo. Also, confirm that pip is installed for your chosen Python version.
PostgreSQL Database
Odoo utilizes PostgreSQL as its database management system. Download and install PostgreSQL (supported versions include 12.0 and later). By default, only the `postgres` user exists, but Odoo prohibits connecting as `postgres`. Therefore, you must create a new PostgreSQL user:
- Add PostgreSQL’s `bin` directory (typically `C:\Program Files\PostgreSQL\<version>\bin`) to your system’s `PATH` environment variable.
- Create a PostgreSQL user with a password using the pgAdmin GUI:
- Open **pgAdmin**.
- Double-click the server to establish a connection.
- Select your server, then navigate to Login/Group Roles.
- Enter the desired username in the **Role Name** field (e.g., `odoo`).
- Open the **Definition** tab, enter and confirm the password (e.g., `odoo`), then click **Save**.
- Open the **Privileges** tab and ensure **Can login?** is set to `Yes` and **Create database?** is set to `Yes`.
Installing Dependencies
Before installing Odoo\'s Python dependencies, you must download and install the Build Tools for Visual Studio. When prompted during installation, select **C++ build tools** in the **Workloads** tab and proceed with their installation.
Odoo\'s Python dependencies are listed in the `requirements.txt` file, located at the root of your Odoo Community directory.
Tip: It is often advisable to maintain separate Python module packages for different Odoo instances or to avoid conflicts with your system\'s Python environment. Consider using 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 a right-to-left interface (such as Arabic or Hebrew), the `rtlcss` package is also required:
- Download and install Node.js.
- Install `rtlcss` globally using npm:
C:\> npm install -g rtlcss - Edit your System Environment\'s `PATH` variable to include the folder where `rtlcss.cmd` is located (typically: `C:\Users\<user>\AppData\Roaming\npm\`).
Important: As noted previously, `wkhtmltopdf` is not installed via **pip** and necessitates manual installation of version 0.12.5 to ensure proper support for headers and footers. Refer to our wiki for comprehensive details regarding various versions.
Running Odoo from Source
Once all dependencies are successfully set up, Odoo can be launched by executing `odoo-bin`, which is the server\'s command-line interface. This executable is located at the root of the Odoo Community directory.
To configure the server, you have the option to specify command-line arguments or utilize a configuration file.
Tip: For the Enterprise edition, it is crucial to add the path to the `enterprise` addons to the `addons-path` argument. This path must precede other paths in `addons-path` to ensure add-ons are loaded correctly.
Commonly required configurations include:
- The PostgreSQL user and password.
- Custom addon paths, beyond the default locations, for loading your own modules.
A typical command for running the server is as follows:
C:\> cd CommunityPath/
C:\> python odoo-bin -r dbuser -w dbpassword --addons-path=addons -d mydb
Here, `CommunityPath` refers to the directory where Odoo Community is installed, `dbuser` is your PostgreSQL login, `dbpassword` is your PostgreSQL password, and `mydb` is the name of your PostgreSQL database.
After the server has successfully started (indicated by the INFO log `odoo.modules.loading: Modules loaded.`), open http://localhost:8069 in your web browser. Log in using the base administrator account: enter `admin` for both the Email and Password. Congratulations, you have successfully logged into your own Odoo database!
Tip:
- From within the Odoo web interface, you can create and manage new users.
- It\'s important to distinguish between the user account used to log into Odoo\'s web interface and the [`--db_user`] command-line argument, which refers to the PostgreSQL database user.
Docker Deployment
For comprehensive instructions on integrating Odoo with Docker, please refer to the official Odoo Docker image page. This resource provides detailed documentation for both development and deployment scenarios using Docker containers.
