How to Install Odoo 10 with subdomain filtering

We’ll show you, How to Install Odoo 10 with subdomain filtering. In this tutorial, we will show you how to install Odoo 10 on an Ubuntu 16.04 VPS and configure it to use sub-domain filtering so users can run multiple Odoo instances on different sub-domains (with a different database for each subdomain).

Make sure your OS package list and the OS packages are up to date by running the following commands:

sudo apt-get update
sudo apt-get upgrade

Then, start with the Odoo 10 installation. The easiest way to install Odoo 10 on your Linux VPS is to use the Odoo install script available at, so download the script to a directory on your server:

cd /opt

Edit the script and change the Odoo master password. Also, you can change the Odoo username, Odoo install path, Odoo port number, Odoo version (Enterprise, Community) etc.

#set the superadmin password

Replace ‘admin’ with a strong password, e.g.:


Make the Odoo install script executable:

chmod +x

Run the Odoo install script and allow some time for the installation process to complete.


Once the Odoo 10 installation is complete, edit the Odoo configuration file (/etc/odoo-server.conf) and configure it for subdomain filtering, i.e. add dbfilter = ^%d$ to it:

vi /etc/odoo-server.conf
; This is the password that allows database operations:
admin_passwd = Adm1NPa55w0^D
db_host = False
db_port = False
db_user = odoo
db_password = False
dbfilter = ^%d$
addons_path = /usr/lib/python2.7/dist-packages/odoo/addons
logfile = /var/log/odoo/odoo-server.log
xmlrpc_port = 8069

Do not forget to replace the Odoo master password with the one you set in the Odoo install script. Also if you modified Odoo addons_path, Odoo port number or so, you need to change them to the Odoo configuration too.

Edit the Odoo script:

vi /odoo/odoo-server/odoo/tools/


"--db-filter", dest="dbfilter", my_default='.*'


"--db-filter", dest="dbfilter", my_default='%d'

Then, restart the Odoo server for the changes to take effect:

/etc/init.d/odoo-server restart

[ecko_alert color=”blue”]Get an Odoo VPS from us and our EPIC 24/7 Support Team will install, configure and optimize Odoo for you, for free.[/ecko_alert]

Install Apache, pip and mod-wsgi:

sudo apt-get install python-pip apache2 libapache2-mod-wsgi

Disable the default Apache configuration file:

a2dissite 000-default.conf

Create a new Apache configuration file. For example, create a new Apache configuration file named ‘odoo.conf’:

vi /etc/apache2/sites-available/odoo.conf

Enable the ‘odoo.conf’ Apache configuration file:

a2ensite odoo

Add the following lines to it:
<VirtualHost *:80>
ServerAlias *
WSGIScriptAlias / /odoo/odoo-server/odoo/service/
WSGIDaemonProcess oe user=odoo group=odoo processes=2 python-path=/odoo/odoo-server/ display-name=apache-odoo
WSGIProcessGroup oe
ErrorLog /var/log/odoo/odoo-error.log
CustomLog /var/log/odoo/odoo-access.log combined
<Directory /opt/odoo>
#Order allow,deny
#Allow from all
Options All
AllowOverride All
Require all granted
Restart the Apache web server for the changes to take effect:

service apache2 restart

That is it. Odoo 10 is configured to use sub-domain filtering now.

Open in a web browser, enter the Odoo master password, the database name, email address and password, select a country from the drop-down selection box and click ‘Create database’.
Repeat the same steps for etc., and then you can access each Odoo instance using , and so on.

Of course, you don’t have to do any of this if you use one of our Odoo VPS Hosting services, in which case you can simply ask our expert Linux admins to install Odoo 10 with subdomain filtering for you. They are available 24×7 and will take care of your request immediately.

You can also check one of our previous tutorials: Install Odoo 10 on CentOS 7 with Apache as a reverse proxy

PS. If you liked this post, on How to Install Odoo 10 with subdomain filtering,  please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.