How to install Odoo 14 on Ubuntu 20.04

In this tutorial we are going to show you how to install Odoo 14 (Community Edition) on an Ubuntu 20.04 server with Nginx as reverse proxy and HTTPS via a free SSL certificate (Let's Encrypt).

The instructions are the same for other versions of Ubuntu as well.

Step 1: get a server for Odoo

The first is the first – you need a server. We recommend purchasing a server from SolaDrive. They specialize in Odoo hosting and offer fully managed support for your server as well as some support for Odoo itself. You can install Odoo for you for free if you can get a server from them.

Alternatively, if you manage a server yourself and know what you're doing, you can get an unmanaged server from Vultr.

You can find more options on this page. Get a server with at least 2GB of RAM. The more the better.

If you want to use Odoo locally, you don't need a server and you can just move on to the next step.

Step 2: Log in as root and update the server

Next, log into the server and update it before starting the actual Odoo installation:

apt-get update && apt-get upgrade

If the server you are using is unmanaged, you should properly configure and secure the server. Make sure you keep it up to date and keep backups. If you've got a server from SolaDrive, it's fully managed so it does most of the work for you.

Step 3: Install PostgreSQL and other packages

Odoo requires PostgreSQL. Run the following command to install it and some other packages we will need for this tutorial:

apt-get install postgresql nano wget

Step 4: Install Odoo

We will be using the nightly package installer for Odoo. Run the following commands:

wget -O – | add apt-key –
echo "deb ./" >> /etc/apt/sources.list.d/odoo.list
apt-get update && apt-get install odoo

This will add the repository and install the community edition of Odoo with all its dependencies.

Step 5: Start Odoo and activate it on boot

If you've run the package installer, Odoo may already be running. You can check the status by running this command:

systemctl status odoo

If it's not running, you can start it with the following command:

systemctl start odoo

Run the following command to allow Odoo to start on boot:

systemctl enable odoo

Step 6: Finish the Odoo installation

To complete the installation you need to create a database and do the final step by looking at your server's IP address on port 8069. This is the standard port for Odoo.

So visit http: // yourserversip: 8069

and fill in the details, everything is self explanatory. In this step, a database is created that you can optionally fill with demo data.

Once this step is complete, you can use Odoo and install apps.

If you want to use a domain name instead of your server's IP address, you'll need to set up a reverse proxy.

(Optional) Step 7: Set up Nginx as a reverse proxy with HTTPS (Let's Encrypt).

First, install nginx and certbot with the following command:

apt-get install nginx python3-certbot-nginx

Then start the Nginx service if it has not already started and enable it at boot:

systemctl start nginx
systemctl enable nginx

Next, edit the Odoo configuration file

nano /etc/odoo/odoo.conf

and set proxy_mode to True (default to False):

proxy_mode = True

Then create a Nginx configuration file for Odoo:

nano /etc/nginx/conf.d/odoo.conf

And add the following:

Upstream Odoo {

Server {
hear 80;
Server name;
root / usr / share / nginx / html;
index index.html index.htm;
access_log /var/log/nginx/;
error_log /var/log/nginx/;

Location / {
proxy_pass http: // odoo;
# Force timeouts when the backend dies
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;

# Set header
proxy_set_header Host $ host;
proxy_set_header X-Real-IP $ remote_addr;
proxy_set_header X-Forwarded-For $ proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;

# cache some static data in memory for 60 minutes
Location ~ * / web / static / {
proxy_cache_valid 200 60m;
proxy_buffering on;
expires 864000;
proxy_pass http: // odoo;

Make sure to replace "" with your own domain name.

Do the following to test the configuration file:

nginx -t

If everything is fine, just restart Nginx and use your domain:

restart systemctl nginx

You can stop here if you don't need SSL (HTTPS).

To install a free Let's Encrypt SSL for your domain, do the following:

certbot –nginx -d

Use your own domain name instead of "" of course.

Follow the self-explanatory instructions. Make sure that certbot sets up the redirection from http to https (option 2).

If you are using a firewall, make sure you allow the ports for https with the following commands:

ufw allow & # 39; Nginx Full & # 39;
ufw reload

And that's it. Now you can use Odoo at or whatever your domain name is.

How do I update Odoo on Ubuntu?

If a newer version of Odoo has been released, you can upgrade to it on the same server that you are currently using. In short, just follow this installation tutorial one more time, but for the newer version. Make sure you don't delete the old database.

Comments are closed.