In this tutorial, we will explain how to install Odoo on a Debian 8 VPS with Nginx as a reverse proxy. There are multiple ways to install Odoo, but in this tutorial we will install the latest Odoo 8.0 from the official Odoo repositories using the debian package manager. This guide should work on other Linux VPS systems as well but was tested and written for an Debian 8 VPS.
Login to your VPS via SSH
ssh user@vps
Update the system and install necessary packages.
[user]$ sudo apt-get update [user]$ apt-get -y upgrade [user]$ sudo apt-get install curl
Install Odoo
Installing Odoo with apt-get is a quick and easy process.
Fetch and install the Odoo GnuPG key:
[user]$ curl -sS https://nightly.odoo.com/odoo.key | sudo apt-key add -
Add the official Odoo repository:
[user]$ sudo sh -c 'echo "deb http://nightly.odoo.com/8.0/nightly/deb/ ./" > /etc/apt/sources.list.d/odoo.list'
Update the packages list and install Odoo:
[user]$ sudo apt-get update [user]$ sudo apt-get -y install odoo
The command above will automatically install all Odoo dependencies and start the Odoo daemon.
When the installation is complete, edit the configuration file and set the master admin password:
[user]$ sudo vim /etc/odoo/openerp-server.conf
admin_passwd = YourStrongPassword
Restart Odoo for changes to take effect:
[user]$ sudo systemctl restart odoo
If you want to print PDF reports in Odoo, you need to install the Wkhtmltopdf package:
[user]$ sudo apt-get -y install wkhtmltopdf
Install and Configure Nginx
The latest version of Nginx, version 1.8 is not available via the default Debian repositories, so we will add the Dotdeb repository.
Same as before first fetch and install the DotDeb GnuPG key:
[user]$ curl -sS http://www.dotdeb.org/dotdeb.gpg | sudo apt-key add -
Add the DotDeb repository:
[user]$ sudo sh -c 'echo "deb http://packages.dotdeb.org jessie all" > /etc/apt/sources.list.d/dotdeb.list'
Update the the packages list and install Nginx:
[user]$ sudo apt-get update [user]$ sudo apt-get -y install nginx
Create a new Nginx server block with the following content:
[user]$ sudo vim /etc/nginx/sites-available/your-odoo-site.com
upstream oddo { server 127.0.0.1:8069; } server { listen 80 default; server_name your-odoo-site.com; access_log /var/log/nginx/oddo.access.log; error_log /var/log/nginx/oddo.error.log; proxy_buffers 16 64k; proxy_buffer_size 128k; location / { proxy_pass http://oddo; proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; } location ~* /web/static/ { proxy_cache_valid 200 60m; proxy_buffering on; expires 864000; proxy_pass http://oddo; } }
Activate the server block by creating a symbolic link and restart nginx
[user]$ sudo ln -s /etc/nginx/sites-available/your-odoo-site.com /etc/nginx/sites-enabled/your-odoo-site.com
[user]$ sudo systemctl restart nginx
That’s it. You have successfully installed Odoo with Nginx as a reverse proxy on your Debian 8 VPS. Now open your browser, type the address of your website and create a database and admin user.
For more information about how to manage your Odoo installation, please refer to the Odoo documentation.
Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to setup this for you. They are available 24×7 and will take care of your request immediately.
We also have another detailed guide on how to install Odoo 11 on Debian 9 using Nginx as a reverse proxy on our blog, if you have switched to the newer version by now.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.
Hi there,
is there a way of installing odoo9 on a debian8 system as well?
Many thanks!
Hi,
we have a tutorial on how to install Odoo 9 on Ubuntu 14.04 at https://www.rosehosting.com/blog/install-odoo-9-on-ubuntu-14-04/ the instructions are the same for Debian too. If you are our customer, contact support and they will install it for you for free.
Thanks.