Odoo offers a variety of installation methods, catering to different user needs and technical requirements. Whether you're looking for a quick trial, a fully managed cloud service, or a highly customizable local setup, there's an option for you.
This guide aims to provide a comprehensive overview of the most common installation approaches, helping you choose the best fit for your specific use case.
Understanding Odoo Installation Options
Before diving into the specifics, let's explore the various installation options available for Odoo, each designed to meet different objectives:
-
Demo Instances: These are the simplest way to experience Odoo. Ideal for getting a quick feel for the platform or trying out specific features without any commitment or local setup. Demo instances are typically ephemeral and designed for short-term exploration.
-
SaaS (Software as a Service): Odoo's SaaS offering provides fully managed instances, handled directly by Odoo S.A. This option offers ease of use and automated updates, making it suitable for both testing and long-term business operations. While highly convenient, it may present some limitations regarding system flexibility, such as restrictions on custom module development.
-
Packaged Installers: A straightforward approach to deploying Odoo locally. Packaged installers offer greater control over hosting, deployment, and data storage compared to SaaS. This method is excellent for testing, module development, and can serve as a foundation for production environments, though it shifts the maintenance responsibilities to the user.
-
Source Installation: While more involved than packaged installers, installing Odoo directly from its source code provides the highest level of flexibility and control. This method is particularly beneficial for developers who need easy access to the Odoo source, wish to run multiple Odoo versions concurrently, or intend to contribute to the project. The source code can be obtained via a tarball download or by cloning the Git repository, with Git offering superior capabilities for updates and version management.
-
Docker Image: For users familiar with Docker, an official Odoo base image is available. This option streamlines development and deployment processes within a Dockerized environment. Refer to the Docker image's documentation for detailed usage instructions.
Demo Instances
For individuals looking to gain a quick understanding of Odoo's functionalities, readily available demo instances provide an ideal solution. These are shared environments designed for short-term exploration, typically active for only a few hours. They allow users to navigate the system, experiment with various features, and get a feel for the platform without any prior commitment or complex setup.
Accessing an Odoo demo instance is incredibly simple, requiring no local installation whatsoever—just a web browser.
Odoo SaaS (Software as a Service)
Odoo's official SaaS offering delivers private, managed instances that are often available to start for free. This service is an excellent avenue for discovering and thoroughly testing Odoo's capabilities, as well as for implementing non-code customizations, all without the need for any local software installation.
Similar to demo instances, Odoo SaaS instances eliminate the necessity for local setup. All that's required to access and utilize your Odoo environment is a standard web browser, making it highly convenient and accessible.
Packaged Installers
Odoo offers convenient packaged installers designed for various operating systems, including Windows and popular Linux distributions such as Debian-based (e.g., Debian, Ubuntu) and RPM-based (e.g., Fedora, CentOS, RHEL). These packages streamline the installation process by automatically configuring all necessary dependencies.
While packaged installations simplify initial setup, users should be aware that keeping them consistently up-to-date might require manual intervention. Official packages, complete with all essential dependency requirements, are readily available on https://nightly.odoo.com.
Windows Installation
To install Odoo 8.0 on a Windows system, follow these steps:
- Download the installer from https://nightly.odoo.com/8.0/nightly/exe/odoo_8.0.latest.exe.
- Execute the downloaded file to begin the installation process.
Accept the User Account Control (UAC) prompt when it appears. Follow the on-screen instructions to complete the various installation steps.Warning: On Windows 8 and later versions, you might encounter a security prompt titled “Windows protected your PC.” If this occurs, click More Info and then select Run anyway to proceed.
Upon successful completion of the installation, Odoo will automatically start.
Configuration on Windows
The primary configuration file for Odoo on Windows systems is typically located at %PROGRAMFILES%\\Odoo 8.0-id\\server\\openerp-server.conf.
This configuration file can be modified to customize various settings, such as connecting to a remote PostgreSQL database, adjusting file storage locations, or setting a database filter. To apply any changes made to the configuration file, you must restart the Odoo service. This can be done via the Windows Services manager by navigating to Services ‣ odoo server and restarting the service.
Installation on Debian-based Distributions (Deb)
To install Odoo 8.0 on Debian-based distributions (e.g., Debian, Ubuntu), execute the following commands in your terminal as the root user:
# wget -O - https://nightly.odoo.com/odoo.key | apt-key add -
# echo "deb http://nightly.odoo.com/8.0/nightly/deb/ ./" >> /etc/apt/sources.list
# apt-get update && apt-get install odoo
These commands will automatically handle the installation of all necessary dependencies, set up Odoo as a daemon, and ensure it starts automatically.
Danger: For proper PDF report printing functionality, you are required to manually install wkhtmltopdf. The version typically available in Debian repositories often lacks support for headers and footers, which prevents it from being installed automatically. The recommended version is 0.12.1 and is available in the archive section of the wkhtmltopdf download page. If you are using Debian Jessie, for which there is no official release, an alternative can be found at http://nightly.odoo.com/extra/.
Configuration on Debian-based Systems
The Odoo configuration file for Debian-based systems is located at /etc/odoo/openerp-server.conf.
After making any edits to the configuration file, it is essential to restart the Odoo service for the changes to take effect. You can do this by running the following command:
$ sudo service odoo restart
Restarting odoo: ok
Installation on RPM-based Distributions (Fedora, CentOS, RHEL)
Warning: When working with RHEL-based distributions such as RHEL, CentOS, or Scientific Linux, it is crucial to add EPEL (Extra Packages for Enterprise Linux) to your distribution's repositories. This ensures that all of Odoo's dependencies are available. For CentOS users, this can be achieved with the following command:
$ sudo yum install -y epel-releaseFor other RHEL-based distributions, please consult the official EPEL documentation for specific instructions.
Follow these steps to install Odoo on RPM-based systems:
$ sudo yum install -y postgresql-server
$ sudo postgresql-setup initdb
$ sudo systemctl enable postgresql
$ sudo systemctl start postgresql
$ sudo yum-config-manager --add-repo\=https://nightly.odoo.com/8.0/nightly/rpm/odoo.repo
$ sudo yum install -y odoo
$ sudo systemctl enable odoo
$ sudo systemctl start odoo
Danger: Similar to Debian-based installations, printing PDF reports requires the manual installation of wkhtmltopdf. The versions typically found in Fedora/CentOS repositories do not support headers and footers, making manual installation necessary. Please download the recommended version from the wkhtmltopdf download page.
Configuration on RPM-based Systems
The Odoo configuration file on RPM-based systems is located at /etc/odoo/openerp-server.conf.
Any modifications to the configuration file necessitate a restart of the Odoo service. This is managed via SystemD:
$ sudo systemctl restart odoo
Source Installation
The "source installation" method involves running Odoo directly from its source code rather than installing it via pre-packaged binaries. This approach offers significant advantages, particularly for module developers and those requiring fine-grained control over their Odoo environment.
Running from source provides easier access to the Odoo code, which is invaluable for development, debugging, or even building documentation offline. It also grants more flexible and explicit control over starting and stopping Odoo, bypassing the service management inherent in packaged installations. Furthermore, settings can be overridden using command-line parameters, eliminating the need to constantly edit configuration files. Ultimately, source installation allows for greater customization of the system setup and facilitates the simultaneous operation of multiple Odoo versions.
Obtaining the Odoo Source Code
There are two primary methods for acquiring the Odoo source code:
-
Download a Zip Archive: The Odoo source code can be downloaded as a zip file from https://nightly.odoo.com/8.0/nightly/src/odoo_8.0.latest.zip. Once downloaded, the file will need to be uncompressed to access its contents.
-
Clone with Git: Utilizing Git offers a more robust solution for managing the Odoo source code, simplifying updates, and allowing for easy switching between different Odoo versions, including the latest development branches. It also streamlines the process of maintaining custom patches and contributing to the project. The main consideration for using Git is that the repository is significantly larger than a simple tarball, as it contains the entire project history. The official Git repository is located at https://github.com/odoo/odoo.git.
To download the repository, you will need a Git client (which may already be available on Linux distributions). Execute the following command:
$ git clone https://github.com/odoo/odoo.git
Installing Dependencies for Source Installation
A source installation of Odoo requires the manual installation of several key dependencies:
-
Python 2.7:
- On Linux and OS X, Python 2.7 is typically included by default.
- On Windows, use the official Python 2.7.9 installer.
Warning: During installation, ensure you select the option to “add python.exe to Path” and reboot your system afterward to guarantee the PATH variable is updated correctly.
Note: If Python is already installed, verify that it is version 2.7.9. Earlier versions may be less convenient, and Python 3.x versions are not compatible with Odoo 8.0.
PostgreSQL (for local database usage):
After installing PostgreSQL, it's necessary to create a dedicated PostgreSQL user, as Odoo prohibits connections using the default 'postgres' user.
- On Linux, install PostgreSQL using your distribution’s package manager. Then, create a PostgreSQL user with the same name as your current Unix login using the following command:
$ sudo su - postgres -c "createuser -s $USER"
This setup allows for password-less connections via Unix sockets, as the role login matches your Unix login.
On OS X, postgres.app is often the simplest way to get started. Afterward, create a PostgreSQL user following the same procedure as described for Linux. On Windows, install PostgreSQL for Windows. Then:- Add PostgreSQL’s bin directory (e.g., C:\\Program Files\\PostgreSQL\\9.4\\bin) to your system's PATH environment variable.
- Create a PostgreSQL user with a password using the pgAdmin GUI. Open pgAdminIII, double-click the server to establish a connection, then navigate to Edit ‣ New Object ‣ New Login Role. Enter a username (e.g., 'odoo') in the Role Name field, switch to the Definition tab, set a password (e.g., 'odoo'), and click OK.
The specified username and password must be provided to Odoo either through the -w and -r command-line options or within the Odoo configuration file.
Python Dependencies (from requirements.txt):
- On Linux, Python dependencies can often be installed via your system’s package manager or using pip. For libraries that involve native code (such as Pillow, lxml, greenlet, gevent, psycopg2, and ldap), you might need to install development tools and their native dependencies first. These are typically found in
-devor-develpackages for Python, Postgres, libxml2, libxslt, libevent, libsasl2, and libldap2. Once these prerequisites are met, the Python dependencies can be installed using pip:
$ pip install -r requirements.txt
On OS X, begin by installing the Command Line Tools (xcode-select --install). Then, install a package manager of your choice (e.g., Homebrew, MacPorts) to manage non-Python dependencies. After that, pip can be used to install Python dependencies, similar to the Linux process:
$ pip install -r requirements.txt
On Windows, some dependencies require manual installation, and the requirements.txt file needs a slight modification before running pip for the remaining ones.
- Install psycopg using the installer available at http://www.stickpeople.com/projects/python/win-psycopg/.
- Edit the
requirements.txtfile:- Remove
psycopg2, as it has been installed manually. - Remove the optional
python-ldap,gevent, andpsutil, as they typically require compilation. - Add
pypiwin32, which is essential for Windows environments.
- Remove
- Then, use pip to install the remaining dependencies. From a
cmd.exeprompt, navigate to your Odoo path and execute:
C:\> cd \YourOdooPath
C:\YourOdooPath> C:\Python27\Scripts\pip.exe install -r requirements.txt
(Replace \YourOdooPath with the actual directory where you downloaded Odoo.)
Less CSS via Node.js:
- On Linux, use your distribution’s package manager to install Node.js and npm.
Warning: For Debian Wheezy and Ubuntu 13.10 and earlier, Node.js must be installed manually:
$ wget -qO- https://deb.nodesource.com/setup | bash - $ apt-get install -y nodejsFor newer Debian versions (>Jessie) and Ubuntu versions (>14.04), you might need to create a symlink, as npm packages typically call 'node' while Debian refers to the binary as 'nodejs':
$ apt-get install -y npm $ sudo ln -s /usr/bin/nodejs /usr/bin/node
Once npm is successfully installed, use it to install both less and less-plugin-clean-css globally:
$ sudo npm install -g less less-plugin-clean-css
On OS X, install Node.js using your preferred package manager (e.g., Homebrew, MacPorts). Afterward, install less and less-plugin-clean-css globally:
$ sudo npm install -g less less-plugin-clean-css
On Windows, install Node.js, then reboot your system to ensure the PATH environment variable is updated. Finally, install less and less-plugin-clean-css globally from your command prompt:
C:\> npm install -g less less-plugin-clean-css
Running Odoo from Source
Once all the necessary dependencies have been installed and configured, Odoo can be launched by executing the odoo.py script.
Configuration settings can be applied either through command-line arguments directly when launching Odoo, or by defining them within a dedicated configuration file.
Key configuration parameters that are frequently required include:
-
PostgreSQL Connection Details: This encompasses the PostgreSQL host, port, username, and password. By default, Odoo leverages psycopg2’s default settings, which means it attempts to connect over a UNIX socket on port 5432 using the current system user without a password. This setup typically functions seamlessly on Linux and OS X. However, it will not work on Windows, as Windows environments do not support UNIX sockets for PostgreSQL connections.
-
Custom Addons Path: This parameter allows you to specify additional directories beyond the default locations where Odoo should look for your custom modules.
For Windows users, a typical command to execute Odoo might look like this:
C:\\YourOdooPath> python odoo.py -w odoo -r odoo --addons-path=addons,../mymodules --db-filter=mydb$
In this example, 'odoo' and 'odoo' represent the PostgreSQL login username and password, respectively. ../mymodules specifies an additional directory containing custom addons, and mydb$ sets the default database to be served on localhost:8069.
On Unix-like systems, a similar execution command would be:
$ ./odoo.py --addons-path=addons,../mymodules --db-filter=mydb$
Here, ../mymodules indicates a directory with supplementary addons, and mydb$ denotes the default database to be served on localhost:8069.
