Create a user for the OpenERP application

sudo adduser --system --quiet --shell=/bin/bash --home=/opt/openerp --gecos 'OpenERP' --group openerp

Install PostgreSQL database and add openerp as a postgres superuser

sudo apt-get install postgresql

For faster OpenERP 7.0 don’t use the default postgresql server, use my guide on installing PostgreSQL 9.2 on Ubuntu 12.04

sudo su - postgres -c "createuser -s openerp" 2> /dev/null || true

Add password to openerp postgres user

sudo su postgres
psql template1
ALTER ROLE openerp WITH password 'XXXXX';


Change the postgesql.conf file to accept connections on all interfaces (development use only)

sudo vi /etc/postgresql/9.1/main/postgresql.conf

Find the listen parameter and remove the # and listen to adress *

listen_address = '*'

Change the pg_hba.conf file to change the way authentication takes place

sudo vi /etc/postgresql/9.1/main/pg_hba.conf

Find the following line


local all all peer
hosts all all md5


local all all md5
hosts all all md5

If you want to connect to the postgres database from your machine you need to add a new line to the Ipv4 part of this file: Example is for a network

host all all MD5

Install the required dependicies for OpenERP

sudo apt-get install python-dateutil python-feedparser python-gdata python-ldap \
python-libxslt1 python-lxml python-mako python-openid python-psycopg2 \
python-pybabel python-pychart python-pydot python-pyparsing python-reportlab \
python-simplejson python-tz python-vatnumber python-vobject python-webdav \
python-werkzeug python-xlwt python-yaml python-zsi python-docutils \
python-psutil bzr wget python-mock python-unittest2 python-jinja2

Install latest gdata-python-client from

tar zxvf gdata-2.0.17.tar.gz
cd gdata-2.0.17/
python install

Install OpenERP 7.0 from Launchpad (EDIT: changed from trunk to 7.0 branch)

su – openerp
cd /opt/openerp
bzr branch lp:openobject-server/7.0 server
bzr branch lp:openobject-addons/7.0 addons
bzr branch lp:openerp-web/7.0 web
chown -R openerp: *

Configure the OpenERP application

sudo cp /opt/openerp/server/install/openerp-server.conf /etc/
sudo chown openerp: /etc/openerp-server.conf
sudo chmod 640 /etc/openerp-server.conf

In the /etc/openerp-server.conf file you only need to change one line and add a line for the log file and path configuration.

sudo vi /etc/openerp-server.conf

change the line: (in vi use a to start editing)

db_password = False


db_password = XXXXXX
(the password setup with the ALTER ROLE command)
addons_path = /opt/openerp/addons,/opt/openerp/web/addons
logfile = /var/log/openerp/openerp-server.log

Save the file (ESC :w)


Create a dir for the log file and give the correct permissions

sudo mkdir /var/log/openerp
sudo chown openerp:root /var/log/openerp

Check if the server works

sudo su - openerp -s /bin/bash
/opt/openerp/server/openerp-server –config=/etc/openerp-server.conf

Check it using your brwoser and go to: http://[ip or dns name of server]:8069
You should see the login screen or database creation of OpenERP
Press CTRL+C to stop the server and use exit to get out of the openerp user shell

Installing a boot script (if you want a boot script)

sudo vi /etc/init.d/openerp-server

Use the follwing script: (first press the a to add lines and copy the script)

# Provides: openerp-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: Enterprise Resource Management software
# Description: Open ERP is a complete ERP and CRM software.

# Specify the user name (Default: openerp).

# Specify an alternate config file (Default: /etc/openerp-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

Save the file (ESC :w)

Check if the server works

sudo chmod 755 /etc/init.d/openerp-server
sudo chown root: /etc/init.d/openerp-server
sudo /etc/init.d/openerp-server start

You should now be able to view the logfile and see that the server has started

less /var/log/openerp/openerp-server.log

and check it using your brwoser and go to: http://[ip or dns name of server]:8069
You should see the login screen or database creation of OpenERP
Change the (super)admin password of openerp. Click on Manage Databases (perhaps you’re already here). Change the password.
It adds the password in plain text in the /etc/openerp-server.conf file, that’s why we changed the permissions on this file!

Stop the server

sudo /etc/init.d/openerp-server stop

Automatic Startup and Shutdown

sudo update-rc.d openerp-server defaults

If you reboot the server everything should be working.