Install Odoo 11 on AWS EC2
Odoo 11 can be deployed on an AWS EC2 instance running Ubuntu. This guide covers installing Odoo from the official repository and configuring it for production use.
Prerequisites
- AWS EC2 instance (Ubuntu 16.04 or 18.04, t2.medium or larger recommended)
- Security group with ports 22, 80, 443, and 8069 open
- A domain name pointed to the EC2 Elastic IP (optional)
Steps
# Update system
sudo apt-get update && sudo apt-get upgrade -y
# Install dependencies
sudo apt-get install -y git python3-pip build-essential wget python3-dev python3-venv \
libxslt-dev libzip-dev libldap2-dev libsasl2-dev node-less
# Create Odoo system user
sudo adduser --system --home=/opt/odoo --group odoo
# Install PostgreSQL
sudo apt-get install -y postgresql
sudo su - postgres -c "createuser -s odoo"
# Install wkhtmltopdf
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/\
wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
# Clone Odoo 11
sudo git clone --depth 1 --branch 11.0 https://www.github.com/odoo/odoo \
/opt/odoo/odoo
# Install Python requirements
cd /opt/odoo/odoo
sudo pip3 install -r requirements.txt
# Create config file
sudo cp /opt/odoo/odoo/debian/odoo.conf /etc/odoo.conf
sudo chown odoo: /etc/odoo.conf
# Start Odoo
sudo -u odoo /opt/odoo/odoo/odoo-bin -c /etc/odoo.conf
Verify
Open http://<EC2-IP>:8069 in a browser. The Odoo setup wizard should appear.
Notes
- Place Nginx in front of Odoo on port 80/443 for production use.
- Set
xmlrpc_interface = 127.0.0.1in/etc/odoo.confso Odoo only listens on localhost when Nginx handles external requests.