How to: Install Odoo on a Debian 9 SkySilk VPS


Odoo is an all-in-one management software that offers a range of business applications that form a complete suite of enterprise management applications targeting companies of all sizes.

The following is a step by step guide on how to install and host Odoo on a Debian 9 SkySilk VPS Server.


Upgrade and Update Server

As with any new server deployment it is a good idea to make sure it is up to date before installing new applications. To update the package manager and upgrade installed packages run

apt update
apt upgrade -y


Install and Enable PostgreSQL

Odoo requires PostgreSQL to operate as its database. To install it and ensure it will start on reboot run

apt install postgresql -y
service postgresql start


Add the Odoo Repository and Install

Odoo is not available from the default Debian 9 package sources. To add the Odoo repository and install it run

wget -O - htt<span class="fr-marker" data-id="0" data-type="false" style="display: none; line-height: 0;"></span><span class="fr-marker" data-id="0" data-type="true" style="display: none; line-height: 0;"></span>ps://nightly.odoo.com/odoo.key | apt-key add -
echo "deb http://nightly.odoo.com/12.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list
apt update
apt install odoo -y

To verify the service is running you can run

service odoo status


Admin Password Configuration

It is a good idea to set a strong password for admin access. To edit the /etc/odoo/odoo.conf run

nano /etc/odoo/odoo.conf

The setting you want to remove the comment and change is

admin_passwd = YourPassword

To enable the configuration changes you need to restart the Odoo service

service odoo restart


Accessing the Odoo Web Interface

You can now access the Odoo web interface. To do this open your web browser and enter

http://YourSkySilkVPSIPAddress:8069

You should see the initial admin configuration page

You can use the admin password configured in /etc/odoo/odoo.conf to create the database. This will then redirect you to the admin panel where you can log in as the admin user.


If you wish to access the Odoo web interface using a domain name you will need to register a domain name and configure a proxy web server.


Installing and Configuring the Apache Web Server

To install and enable the Apache web server run

apt install apache2 -y
service apache2 start


In order to access the Odoo web interface with just a domain name you will need to configure reverse proxy settings for the Apache web server.

This requires two Apache modules to be enabled. To enable them run

a2enmod proxy
a2enmod proxy_http


Note: 'your_domain_name' is the domain name registered at your preferred DNS registrar pointing to your SkySilk VPS IP Address


Next you need to configure the reverse proxy settings. To open a new configuration file run

nano /etc/apache2/sites-available/your_domain_name.conf

Enter the following

<VirtualHost *:80>
ServerName your_domain_name
ServerAlias www.your_domain_name

ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass / http://your_domain_name:8069/
ProxyPassReverse / http://your_domain_name:8069/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>


To enable these settings create a symbolic link from sites-available to sites-enabled

ln -s /etc/apache2/sites-available/your_domain_name.conf /etc/apache2/sites-enabled/your_domain_name.conf


Restart the Apache web server for the changes to take effect

service apache2 restart

You should now be able to access the Odoo web interface at http://your_domain_name


Additional Server Hardening

As with any internet accessible service it is a good idea to do at least some basic hardening to prevent malicious users from compromising your VPS. A good first layer of defense is disabling all unnecessary ports. You can do this using a firewall. To set up and configure a basic firewall run

apt install ufw -y
ufw allow ssh
ufw allow http
ufw allow https
ufw enable
ufw status

This will install Uncomplicated Firewall and allow only access to your VPS via ports 22, 80, 443. This allows you to administer your VPS via SSH, and access the Web interface via HTTP and HTTPS, blocking all other ports.


For a more in depth guide on how to use UFW to protect your VPS please check out the following documentation

UFW Documentation


Adding an SSL certificate to connect to your service via HTTPS is another simple way to enhance security. The following guide will show you how to add an SSL Certificate to your VPS.

How to: Install Certbot-auto on SkySilk Linux Vps to Create SSL Certificates


For additional resources on specifics of using Odoo, please consult the Odoo Support and Community reference material:

Odoo Support Forums

Odoo Documentation

Odoo FAQ


CLICK HERE TO DEPLOY A HOSTED DEBIAN SERVER


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.