Categories
Odoo Programming web

How to deploy Odoo ERP on Digital Ocean for 5$ per month

You don’t need to spend tones of money to start manage your business wisely. Here is how to deploy for 5$ per month Odoo on Digital Ocean, step by step.

You don’t need to spend tones of money to start manage your business wisely. Here is how to deploy for 5$ per month Odoo on Digital Ocean, step by step.

1 – First you need to create a Digital Ocean account

You can create an account using my referral link to get 100$ credit to start using your Google or GitHub account or your email.

2 – Then a droplet

Once you created your Digital Ocean account, it’s time to create a Droplet and add your ssh key

You can generate you ssh key using ssh-keygen and add it to your droplet. (Don’t pass your private key! The public key!)

3 – SSH to droplet

To ssh to the droplet you need to copy get the droplet’s ip address and go the the terminal (on Linux or use PuTTy on Windows) and type:

ssh root@your-droplet-ip-adress

4 – Execute Yenthe Van Ginneken’s installation script to install Odoo

Odoo 13: Installation script https://raw.githubusercontent.com/Yenthe666/InstallScript/13.0/odoo_install.sh

Ref: https://www.odoo.yenthevg.com/installing-odoo-11-enterprise-ubuntu/

5 – Now we need to redirect port 8069 to port 80 on Nginx after Odoo installation

Thanks to Shane Piper video that helped make my tutorial.

First you need to install Nginx.

apt install nginx

Then navigate to:

cd /etc/nginx/sites-available

Locate the following block:

server_name _;

location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
       try_files $uri $uri/ =404;
}

and replace it with:

server_name _;

location / {
        proxy_pass http://localhost:8069;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;

}

Check that the syntax is right using:

nginx -t

You should get

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Now we should reload nginx

systemctl reload nginx.service

6 – Purshase a domain domain and point it to the Digital Ocean nameservers

You can purchase your domain using my affiliate link on Hostgator

7 – Point your domain name to Digital Ocean’s Nameservers


To point your domain name to Digital Ocean nameserver, go to your domain name provider account and set the name servers to:

ns1.digitalocean.com
ns2.digitalocean.com
ns3.digitalocean.com

8 – Get our domain name secured using Let’s Encrypt

First we need to ssh to our Droplet and Install certbot

add-apt-repository ppa:certbot/certbot
apt update
apt install python-certbot-nginx

Then we need to add our domain name in default Nginx file

nano /etc/nginx/sites-availables/default

Search for

server_name _;

and replace it with

server_name YOURDOMAINNAME.COM;

Execute:

ufw allow 'Nginx Full'

Then execute

ufw enable

Finally execute

ufw allow 'OpenSSH'

To check everything execute:

ufw status

You should get

Status: active

To                         Action      From
--                         ------      ----
Nginx Full                 ALLOW       Anywhere                  
OpenSSH                    ALLOW       Anywhere                  
Nginx Full (v6)            ALLOW       Anywhere (v6)             
OpenSSH (v6)               ALLOW       Anywhere (v6)    

Time to execute certbot

Execute:

certbot --nginx -d erpodootraining.online

Enter and email and agree to the terms. Don’t forget to select option 2 when asked if you want to redirect all traffic trough HTTPS.

After refreshing you should see a padlock.

Congratulations! You have a fully functional ERP for 5$ a month!

Don’t forget to subscribe to the newsletter and share on social networks 🙂

Update 04-07-2020

Yenthe Van Ginneken raised an important flag, some people may experience issues using the smallest Droplet (1 GB / 1 CPU) available on Digital Ocean at 5$, and he advises using at least a 10$ configuration to have a stable solution. This issues may occur when having a spike in traffic , or when doing an import .

Waring on

HIGHT TRAFFIC
IMPORTS IN ODOO

By gharib larbi

I am an electrical engineer who loves programming. I like drawing and think and imagine my next video about cooking or how to fix my laptop or my cell. I gave myself a goal to fly a plane. I still have a lot of ideas to come.

8 replies on “How to deploy Odoo ERP on Digital Ocean for 5$ per month”

Hello Larbi.
Many thanks for this excellent post 🙂
Tell me, I have a question?
What if I want to add a custom module in my droplet ???

I have some trouble.
I have installed
“apt install python-certbot-nginx” .

When i tried to access
“nano /etc/nginx/sites-availables”

then it was just blank.
please let me know what you need to help.
I am looking forward hearing from you.

Best regards,
j

Yes, Thank you.
In your description above it was not mentioned.

“Then we need to add our domain name in default Nginx file

nano /etc/nginx/sites-availables”

I had to use
“nano /etc/nginx/sites-available/default”
as some other tutorial used “sites-available” without s
Sorry, new to this. 🙂
Thank you very much for your Instruction and video. it helped me a lot.

Hello! I want to develop custom modules on the platform. But i am unable to find the right path for files. I tried accessing the files with Filezilla but am facing difficulties in locating the core directory..

How do I connect my Odoo to Pycharm?

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.