Odoo Deployment on AWS EC2 with Custom Domain & SSL (znova.in)
1. AWS EC2 Instance Setup
Step 1: Launch Instance
- Login to AWS Console
- Navigate to EC2 → Instances
- Click Launch Instance
Configuration:
- AMI: Ubuntu (24.xx LTS)
- Instance Type: t2.micro (or default)
- Key Pair: Create new → Download .pem file
- Storage: Default
- Network: Default VPC
2. Connect to EC2 via SSH
Command:
ssh -i Ayush.pem ubuntu@54.160.135.80
Explanation:
- ssh → Command used to securely connect to a remote server
- -i Ayush.pem → Path to your private key file downloaded while creating the instance
- If the file is in your current folder → just use filename
- Otherwise → provide full path, for example:
3. Install Odoo
https://github.com/yenthe666/installscript
Follow Instruction of above link to install odoo in aws ubantu server.
4. Configure AWS Security Group
| Type | Port | Source |
|---|---|---|
| SSH | 22 | 0.0.0.0/0 |
| Custom TCP | 8069 | 0.0.0.0/0 |
| HTTP | 80 | 0.0.0.0/0 |
| HTTPS | 443 | 0.0.0.0/0 |
5. Verify Odoo
service odoo-server status sudo tail -f /var/log/odoo/odoo-server.log
6. Domain Setup (Hostinger)
| Type | Name | Value |
|---|---|---|
| A | @ | 54.160.135.80 |
| A | www | 54.160.135.80 |
7. Nginx Setup
sudo apt install nginx -y
sudo nano /etc/nginx/sites-available/odoo
server {
listen 80;
server_name znova.in www.znova.in;
location / {
proxy_pass http://127.0.0.1:8069;
}
}
sudo ln -s /etc/nginx/sites-available/odoo /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx
8. SSL Setup
sudo apt install certbot python3-certbot-nginx -y sudo certbot --nginx -d znova.in -d www.znova.in
9. Odoo Logs & Debugging
tail -f /var/log/odoo/odoo-server.log grep -i error /var/log/odoo/odoo-server.log
10. Addons Management
ls ~/odoo-server/addons mkdir ~/odoo-server/custom_addons
Update config:
sudo nano /etc/odoo-server.conf addons_path = /home/odoo/odoo-server/addons,/home/odoo/odoo-server/custom_addons
11. Create SSH User (No PEM Login)
sudo adduser deploy sudo usermod -aG sudo deploy sudo mkdir /home/deploy/.ssh sudo nano /home/deploy/.ssh/authorized_keys
Paste your local public key.
chmod 600 /home/deploy/.ssh/authorized_keys chown -R deploy:deploy /home/deploy/.ssh
Login:
ssh deploy@54.160.135.80
12. Nginx Logs
tail -f /var/log/nginx/error.log
13. Restart Services
sudo systemctl restart nginx sudo service odoo-server restart
14. Final Architecture
User → Domain → Nginx → Odoo
Odoo Deployment on AWS EC2 with Custom Domain & SSL (znova.in)
1. AWS EC2 Instance Setup
Step 1: Launch Instance
- Login to AWS Console
- Navigate to EC2 → Instances
- Click Launch Instance
Configuration:
- AMI: Ubuntu (24.xx LTS)
- Instance Type: t2.micro (or default)
- Key Pair: Create new → Download .pem file
- Storage: Default
- Network: Default VPC
2. Connect to EC2 via SSH
Command:
ssh -i Ayush.pem ubuntu@54.160.135.80
Explanation:
- ssh → Command used to securely connect to a remote server
- -i Ayush.pem → Path to your private key file downloaded while creating the instance
- If the file is in your current folder → just use filename
- Otherwise → provide full path, for example:
3. Install Odoo
https://github.com/yenthe666/installscript
Follow Instruction of above link to install odoo in aws ubantu server.
4. Configure AWS Security Group
| Type | Port | Source |
|---|---|---|
| SSH | 22 | 0.0.0.0/0 |
| Custom TCP | 8069 | 0.0.0.0/0 |
| HTTP | 80 | 0.0.0.0/0 |
| HTTPS | 443 | 0.0.0.0/0 |
5. Verify Odoo
service odoo-server status sudo tail -f /var/log/odoo/odoo-server.log
6. Domain Setup (Hostinger)
| Type | Name | Value |
|---|---|---|
| A | @ | 54.160.135.80 |
| A | www | 54.160.135.80 |
7. Nginx Setup
sudo apt install nginx -y
sudo nano /etc/nginx/sites-available/odoo
server {
listen 80;
server_name znova.in www.znova.in;
location / {
proxy_pass http://127.0.0.1:8069;
}
}
sudo ln -s /etc/nginx/sites-available/odoo /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx
8. SSL Setup
sudo apt install certbot python3-certbot-nginx -y sudo certbot --nginx -d znova.in -d www.znova.in
9. Odoo Logs & Debugging
tail -f /var/log/odoo/odoo-server.log grep -i error /var/log/odoo/odoo-server.log
10. Addons Management
ls ~/odoo-server/addons mkdir ~/odoo-server/custom_addons
Update config:
sudo nano /etc/odoo-server.conf addons_path = /home/odoo/odoo-server/addons,/home/odoo/odoo-server/custom_addons
11. Create SSH User (No PEM Login)
sudo adduser deploy sudo usermod -aG sudo deploy sudo mkdir /home/deploy/.ssh sudo nano /home/deploy/.ssh/authorized_keys
Paste your local public key.
chmod 600 /home/deploy/.ssh/authorized_keys chown -R deploy:deploy /home/deploy/.ssh
Login:
ssh deploy@54.160.135.80
12. Nginx Logs
tail -f /var/log/nginx/error.log
13. Restart Services
sudo systemctl restart nginx sudo service odoo-server restart
14. Final Architecture
User → Domain → Nginx → Odoo