Recent Bloggers

Saurang Suthar
Posts: 5
Stars: 0
Date: 7/4/17
Jyoti Verma
Posts: 3
Stars: 0
Date: 6/28/17
Pankti Patel
Posts: 1
Stars: 0
Date: 5/26/17
Chandrika Baraiya
Posts: 5
Stars: 0
Date: 5/26/17
Atith Patel
Posts: 5
Stars: 0
Date: 5/22/17
Nisarg Pujara
Posts: 6
Stars: 0
Date: 5/10/17
Pranavsinh Parmar
Posts: 4
Stars: 0
Date: 5/3/17
Ankit Prajapati
Posts: 5
Stars: 0
Date: 5/3/17
Pratik Solanki
Posts: 5
Stars: 0
Date: 4/7/17
Chirag Patel
Posts: 4
Stars: 0
Date: 3/30/17
« Back

Running Odoo 8.0 as a Service


Below is the complete guide for installing Odoo 8.0 server in Ubuntu 12.04 and running this server as a service. We use “ubuntu” named user for below process. You can use username from which you logged in the system.


Step 1: Install postgres and pgAdmin.

  • First execute the below command to update the package lists from the repositories and updates them to get information on the newest versions of packages and their dependencies.


sudo apt-get update


  • Execute below command to install postgres and pgAdmin3


sudo apt-get install postgresql-9.1 pgadmin3


Step 2: Start Postgres

sudo su postgres

Step 3: Create user in postgres provide password for that user.


createuser -P -s -e ubuntu (Same as Machine name)


Step 4: Open new terminal and install python requirements by following commands.


sudo apt-get install python-dateutil python-decorator python-docutils python-feedparser \python-gdata python-gevent python-imaging python-jinja2 python-ldap python-libxslt1 python-lxml \python-mako python-mock python-openid python-passlib python-psutil python-psycopg2 python-pybabel \python-pychart python-pydot python-pyparsing python-pypdf python-reportlab python-requests \python-simplejson python-tz python-unittest2 python-vatnumber python-vobject python-werkzeug \python-xlwt python-yaml wkhtmltopdf


Step 5: Download openERP/odoo for Linux platform from the below site.

Or you can download source from github which is more preferable options that provides more flexibility during development and deployment of any module.


Extract the server and rename it to “odoo”. Copy this folder to “/opt/odoo/” folder(If “odoo” folder in “/opt” does not exists then create this folder).

Step 6: Create configuration file for openerp server.


  • Create “openerp-server.conf” file and copy and paste below content.


; This is the password that allows database operations:

admin_passwd = password for admin

db_host = localhost

db_port = 5432

db_user = ubuntu

db_password = password for postgres database user

addons_path = /opt/odoo/odoo/openerp/addons (It may change according to your downloaded bundle)

logfile = /var/log/openerp/openerp-server.log


Provide password in the admin_passwd. Here, db_user = ubuntu and db_password = ***** are for the user created in postgres for ubuntu user.

  • Copy “openerp-server.conf” file to “/etc” folder, and change odoo server’s folder ownership and permissions by executing below commands. Execute useradd command only if the you want to give other user permission for that folder.

useradd -d /opt/odoo/odoo -s /bin/bash ubuntu

chown ubuntu: -R /opt/odoo/odoo

chown ubuntu: /etc/openerp-server.conf

chmod 640 /etc/openerp-server.conf

Step 7: Install the boot script

  • Create an “openerp-server” file with the following content and copy-paste this file in “/etc/init.d/” folder.



# Provides: odoo-server

# Required-Start: $remote_fs $syslog

# Required-Stop: $remote_fs $syslog

# Should-Start: $network

# Should-Stop: $network

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

# Short-Description: Business Applications

# Description: ODOO Business Applications.



DAEMON=/opt/odoo/odoo/openerp-server (It may change according to your downloaded bundle)




# Specify the user name (Default: openerp).



# Specify an alternate config file (Default: /etc/odoo-server.conf).



# pidfile



# Additional options that are passed to the Daemon.


[ -x $DAEMON ] || exit 0

[ -f $CONFIGFILE ] || exit 0

checkpid() {

[ -f $PIDFILE ] || return 1

pid=`cat $PIDFILE`

[ -d /proc/$pid ] && return 0

return 1



case "${1}" in


echo -n "Starting ${DESC}: "

start-stop-daemon --start --quiet --pidfile ${PIDFILE} \

--chuid ${USER} --background --make-pidfile \

--exec ${DAEMON} -- ${DAEMON_OPTS}

echo "${NAME}."



echo -n "Stopping ${DESC}: "

start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \


echo "${NAME}."




echo -n "Restarting ${DESC}: "

start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \


sleep 1

start-stop-daemon --start --quiet --pidfile ${PIDFILE} \

--chuid ${USER} --background --make-pidfile \

--exec ${DAEMON} -- ${DAEMON_OPTS}

echo "${NAME}."




echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2

exit 1




exit 0

  • Make this file executable using the following commands :

chmod 755 /etc/init.d/openerp-server

chown ubuntu: /etc/init.d/openerp-server

Step 8: Create a log file for the odoo server and make this file executable using the following commands.

mkdir /var/log/openerp

chown ubuntu: /var/log/openerp

touch /var/log/openerp/openerp-server.log

chmod 777 /var/log/openerp/openerp-server.log

Step 9: Start the server


/etc/init.d/openerp-server start

To view logs of the server execute below command.

tail -f /var/log/openerp/openerp-server.log

Now you can access the odoo server by hitting the “localhost:8069” in web browser.

Step 10: Once the server started successfully then make this server start and stop automatically using below command.

sudo update-rc.d openerp-server defaults

First time when you start the server there will be no database created for the odoo so it will redirect the user to the “Manage Databases” page. In this page create a database that you want to use by providing the master password same as you provide in “openerp-server.conf”  file and that’s it !! Enjoyy !!

Trackback URL:

No comments yet. Be the first.

Contact Us


Get in touch

Headquarter :
302, Landmark,
Nr. Titanium City Center,
Prahlad Nagar Road,
Ahmedabad, India - 380015.