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
Honestly, don’t. Those droplets have so little RAM that if you have just a little spike in traffic or doing an import it’ll run stuck. Heck, I even heard people their install failed because the droplet failed in a package install. Just buy a 10$ one.
— Yenthe Van Ginneken (@Yenthe666) April 7, 2020
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 need help,
I am getting an internal error
Hi Kashyap,
What’s the error?
Larbi
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
Hi,
I think you want to edit “nano /etc/nginx/sites-availables/default”
Larbi
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.
I just fixed it. Thank you for your comment 🙂
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?