Linux, Web Hosting, and Everything Else in Between
Linux, Web Hosting, and Everything Else in Between

How to Install Odoo on CentOS

In this tutorial, we’re going to show you how to install Odoo 14 on a CentOS 8 server using Docker.

After we published our How to Install Odoo on Ubuntu tutorial, there were many requests to do one for CentOS too, so here we go.

These instructions are similar for other CentOS versions too.

If you get a fully managed Odoo server at SolaDrive, they will install Odoo for you for free.
Go to SolaDrivew

1. Buy a CentOS server for Odoo

You will need a CentOS server to run Odoo on. SolaDrive has great options with affordable pricing. They offer fully managed support, so they will manage the server for you and help you install Odoo. For other options, go to this page.

We recommend a server with at least 2GB of RAM.

If you plan on using Odoo locally, you don’t need to buy a server, so skip this step.

2. Update your server

Before we proceed with anything, update your CentOS server by running the following command:

yum update

3. Install Docker

We’ll be using Docker to deploy Odoo. If it’s already installed on your server, skip this step.

First, install the yum-utilis package if it’s not already installed:

yum install yum-utils

Then, add the Docker repo:

yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo

And finally, run the following command to install Docker:

yum install docker-ce docker-ce-cli containerd.io

Next, start Docker and enable it at boot:

systemctl start docker
systemctl enable docker

You can test is Docker is installed properly by running the Hello World image:

docker run hello-world

4. Install PostgreSQL

Odoo needs PostgreSQL to run. To install PostgreSQL using docker, run the following command:

docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:10

You can change the name and use a stronger password.

5. Install Odoo

After you’re done with PostgreSQL, you can move onto installing Odoo.

To install Odoo using Docker, run the following command:

docker run -p 8069:8069 --name odoo --link db:db -t odoo

This will install the latest version of Odoo (14 as of writing)

And that’s it. Odoo is now installed on your CentOS server. You can finish the installation by visiting your.server.ip:8069

(Optional) Next Steps

You can now install and set up Nginx as a reverse proxy if you plan on using your domain name. You can also set up a free SSL (HTTPS) with Let’s Encrypt. This repo will help you set up Odoo with Nginx and Let’s Encrypt. Our tutorial for Ubuntu has detailed instructions on how to set up Odoo with Nginx and Let’s Encrypt.

Make sure you keep your Odoo server secure and up to date. If you don’t know how to do that, get a managed VPS.

FAQ About Installing Odoo on CentOS

Here are a few frequently asked questions (with answers) about installing Odoo on a CentOS server:

How do I install extra addons?

Run the following command to mount an extra add-on for your Odoo instance:

docker run -v /your/location/for/addons:/mnt/extra-addons -p 8069:8069 --name odoo --link db:db -t odoo

Can I run multiple Odoo instances on the same server?

Yes, you can! Installing another Odoo instance can be done with a single command:

docker run -p 8070:8069 --name odoo2 --link db:db -t odoo

And just follow the other steps. Make sure you use a different port and name for all your other instances.

Any other questions?

Leave a comment below!

Leave a comment

Your email address will not be published. Required fields are marked *