An image

Corporate Blogs

How to Setup A Odoo 13 On AWS EC2 Ubuntu Instance

E-Commerce Businesses Need a Mobile App

Wondering how to set up Odoo 13 in AWS EC2 Linux instance. If yes, this is a perfect piece of writing for you. This article will walk you through the steps to set up Odoo 13 in the AWS EC2 Linux instance easy and quick. All you need to do is simply install the latest version of Odoo which is Odoo 13 in your AWS EC2.

What is Odoo and why choose AWS EC2 to run Odoo?

You might be having an idea of what is Odoo and how it really works. To start with, Odoo is a business management software that includes CRM, billing, accounting, e-commerce, manufacturing, project management, and inventory management, and much more. Odoo is a suite of integrated open source applications.

File:Odoo logo rgb.svg - Wikipedia

AWS EC2 (Amazon Elastic Compute Cloud) is known for its flexibility and scalability. You can benefit low cost and effective performance from AWS EC2.

How to Launch an AWS EC2 Ubuntu Instance 

Login in to your AWS account and launch a new AWS EC2 instance with Ubuntu 18.04 image. Once you launch an instance you will get a pem key to access the instance using SSH(Secure Shell) in Terminal. The SSH protocol uses encryption to secure the connection between a client and a server. Make sure you have downloaded the server (instance)pem file and keep it safe because without the pem file we can’t log in into the server. And there is no way other than terminating our instance and launching it again.

To connect the server we should give 400 permission for the pem file which is like giving only read permission to the owner.

ALSO READ: MongoDB In Golang With Examples – A Beginner’s Guide

Step 1: Login the server

The first thing to do is to login into the server.

 

Step 2: Installing Prerequisites

Run the following command to check if your system is up to date.

 

Step 3: Creating a System User

Create a system user to run Odoo with the home directory /opt/odoo13. I am here using Odoo 13 as the user name. You can create any name for a user as long as you create a PostgreSQL user with the same name.

 

Step 4: Installing and Configuring PostgreSQL

Odoo uses PostgreSQL as the database back-end. Run the following command to install postgresql on your system.

Once the installation is done. Create a postgresql user with the same name created previously for system user which in this case is Odoo 13.

 

Step 5: Installing Wkhtmltopdf

Wkhtmltopdf offers a set of open-source command-line that can render HTML into PDF and various image formats using the Qt WebKit rendering engine. They run entirely “headless” and do not require a display or display service.

We can download the package using the below wget command.

After downloading the package, install them by typing the below command.

 

Step 6:Installing and Configuring Odoo 13

Here, we will install Odoo from the source inside an isolated Python virtual environment.

Login into the Odoo 13 user

Clone the Odoo 13 source code from github.

Create a new Python Virtual Environment for Odoo. Move to the /opt/odoo13 directory using the cd command.

Type the following command to activate the virtual environment.

 

Step 7: Install all the required Python modules using pip3

To deactivate the virtual environment, type the command:
Create a new directory that will hold the 3rd party addons using the below command:
Type exit to switch back to your sudo user.

Create a configuration file using the following command:

Create an odoo13.conf file and copy the following lines into it.

 

Step 8: Creating a Systemd Unit File

Create a Service unit file naming Odoo13.service with the below content and add the following lines into the odoo13.service file.  

Let the systemd know that a new unit file exists. Note that Systemd is a system and service manager for Linux operating systems. It provides a standard process for controlling what programs run when a Linux system boots up. 

Start the Odoo service and allow it to start on boot by running the following command:

To see the messages logged by the Odoo service, use the command below:

Now you can access the application in the server Ip address. Open a browser and type

 

Step 9: Setup Nginx HTTP proxy for Odoo

Install the nginx web server and create a new configuration file for Odoo.

Modify this configuration file by adding the below lines.

Restart the nginx server

Now open the server and access the application using the port 80

Let’s encrypt the webserver with SSL using certbot.

 

Step 10: Installing Certbot

Install Certbot’s Nginx package with apt:
Now you can access your site securely. 
you might have never thought that setting up Odoo with AWS EC2 is this simple. I hope this tutorial really helps you to set up Odoo 13 on the AWS EC2 Linux instance. 

Do you find it interesting? you might also like these articles. Top 10 Best Tech Companies For Employees To Work In The USA In 2020 and Top 10 IT Staffing and Recruiting Agencies in the USA.

If you have a business idea in your mind and in search of a reliable web development company, you are in the right place. Hire the best web developers in the industry from Agira technologies.

Looking for a Tech partner to dominate the digital world?
Professional Life of an IT Consultant Interview with Valentin Crettaz
Written by
Murali is a Software Developer. He has great exposure in Python, AWS, Docker Tools, Linux, Networking and more. This tech enthusiast loves to share his ideas and guides with the readers.

Leave a Comment


You have an Idea. We have the Solution.

We help business evolve with lates technologies and infrastructures tailored to their needs and market trends.