Welcome to the Odoo Installation repository. This guide provides detailed instructions for installing Odoo on various environments, ensuring a smooth setup for developers and system administrators.
- Introduction
- Prerequisites
- Installation
- Configuration Parameters
- Advanced Configuration
- Common Issues and Troubleshooting
- Contributing
- License
- Contact
This repository contains scripts and instructions for installing Odoo on a Linux-based server. Odoo is a comprehensive suite of business applications including CRM, e-Commerce, accounting, inventory, point of sale, project management, and more. This guide is intended to simplify the setup process, providing clear and concise steps to get your Odoo instance up and running.
Before you begin the installation, ensure that your server meets the following requirements:
- Operating System: Ubuntu 20.04 LTS or later (Recommended) or other Linux distributions.
- Processor: Dual-core processor or better.
- RAM: Minimum 2 GB (4 GB or more recommended for production).
- Disk Space: Minimum 20 GB of free space.
- Python Version: Python 3.6 or higher.
- PostgreSQL: Version 10 or higher.
Ensure you have sudo
privileges on the server.
Before starting the installation, update your system to the latest packages:
sudo apt-get update
sudo apt-get upgrade -y
Install the required dependencies for Odoo:
sudo apt-get install -y git python3-pip build-essential wget
sudo apt-get install -y python3-dev python3-venv libxml2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev libssl-dev libjpeg-dev libpq-dev
Odoo uses PostgreSQL as its database backend. Install it using:
sudo apt-get install -y postgresql postgresql-server-dev-all
Once installed, create a PostgreSQL user for Odoo:
sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo
exit
Clone the Odoo source code from the official repository:
git clone https://www.github.com/odoo/odoo --depth 1 --branch 14.0 --single-branch odoo
Create a Python virtual environment and install Odoo dependencies:
cd odoo
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Copy the sample configuration file and adjust it to your environment:
cp odoo/debian/odoo.conf /etc/odoo.conf
nano /etc/odoo.conf
Edit the configuration file to match your setup, particularly the database settings.
Start the Odoo server using the following command:
./odoo/odoo-bin -c /etc/odoo.conf
You should now be able to access Odoo at http://your-server-ip:8069
.
Before running the installation script, you can modify several parameters to customize the setup according to your needs. Below is a list of the most commonly used parameters:
-
OE_USER
: This parameter specifies the username for the system user that will be created for running Odoo. You can set this to any preferred username. -
GENERATE_RANDOM_PASSWORD
: If set toTrue
, the script will generate a random and secure password for the Odoo admin user. If set toFalse
, the password will be set to the value configured inOE_SUPERADMIN
. The default value isTrue
. -
OE_PORT
: This parameter defines the port on which Odoo will run. The default Odoo port is8069
, but you can set it to any available port on your server. -
OE_VERSION
: Specifies the version of Odoo to be installed. For example, set this to14.0
for installing Odoo version 14. -
IS_ENTERPRISE
: Set this toTrue
to install the Odoo Enterprise version on top of version16.0
. If you want to install the community version of Odoo 16, set this toFalse
. -
OE_SUPERADMIN
: This is the master password for the Odoo installation. It is crucial to set this parameter to a secure password ifGENERATE_RANDOM_PASSWORD
is set toFalse
. -
INSTALL_NGINX
: This parameter is set toTrue
by default, meaning that Nginx will be installed and configured as a reverse proxy for Odoo. Set it toFalse
if you do not want to install Nginx. -
**`
WEBSITE_NAME`**: If you are installing Nginx, set this parameter to define the website name used in the Nginx configuration.
-
ENABLE_SSL
: Set this parameter toTrue
if you wish to install certbot and configure Nginx to use HTTPS with a free Let's Encrypt SSL certificate. -
ADMIN_EMAIL
: This is required for Let's Encrypt registration whenENABLE_SSL
is set toTrue
. Replace the default placeholder with your organization's email address.
-
Both
INSTALL_NGINX
andENABLE_SSL
must be set toTrue
andADMIN_EMAIL
must be replaced with a valid email address to enable SSL through Let's Encrypt.By enabling SSL through Let's Encrypt, you agree to the following policies.
Make sure to modify these parameters in the script before running the installation to fit your specific setup requirements.
To serve Odoo over the default HTTP/HTTPS ports, set up Nginx as a reverse proxy:
sudo apt-get install nginx
Configure Nginx to forward requests to Odoo:
sudo nano /etc/nginx/sites-available/odoo
Add the necessary server configuration and then enable the site:
sudo ln -s /etc/nginx/sites-available/odoo /etc/nginx/sites-enabled/
sudo systemctl restart nginx
For secure HTTPS access, you can use Let's Encrypt:
sudo apt-get install certbot python3-certbot-nginx
sudo certbot --nginx -d yourdomain.com
Set up automatic backups to ensure data safety:
sudo nano /etc/cron.daily/odoo_backup
Add a script to perform daily backups and make it executable:
sudo chmod +x /etc/cron.daily/odoo_backup
If you encounter issues during installation or running Odoo, please refer to the Odoo documentation or visit the Odoo community forums.
Contributions to this repository are welcome. Please fork the repository, create a feature branch, and submit a pull request for review.
This repository is licensed under the MIT License. See the LICENSE file for more details.
Feel free to reach out to me via the following platforms: