How to install OpenERP 6.0 on Ubuntu 10.04 LTS Server (Part 1)

Update: 22/02/2012. OpenERP 6.1 was released today. I’ve written a howto for this new version here.

OpenERP LogoRecently at work, we’ve been setting up several new instances of OpenERP for customers. Our server operating system of choice is Ubuntu 10.04 LTS.

Installing OpenERP isn’t really that hard, but having seen several other “How Tos” on-line describing various methods where none seemed to do the whole thing in what I consider to be “the right way”, I thought I’d explain how we do it. There are a few forum posts that I’ve come across where the advice is just plain wrong too, so do be careful.

As we tend to host OpenERP on servers that are connected to the big wide Internet, our objective is to end up with a system that is:

      A: Accessible only via encrypted (SSL) services from the GTK client, Web browser, WebDAV and CalDAV
      B: Readily upgradeable and customisable

One of my friends said to me recently, “surely it’s just sudo apt-get install openerp-server isn’t it?” Fair enough; this would actually work. But there are several problems I have with using a packaged implementation in this instance:

  • Out-of-date. The latest packaged version I could see, in either the Ubuntu or Debian repositories, was 5.0.15. OpenERP is now at 6.0.3 and is a major upgrade from the 5.x series.
  • Lack of control. Being a business application, with many configuration choices, it can be harder to tweak your way when the packager determined that one particular way was the “true path”.
  • Upgrades and patches. Knowing how, where and why your OpenERP instance is installed the way it is, means you can decide when and how to update it and patch it, or add custom modifications.

So although the way I’m installing OpenERP below is manual, it gives us a much more fine-grained level of control. Without further ado then here is my way as it stands currently (“currently” because you can almost always improve things. HINT: suggestions for improvement gratefully accepted).

[Update 18/08/2011: I’ve updated this post for the new 6.0.3 release of OpenERP]

Step 1. Build your server

I install just the bare minimum from the install routine (you can install the openssh-server during the install procedure or install subsequently depending on your preference).

After the server has restarted for the first time I install the openssh-server package (so we can connect to it remotely) and denyhosts to add a degree of brute-force attack protection. There are other protection applications available: I’m not saying this one is the best, but it’s one that works and is easy to configure and manage. If you don’t already, it’s also worth looking at setting up key-based ssh access, rather than relying on passwords. This can also help to limit the potential of brute-force attacks. [NB: This isn’t a How To on securing your server…]

sudo apt-get install openssh-server denyhosts

Now make sure you are running all the latest patches by doing an update:

sudo apt-get update
sudo apt-get dist-upgrade

Although not always essential it’s probably a good idea to reboot your server now and make sure it all comes back up and you can still login via ssh.

Now we’re ready to start the OpenERP install.

Step 2. Create the OpenERP user that will own and run the application

sudo adduser --system --home=/opt/openerp --group openerp

This is a “system” user. It is there to own and run the application, it isn’t supposed to be a person type user with a login etc. In Ubuntu, a system user gets a UID below 1000, has no shell (well it’s actually /bin/false) and has logins disabled. Note that I’ve specified a “home” of /opt/openerp, this is where the OpenERP server, and optional web client, code will reside and is created automatically by the command above. The location of the server code is your choice of course, but be aware that some of the instructions and configuration files below may need to be altered if you decide to install to a different location.

Step 3. Install and configure the database server, PostgreSQL

sudo apt-get install postgresql

Then configure the OpenERP user on postgres:

First change to the postgres user so we have the necessary privileges to configure the database.

sudo su - postgres

Now create a new database user. This is so OpenERP has access rights to connect to PostgreSQL and to create and drop databases. Remember what your choice of password is here; you will need it later on:

createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
Enter password for new role: ********
Enter it again: ********

[Update 18/08/2011: I have added the --no-superuser switch. There is no need for the openerp database user to have superuser privileges.]

Finally exit from the postgres user account:


Step 4. Install the necessary Python libraries for the server

sudo apt-get install python python-psycopg2 python-reportlab \
python-egenix-mxdatetime python-tz python-pychart python-mako \
python-pydot python-lxml python-vobject python-yaml python-dateutil \
python-pychart python-webdav

And if you plan to use the Web client install the following:

sudo apt-get install python-cherrypy3 python-formencode python-pybabel \
python-simplejson python-pyparsing

Step 5. Install the OpenERP server, and optional web client, code

I tend to use wget for this sort of thing and I download the files to my home directory.

Make sure you get the latest version of the application files. At the time of writing this it’s 6.0.2 6.0.3; I got the download links from their download page.


And if you want the web client:


Now install the code where we need it: cd to the /opt/openerp/ directory and extract the tarball(s) there.

cd /opt/openerp
sudo tar xvf ~/openerp-server-6.0.3.tar.gz
sudo tar xvf ~/openerp-web-6.0.3.tar.gz

Next we need to change the ownership of all the the files to the openerp user and group.

sudo chown -R openerp: *

And finally, the way I have done this is to copy the server and web client directories to something with a simpler name so that the configuration files and boot scripts don’t need constant editing (I call them, rather unimaginatively, server and web). I started out using a symlink solution, but I found that when it comes to upgrading, it seems to make more sense to me to just keep a copy of the files in place and then overwrite them with the new code. This way you keep any custom or user-installed modules and reports etc. all in the right place.

sudo cp -a openerp-server-6.0.3 server
sudo cp -a openerp-web-6.0.3 web

As an example, should OpenERP 6.0.4 come out next, I can extract the tarballs into /opt/openerp/ as above. I can do any testing I need, then repeat the copy command (replacing 6.0.3 obviously) so that the modified files will overwrite as needed and any custom modules, report templates and such will be retained. Once satisfied the upgrade is stable, the older 6.0.3 directories can be removed if wanted.

That’s the OpenERP server and web client software installed. The last steps to a working system are to set up the two (server and web client) configuration files and associated init scripts so it all starts and stops automatically when the server boots and shuts down.

Step 6. Configuring the OpenERP application

The default configuration file for the server (in /opt/openerp/server/doc/) could really do with laying out a little better and a few more comments in my opinion. I’ve started to tidy up this config file a bit and here is a link to the one I’m using at the moment (with the obvious bits changed). You need to copy or paste the contents of this file into /etc/ and call the file openerp-server.conf. Then you should secure it by changing ownership and access as follows:

sudo chown openerp:root /etc/openerp-server.conf
sudo chmod 640 /etc/openerp-server.conf

The above commands make the file owned and writeable only by the openerp user and only readable by openerp and root.

To allow the OpenERP server to run initially, you should only need to change one line in this file. Toward to the top of the file change the line db_password = ******** to have the same password you used way back in step 3. Use your favourite text editor here. I tend to use nano, e.g. sudo nano /etc/openerp-server.conf

Once the config file is edited, you can start the server if you like just to check if it actually runs.

/opt/openerp/server/bin/ --config=/etc/openerp-server.conf

It won’t really work just yet as it isn’t running as the openerp user. It’s running as your normal user so it won’t be able to talk to the PostgreSQL database. Just type CTL+C to stop the server.

Step 7. Installing the boot script

For the final step we need to install a script which will be used to start-up and shut down the server automatically and also run the application as the correct user. Here’s a link to the one I’m using currently.

Similar to the config file, you need to either copy it or paste the contents of this script to a file in /etc/init.d/ and call it openerp-server. Once it is in the right place you will need to make it executable and owned by root:

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

In the config file there’s an entry for the server’s log file. We need to create that directory first so that the server has somewhere to log to and also we must make it writeable by the openerp user:

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

Step 8. Testing the server

To start the OpenERP server type:

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

If there are any problems starting the server now you need to go back and check. There’s really no point ploughing on if the server doesn’t start…

OpenERP - First Login

OpenERP - First Login

If you now start up the GTK client and point it at your new server you should see a message like this:

Which is a good thing. It means the server is accepting connections and you do not have a database configured yet. I will leave configuring and setting up OpenERP as an exercise for the reader. This is a how to for installing the server. Not a how to on using and configuring OpenERP itself…

What I do recommend you do at this point is to change the super admin password to something nice and strong. By default it is “admin” and with that a user can create, backup, restore and drop databases (in the GTK client, go to the file menu and choose the Databases -> Administrator Password option to change it). This password is written as plain text into the /etc/openerp-server.conf file. Hence why we restricted access to just openerp and root.

One rather strange thing I’ve just realised is that when you change the super admin password and save it, OpenERP completely re-writes the config file. It removes all comments and scatters the configuration entries randomly throughout the file. I’m not sure as of now if this is by design or not.

Now it’s time to make sure the server stops properly too:

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

Check the logfile again to make sure it has stopped and/or look at your server’s process list.

Step 9. Automating OpenERP startup and shutdown

If everything above seems to be working OK, the final step is make the script start and stop automatically with the Ubuntu Server. To do this type:

sudo update-rc.d openerp-server defaults

You can now try rebooting you server if you like. OpenERP should be running by the time you log back in.

If you type ps aux | grep openerp you should see a line similar to this:

openerp 708 3.8 5.8 181716 29668 ? Sl 21:05 0:00 python /opt/openerp/server/bin/ -c /etc/openerp-server.conf

Which shows that the server is running. And of course you can check the logfile or use the GTK client too.

Step 10. Configure and automate the Web Client

Although it’s called the web client, it’s really another server-type application which [ahem] serves OpenERP to users via a web browser instead of the GTK desktop client.

If you want to use the web client too, it’s basically just a repeat of steps 6, 7, 8 and 9.

The default configuration file for the web client (can also be found in /opt/openerp/web/doc/openerp-web.cfg) is laid out more nicely than the server one and should work as is when both the server and web client are installed on the same machine as we are doing here. I have changed one line to turn on error logging and point the file at our /var/log/openerp/ directory. For our installation, the file should reside in /etc/, be called openerp-web.conf and have it’s owner and access rights set as with the server configuration file:

sudo chown openerp:root /etc/openerp-web.conf
sudo chmod 640 /etc/openerp-web.conf

Here is a web client boot script. This needs to go into /etc/init.d/, be called openerp-web and be owned by root and executable.

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

You should now be able to start the web server by entering the following command:

sudo /etc/init.d/openerp-web start

Check the web client is running by looking in the log file, looking at the process log and, of course, connecting to your OpenERP server with a web browser. The web client by default runs on port 8080 so the URL to use is something like this: http://my-ip-or-domain:8080

Make sure the web client stops properly:

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

And then configure it to start and stop automatically.

sudo update-rc.d openerp-web defaults

You should now be able to reboot your server and have the OpenERP server and web client start and stop automatically.

I think that will do for this post. It’s long enough as it is!

I’ll do a part 2 in a little while where I’ll cover using apache, ssl and mod_proxy to provide encrypted access to all services.

[UPDATE: Part 2 is here]

Tags: , , , , , , , , ,


  • Julian says:

    Very interesting! Not a simple beast is openerp is it ?

    • Alan Lord says:

      Version 6 is a huge improvement in usability. And although this looks quite a long post, there aren’t actually that many commands. And considering you’re essentially getting something similar to SAP I reckon that’s not too bad a deal at all 😉

      • Martyn says:


        >>you’re essentially getting something similar to SAP<<
        And that's a good thing?

        BTW – uzERP is a one-command install from on base debian/ubuntu i.e. dpkg -i uzerp_xx.deb and point your web browser.


        • Alan Lord says:

          Hi Martyn,

          I never said SAP was a good thing 😉

          And as I stated at the top, a “one-click” install is available for OpenERP (get the deb here) but it doesn’t give me the control I want.

          I’ve just built a new machine for a client tonight. Following the instructions above. After the server itself was built, the rest took about 7 minutes…

  • Mario says:

    Great manual! In the Netherlands, Open ERP gaining business used at the expense of Exact, Afas and Unit4.

  • Dmitrijs Ledkovs says:

    Heya, I’m packaging the updated openerp5 and openerp6 for debian now. Will upload to debian archive soon and there is a ppa on launchpad. It’s a bit raw around the edges right now but soon i’ll add automatic database user creation. At least my packages run behind mod_wsgi =))))

    • Alan Lord says:


      Thanks for the info. I’m especially interested to hear about using mod_wsgi. Currently we are running behind mod_proxy so effectively duplicating processes. Got any docs or info about how you configure for this?


  • […] Twitter Feed « How to install OpenERP 6 on Ubuntu 10.04 LTS Server (Part 1) […]

  • Hans Linkels says:


    I hope this is the correct place to shoot in a question on installation of OpenErp. If not, any pointer to where I can post such a question?

    My system is running Debian Squeeze and the Python version is 2.6. At least that is what I get when I do “python -V”

    I just downloaded and tried to install the latest .deb packages from
    When I install the package, I get a lot of python compile errors like:

    Compiling /usr/lib/pymodules/python2.4/openerp-server/tools/ ...
    File "/usr/lib/pymodules/python2.4/openerp-server/tools/", line 223

    Now I am a bit puzzled because those packages are in the directory python2.4 and the python version I use is 2.6. I don’t speak Python, but I found out that the syntax errors are related to the try/except/finally syntax which was revisited after 2.4. But I do have Python 2.6.

    Before this attempt I installed OpenErp 5 on Debian without problems. (And uninstalled it before installing 6.0.

    BTW, on the OpenErp downloads page the latest version points to version 6.0.2-0, not to 6.0.2-1. I tried to install both resulted in the same errors.


    • Alan Lord says:

      Hi Hans,

      That sounds a little like a Python Path issue. I’d start by doing some googling for PYTHONPATH and Debian.

      But I’d also not be installing from the deb either 😉

  • Hans Linkels says:

    I just see there is an OpenErp user forum. I guess it is better to leave a message there, right?


  • Marcelo says:

    Thanks for the great work, your tutorial is by far the best I have found and it has helped me tremendously! I like the fact you don’t run the setup script, it would otherwise copy files all over the place with IMHO weird file location defaults (configuration file in the “doc” folder!?). Your guide is much more “elegant”.
    And all the ssl configuration tips are super valuable. And I learned about denyhosts, which was a smart tip.

    Thank you!

  • claude dunnigan says:

    nice work Alan, how about how to install 6.1 trunk, very different….

    • Alan Lord says:


      Thanks and that sounds like a good suggestion to do the same for 6.1. Although a blog post will probably have to wait a while…

  • Zoli says:

    Hi Alan,
    Finally an installation tutorial which works for Linux/OpenERP newbies too.
    Good job!
    OpenERP world really needs this kind of step by step tuts with detailed explanations. Otherwise it just scares new people away , and then what is the point …


  • rob says:

    hi Alan
    nice tutorial!
    i have some trouble about upgrade the server and module,
    can u give detail explanation about the upgrade process
    thank you very much!!

  • Henrique Vecchi says:

    Can’t make the web start. The server run fine, but the web don’t run.

    ds1288:/opt/openerp/web# ps -ef | grep openerp
    openerp 7980 1 0 13:05 ? 00:00:00 python /opt/openerp/server/bin/ -c /etc/openerp-server.conf
    root 8850 7109 0 13:31 pts/0 00:00:00 grep openerp

    No error.

    • Henrique Vecchi says:

      Here is the error:

      Traceback (most recent call last):
      File “/opt/openerp/web/”, line 11, in
      from openobject.commands import start, ConfigurationError
      File “/opt/openerp/web/openobject/”, line 11, in
      import controllers._root
      File “/opt/openerp/web/openobject/controllers/”, line 5, in
      from import expose
      File “/opt/openerp/web/openobject/tools/”, line 2, in
      from _expose import *
      File “/opt/openerp/web/openobject/tools/”, line 39, in
      AttributeError: ‘function’ object has no attribute ‘files’

      • Alan Lord says:

        Hi Henrique,

        I’ve not seen that error before but this howto does work if you follow the instructions correctly.

        As the error mentions “ConfigurationError” perhaps the first place to look is the openerp-web.conf file and the associated init.d start-up script…

        • Titus Wiguno says:

          Hi. Thanks for saving my day! 🙂

          Anyway, I recently found some errors when installing this to Ubuntu 10.04. The installation went perfectly fine. But when I tried to run the web client (the server app was running perfect btw), it returned the usual “Starting openerp-web” message, but no process whatsoever was found.

          After trying to find out why, I found that the locale settings weren’t set properly. All I did was to add the locale settings to the /etc/environment, reboot, and voila!

          Hope this helps.

        • bello says:

          The problem WAS in openerp-web.conf, especially around the row where the path to log files is set. the path is kinda wrong cause when it`s commented everything runs smoothly! =)

  • manlsea says:

    “Could not create database.”

    I open the site of my installed by chromium:

    Occurred to the error when I create a database.

    How can I solve? (ubuntu 11.04)


    • Alan Lord says:

      There could be many reasons for this error.

      First thing is to make sure you changed the entry for db_password in /etc/openerp-server.conf to be the same as the one you used to create the openerp PostgreSQL user in the first place.

      Secondly, I would check the log files.

      I doubt anyone could help you without more information.

      Good luck.

      • manlsea says:

        I’m sure the password is correct in the openerp-server.conf file, I use the same account can successfully access the PostgretSQL service by pgAdmin III in other PC, and create a new database;
        in addition, the error of openerp-server.log: ERROR:dbconnection_pool:Connection to the database failed.

      • manlsea says:

        Hi Alan Lord

        Has been resolved. Modify the pg_hba.conf file.


        • Alan Lord says:

          I am not sure why you needed to modify that file.

          The instructions in this post work. On Ubuntu 10.04 LTS if a reader follows the instructions accurately it will work; every time.

          I have never needed to alter the pg_hba.conf file.

      • manlsea says:

        Hi Alan Lord

        However, there is now a new problem.

        That is not backed up the database. I have not tested it to restore the database.

        Error: Could not backup database

  • I have used this article as the basis to write a Chef cookbook that automates the complete installation. Have a look at Chef in general and at the cookbook itself. Sources are on Github and contributions are welcome via pull requests.

    • Alan Lord says:

      Interesting idea, thanks for the info.

      I’ve been doing some testing recently and I’m fairly sure that the postgres user we create does NOT need to be a superuser. I want to do a couple more trials before updating this page (it is getting quite a lot of hits) but it is likely that those instructions will change. So in your database.rb recipe I think you will be able to set

      createrole false
      superuser false

      or however the rb syntax works.

      Keep monitoring this page for updates… 🙂

      Thanks again

  • dovile says:

    Step 8 :
    /etc/init.d/openerp-server: line 22: /etc/rc.d/init.d/functions: Aucun fichier ou dossier de ce type..

    • Alan Lord says:

      Hi dovile,

      I’m not sure I understand. Line 22 of the openerp-server file is a blank line. The lines above and below it are:

      # Specify the user name (Default: openerp).

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

      Are you sure you are using the same file that is linked to here?

      I do not think this file /etc/rc.d/init.d/functions exists in Ubuntu (and it wouldn’t be in that directory anyway!).

  • dovile says:

    Hi Alan,
    Thanks for your mail..
    I used the original file, not your file.
    Now :
    user@debian-preprod:~# /etc/init.d/openerp-server start
    Starting openerp-server: openerp-server.

    But the log file is emtpy

    and when I try to stop the process
    user@debian-preprod:~# /etc/init.d/openerp-server stop
    Stopping openerp-server: start-stop-daemon: warning: failed to kill 1405: No such process

    User and config file are all right.

    • Alan Lord says:

      Hi dovile,

      I’m not sure but did you use sudo when you tried to run the init script?

      user@debian-preprod:~# sudo /etc/init.d/openerp-server start?

      This howto does work – I build servers this way all the time.

      I wrote it for Ubutnu 10.04 LTS so if you are using debian instead then I guess it will be similar to Ubuntu but it might not all be the same… You will have to check everything from the start.

      You can also try running the server from the command line after ‘su’ing to the openerp user like this:

      sudo su -s /bin/bash openerp (The -s /bin/bash is needed as the openerp user has no shell normally)

      Then run it like:

      /opt/openerp/server/bin/ -c /etc/openerp-server.conf

      At least you may see what the problem is.


  • Jordan says:

    Legend, end off.

  • Mohale says:

    I have installed Ubuntu Server on an Oracle Virtual Box. I have followed all the steps but not able to change directory to openerp

    may you please help

  • Mohale says:

    That was a spelling problem when creating directory

  • laurent says:


    Wonderful tuto. I learn a lot with it.
    Work great.
    But what about the I am using 6.0.2 with the web-client.
    When I configure the base_report_designer I have to save the OpenObject Report Designer Plug-in.
    I clik ‘save as’ and I get an error message from my webroser (iceweasel) : file not found.

    I have other installation of openerp and there is no problem with that.
    Do you have this problem? Any idea to solve this problem?



    • Alan Lord says:

      Hi Laurent,

      Thanks for the comment.

      I haven’t used the report designer for some time now. Our preferred choice is to use the Aeroo Report project

      But I do not see why the report designer module should not work. Perhaps someone else can help if they read this…

  • Boris Ivanov says:

    Great howto
    In Debian 6, if dependency-based booting is enabled, you shuld use insserv openerp-server instead update-rc.d openerp-server defaults (
    And before running it, add a reference to postgresql service in the header of openerp-server init.d script so openerp-server starts after postgresql, eg.:
    Required-Start: $remote_fs $syslog postgresql

  • zambanini says:

    your copy link is wrong, with cp -a nobody will be able to upgrade the installation files ;D

    • Alan Lord says:

      @zambanini I’m not sure I get what you mean.

      cp -a is equivalent to cp -dr --preserve=all which copies recursively, and preserves the file ownerships and other settings so the copy will be owned by the user & group openerp as in the previous command we set the ownership of the original files to openerp:openerp.

      Care to explain your thinking a bit more?


      • zambanini says:

        well, if you want to upgrade from one openerp version to another,
        you will not be happy with cp -a ..since this command will copy the new folder within the old

        so you will have following folder structure /oldfolder/newfolder not the files within the folder will be copied…but the complete folder

        I guess

        • Alan Lord says:


          I think this is correct.

          If for example openerp 6.0.4 comes out next week:

          sudo cp -a openerp-server-6.0.4 server will overwrite the previous version’s system files but not change any custom modules that you have installed. All the configuration is in /etc so I think this is correct.

          The alternative is that you have to find and copy all of the custom modules over to a new “server” directory and then re-configure or rename the config files or directories.

  • stlouisubntu says:

    Alan, great tutorial. I have read through it a few times and am interested in deploying OpenERP on a test basis at a non-profit for which I am responsible for the network and server. However, we use Zentyal as our server linux distro (sits on top of Ubuntu 10.04 whose web admin interface is accessed by pointing Firefox (on a LAN PC) to https://server-LAN-ip. Of course the problem is that also appears to be how the web interface of OpenERP is accessed. Any advice on how this could work would be appreciated. I would prefer to install OpenERP on our server (which also runs Zentyal) for redundancy and backup security reasons (RAID1 plus weekly rsync backup runs) but installing it on a separate “sidecar” server may be the only workable solution.

    Thanks for sharing all of this. Kind Regards.

    • Alan Lord says:

      I’m familiar with Zentyal. It’s a great product (in fact we use it for our own mailserver system now).

      We tend to isolate our various systems by virtualising them so Zentyal runs in one Virtual Machine, OpenERP another, vtiger CRM in another and so forth. They can then sit atop one or more hardware systems.

      However I don’t see why you couldn’t run OpenERP on the same server as Zentyal. It would need some though but you can access OpenERP on whatever port you want and/or you could probably set up a different vhost for OpenERP.

      • stlouisubntu says:

        Thanks for the reply, friend. Also, would you please clarify what one gains by implementing Part 2 of your tutorial. I am assuming that Part 2 is for folks who will use OpenERP from the internet (from home, from the road, or in any case outside the office LAN.) If someone will only be using OpenERP from the on site LAN, is there any need for Part 2? It seems to me that by leaving off Part 2, it solves my problem of a conflict between the Zentyal administration web access and OpenERP-web if I can merely access OpenERP-web from http://LAN-server-ip:8080. Will you confirm or deny this for me? Thanks again so very much for sharing all of this. On our LAN, I figured I will use the gtk client for our Linux boxes, but we also have some MACs where it seems like the web interface would be ideal. Thanks again 🙂

        • Alan Lord says:

          Hi stlouisubuntu,

          Yes, the idea of part 2 is to provide encrypted access to all of the services on OpenERP (Web, GTK and WebDAV/CalDAV). If your OpenERP system lives inside your network and users do not need remote access then you do not need to implement part 2.

  • Capeman says:


    Thank you for a most excellent and helpful tutorial for an OpenERP newbie like myself. It was a great help and worked fine!

  • Timothy says:

    Magic! Thanks for the educational tutorial

  • Nexo says:

    I have followed your tutorial in detail (a helpful tool for everyone) but in step 8 when I check the log file (less /var/log/openerp/openerp-server.log) I came across with the following error:

    [2011-09-18 21:26:42,274][?] ERROR:httpd:Error occured when starting the server daemon.
    Traceback (most recent call last):
    File “/opt/openerp/server/bin/service/”, line 147, in __init__
    self.server = ThreadedHTTPServer((interface, port), handler, proto=self._RealProto)
    File “/opt/openerp/server/bin/service/”, line 75, in __init__
    HTTPServer.__init__(self, addr, requestHandler)
    File “/usr/lib/python2.7/”, line 408, in __init__
    File “/usr/lib/python2.7/”, line 108, in server_bind
    File “/usr/lib/python2.7/”, line 419, in server_bind
    File “/usr/lib/python2.7/”, line 224, in meth
    return getattr(self._sock,name)(*args)
    error: [Errno 98] Address already in use
    [2011-09-18 21:44:48,676][?] INFO:server:OpenERP version – 6.0.3
    [2011-09-18 21:44:48,677][?] INFO:server:addons_path – /opt/openerp/server/bin/addons
    [2011-09-18 21:44:48,677][?] INFO:server:database hostname – localhost
    [2011-09-18 21:44:48,677][?] INFO:server:database port – 5432
    [2011-09-18 21:44:48,677][?] INFO:server:database user – openerp
    [2011-09-18 21:44:48,677][?] INFO:server:initialising distributed objects services
    [2011-09-18 21:44:48,961][?] ERROR:httpd:Error occured when starting the server daemon.
    Traceback (most recent call last):
    File “/opt/openerp/server/bin/service/”, line 147, in __init__
    self.server = ThreadedHTTPServer((interface, port), handler, proto=self._RealProto)
    File “/opt/openerp/server/bin/service/”, line 75, in __init__
    HTTPServer.__init__(self, addr, requestHandler)
    File “/usr/lib/python2.7/”, line 408, in __init__
    File “/usr/lib/python2.7/”, line 108, in server_bind
    File “/usr/lib/python2.7/”, line 419, in server_bind
    File “/usr/lib/python2.7/”, line 224, in meth
    return getattr(self._sock,name)(*args)
    error: [Errno 98] Address already in use

    I searched about it ( and it seems that there is another process running on the same address, but I don’t know whether this is my case and if so what process do I have to kill to in order to get the server up and running.

    Thanks in advance.

    • Alan Lord says:

      This is the interesting bit: error: [Errno 98] Address already in use.

      You have another process that has already taken the ports you have configured in your openerp-server.conf file (It is commonly just another instance of OpenERP already running).

      Run something like sudo netstat -alntp | grep LIST and it will show you the processes that are listening on which ports.

  • Nexo says:

    Alan…Thanks for your quick answer, I didn’t do anything different rather than rebooting ubuntu and restarting up the GTK Client again and it works fine, I’ll keep your suggestion on mind for further implementations.


  • Hi, thanks Alan for this nice tutorial but…
    I got an error when starting the server with the command line from the step 8 here above: sudo /etc/init.d/openerp-server start it just returns:
    /etc/init.d/openerp-server: 1: N: not found
    Please anyone can help me ?

  • Balamurugan says:

    First I would like to Thanks!!! for giving us a wonderful document step-by-step with explaination.

    My openerp server was working fine even from remote.

    Today I say that server is giving and not responding since my developer were working on this first time.

    First Error

    [2011-09-24 09:12:01,510][sample] ERROR:db.cursor:bad query: UPDATE res_users SET date=now() WHERE login=E’demo’ AND password=E’demo’ AND active RETURNING id
    Traceback (most recent call last):
    File “/opt/openerp/server/bin/”, line 131, in execute
    res = self._obj.execute(query, params)
    OperationalError: server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
    I deleted my sample database in postgresql and restart – postgresql-8.4, openerp-server, openerp-web.

    openerp-server gives the following error now.

    openerp@mark:/root$ /opt/openerp/server/bin/ -c /etc/openerp-server.conf
    Traceback (most recent call last):
    File “/opt/openerp/server/bin/”, line 112, in
    File “/opt/openerp/server/bin/service/”, line 232, in init_servers
    int(tools.config.get(‘xmlrpc_port’, 8069)))
    File “/opt/openerp/server/bin/service/”, line 212, in __init__
    File “/opt/openerp/server/bin/service/”, line 147, in __init__
    self.server = ThreadedHTTPServer((interface, port), handler, proto=self._RealProto)
    File “/opt/openerp/server/bin/service/”, line 75, in __init__
    HTTPServer.__init__(self, addr, requestHandler)
    File “/usr/lib/python2.6/”, line 400, in __init__
    File “/usr/lib/python2.6/”, line 108, in server_bind
    File “/usr/lib/python2.6/”, line 411, in server_bind
    File “”, line 1, in bind
    socket.error: [Errno 98] Address already in use
    openerp@mark:/root$ ^C

    Now I am freezed, how to clear this error and start the server.
    When I connecting from remote OpenERP client / browser

    IN OpenERP client
    I am getting this error message Database cannot be accessed or does not exist
    “Please double-check the database name or contact your administrator to verify the database status”

    IN browser,

    Bad username or password

    Kindly help me!!!

    • Alan Lord says:

      The clue is here I think: socket.error: [Errno 98] Address already in use

      Either you have added another service on the server which is using the same port as one of the OpenERP services or you are trying to “start” OpenERP when it is already running.

  • &rés says:

    Thank you very much! It’s a great post.

  • Jorge Tarlea says:

    It worked perfect! Thank you very much!

  • nico says:

    Thanks a lot for this great tutorial!
    It helped me a lot in my first install of OpenERP.

  • Simone says:

    Hi Alan,
    during the testing of the OpenErp, i find that if I change the super admin password from the openerp-web interface, same to the password stored in the file openerp-server.conf, when I reboot the OS (Ubuntu 10.04 LTS)the super admin password it reset by itself to the default password “admin”. Any idea why is happened this? Thanks for the answer Simone

    • Alan Lord says:

      When you change the super admin password, it gets written to the openerp-server.conf file; actually the whole file is re-written from what I can tell as it seems to mess up any care I have taken to order/group settings 🙁

      As to why it is reverting after a reboot I really couldn’t say. Are you *sure* that the file is actually being written to when you save the new password? Check the owner and permissions of the file.

  • Simone says:

    Hi Alan,

    thanks very much, the problem was the owner of the openerp-server.conf. Now work fine. Thanks Simone

  • joris says:

    Thanks for this guide. Very well written and easy to follow along.

    But for some reason, that I don’t understand I cannot get the gtk-client working with the server. The client says No database found, you must create one ! So that means there is some connection going on, but I cannot login or more specifically the ok button does not turn green… As far as I know the default user is admin and the password also admin. So I should be able to login.

    If I follow your guide for the webinterface it works as expected, but I’d rather keep a simple setup to play around without a webserver.

    Any ideas how I can solve this?

    • Alan Lord says:

      That sounds correct.

      Open the GTK Client, cancel the “No database” popup dialogue. Go to the File menu and choose Databases->New Database.

      As a clean install OpenERP does not have any databases installed. You must first create one.

  • joris says:

    Ok got it fixed, already. It is just me struggling with the new Unity interface. The option to create a new database was hidden under the upper panel and suddenly I noticed it when i went over it with the mouse…

    Sorry very stupid not to notice it earlier…

  • Mike says:

    Great tutorial, helped me get a demonstration server setup correctly. Thanks!

  • Afzal says:

    Greate Tutorial! Managed to install openerp server and web in Ubuntu 11.04 without any problem. Thanks for this!

  • Demetri says:

    Hi, was wondering if you have installed the magento connector – I followed your instructions to the letter and installed Openerp 6 with absolutely no glitches whatsoever. Thanx a million 🙂

    Any info on the connector though would be extremely appreciated.

    Thanx again.


  • Hi Alan,

    I am getting the following errors, please let me now if you can help me in any way I have been working on this for the past 3 days and am not very technically sound. I am installing openerp on my rackspace cloud server.. it runs Ubuntu 10.04

    1. When I use the command ps aux | grep openerp as you have mentioned above. My OS says “1000 4532 0.0 0.1 6204 584 tty0 R+ 12:14 0:00 grep openerp” I am not sure if this makes sense and if this means that the server is running or not.

    2. When I try to run the GTK client on my Ubuntu 10.04 rackspace cloud server. It gives me an ImportError: No module named pygtk. It gives me the same error if I try to run the GTK client on my mac osx lion.

    3. When I tried to run the web-client. It worked the first time. However after rebooting the server it started giving me the error message
    “/etc/init.d/openerp-web: 24: CONFIGFILE: not found
    Starting openerp-web: openerp-web.”

    4. Also when I use the “http:// my-ip:8080” firefox shows me a “can’t establish connection” error.

    Not sure what exactly I can do and where I am going wrong. I have followed the steps above over and over again but am still not being able to get it to run. Please help! Thanks.

    – Mudit

    • Alan Lord says:


      1. If that is the only line you get back then OpenERP is not running.

      2. Why are you trying to run the “client” on the server in the cloud? The client has different Python dependencies to the server and one wouldn’t normally be running it on the server at all.

      3. There is probably something wrong with the file /etc/init.d/openerp-web as that error looks like it is not trying to assign the path to the variable CONFIGFILE but read it directly.

      4. I am not surprised.

      It looks like there are a number of issues here which are not going to be easily resolved on a blog post.

      I’d be glad to help you get OpenERP installed on your server if you like. I will email you off line to discuss our rates.

      • Andre says:

        Hi, the problem number 3 described by Mudit can be resolve changing in the script the parametr USER=root .
        This is a bad idea, but at moment I don’t found a better solution! Seems that the problem is in openerp user local settings, but I’m still investigation…

        • Alan Lord says:

          Thanks for commenting Andre, and yes that’s a very bad idea!

          Come to think of it I’m not sure if OpenERP will even run as root at all. Certainly in the forthcoming 6.1 release there are checks to stop the server starting if it is running as root.

  • Dear Alan,

    Thanks you for the very clear tutorial and I thought I was going at a good pace and although the server seems to run when started manually (just before Step 7) when I run the log file test in Step 8 I get nothing. No log file, no errors. Running the openerp-server stop command it reports “No such Process”. I spent the last couple of hours checking the paths and file names and reading through the comments above but I am at a loss now.

    Can you help?

    • Alan Lord says:

      Hi Chris,

      The instructions do work if followed precisely.

      I would check that:

      1. That the /etc/init.d/openerp-server file is executable and able to read the /etc/openerp-server.conf file correctly. Check permissions and ownership using the ls -l command.
      2. The directory /var/log/openerp exists and is correctly owned: ls -l /var/log/ The openerp directory should look like this:
      drwxr-xr-x 2 openerp root 4096 2011-11-01 17:06 openerp
      3. The server is running as the correct user, openerp, when starting: use the ps aux | grep openerp command.

      It doesn’t sound like much is wrong – just take your time to make sure all the file permissions are correct.

      • Dear Alan,

        No luck so far, checked permissions, etc. I must not be understanding something. One thing though, does it matter whether I am using SSH or password login to run the console?


        • Alan Lord says:

          Hi Chris,

          Nope. It shouldn’t matter if you are logged in remotely or not.

          • Chris Peeters says:

            Hi Alan,

            Going through all with a fine comb now. I stumble on the problems of the linux dummy. Like how do I test the postgres password? I thought it is a normal linux user but it doesn’t do su – postgres, at least it keeps telling me the password is wrong. How do I check / set this?


          • Alan Lord says:


            The postgres user shouldn’t have a password by default.

            But to su to it you must use sudo (i.e. gain root privileges) first so:

            sudo su - postgres


      • Hi Alan,

        Thank you very much for the instructions and for helping me out here. Sorry it has taken so long for me to get back to this project. I must have done something wrong in one of the configuration files, I resolved the issue simple by downloading the openerp-server.conf and openerp-server again from the links in your instructions and then apply the required modifications. After that all went right and my OpenERP server is buzzing away now and serving the connected clients. Thanks Alan.


  • Gururaj says:

    Awesome explanation ! I did setup server on Debian 6.0.2 in just few minutes.

    Thanks a lot for yout time and patience in explaining this depth.


    • SCN says:

      Hi Gururaj

      Can you please share the knowledge. If any changes are to be made for installation on Debian 6.X.X?


  • Cheick Tall says:

    Nice, was very helpful 😉

  • Andy says:

    I have a major problem. I create a database form the web interface. then Im logged it but when I logout i cant log in again. Or the same happens when I restart the postgresql server. Ther is always the message that i provided a bad username or password.
    i tried everything that came up to my mind. I reinstalled postgre from scratch. reinstalled all the packages needed.

    Hope you can help me. let me know if you need further information to solve the problem.


    • Alan Lord says:


      I don’t really understand why that should be happening.

      My instinct would be to check your encoding settings, e.g. UTF-8 vs something else? But other than that I have no idea what could be wrong.

      Are there any errors being reported in the logs?

      • Andy says:

        After creating a database I restart postgresql. Then I restart openerp-server and web. But then I cant log in again. Everything works just fine before restarting.

        Here are some logs

        [2011-11-17 15:59:46,190][?] ERROR:httpd:Error occured when starting the server daemon.
        Traceback (most recent call last):
        File “/opt/openerp/server/bin/service/”, line 147, in __init__
        self.server = ThreadedHTTPServer((interface, port), handler, proto=self._RealProto)
        File “/opt/openerp/server/bin/service/”, line 75, in __init__
        HTTPServer.__init__(self, addr, requestHandler)
        File “/usr/lib/python2.6/”, line 400, in __init__
        File “/usr/lib/python2.6/”, line 108, in server_bind
        File “/usr/lib/python2.6/”, line 411, in server_bind
        File “”, line 1, in bind
        error: [Errno 98] Die Adresse wird bereits verwendet

        • Andy says:

          I’ve got openerp running some time ago. But didn’t use it anymore. So I also tried to install the 6.0.2 version. But I get the same result here. I think it has something to do with the sudo apt-get dist-upgrade. Maybe ther is some software in conflict… here ist the error I get from the 6.0.2 version

          ERROR:httpd:Error occured when starting the server daemon.
          Traceback (most recent call last):
          File “/opt/openerp/server/bin/service/”, line 147, in __init__
          self.server = ThreadedHTTPServer((interface, port), handler, proto=self._RealProto)
          File “/opt/openerp/server/bin/service/”, line 75, in __init__
          HTTPServer.__init__(self, addr, requestHandler)
          File “/usr/lib/python2.6/”, line 400, in __init__
          File “/usr/lib/python2.6/”, line 108, in server_bind
          File “/usr/lib/python2.6/”, line 411, in server_bind
          File “”, line 1, in bind
          error: [Errno 98] Address already in use
          [2011-11-17 17:56:29,304][aaa] ERROR:db.cursor:bad query: UPDATE res_users SET date=now() WHERE login=E’admin’ AND password=E’aaa’ AND active RETURNING id
          Traceback (most recent call last):
          File “/opt/openerp/server/bin/”, line 131, in execute
          res = self._obj.execute(query, params)
          OperationalError: server closed the connection unexpectedly
          This probably means the server terminated abnormally
          before or while processing the request.

          I hope you can help me!!

          • Alan Lord says:

            I think this line is your problem:

            error: [Errno 98] Address already in use

            Either the server is already running or something else (like apache or tomcat for example) is bound to the port(s) that OpenERP is trying to use.

            See this comment for more info

          • Andy says:

            I cant reply to your comment Alan because there is no reply link…

            You are right there seems to be some python stuff blocking the openerp ports. Ive changed the port settings in the openerp-server.conf but this doesnt change much here is the list with the acual port usage:
            netstat -alntp | grep LIST
            tcp 0 0* LISTEN 2706/python
            tcp 0 0* LISTEN 2706/python
            tcp 0 0* LISTEN 2706/python
            tcp 0 0* LISTEN 1062/mysqld
            tcp 0 0* LISTEN 11484/python
            tcp 0 0* LISTEN 2173/perl
            tcp 0 0* LISTEN 1564/apache2
            tcp 0 0* LISTEN 2706/python
            tcp 0 0* LISTEN 1228/vsftpd
            tcp 0 0* LISTEN 1184/sshd
            tcp 0 0* LISTEN 1420/master
            tcp6 0 0 :::22 :::* LISTEN 1184/sshd


          • Alan Lord says:

            I think there is a “nesting limit” on replies on the front end.

            That looks suspiciously like OpenERP is already running to me. Try something like ps aux | grep python to see what is currently running. Or grep for the Process id of what you show above “2706” and see what that is.

          • Andy says:

            Thanks a lot for your help. I havent got the time to continue searching for the problem but now i will try to solve it here is the result

            ps aux | grep python
            openerp 603 1.7 0.2 262176 34592 ? Sl Nov22 234:51 python /opt/openerp/web/ -c /etc/openerp-web.conf
            root 1387 0.0 0.0 45888 7836 ? S Nov27 0:06 python /usr/sbin/denyhosts –daemon –purge –config=/etc/denyhosts.conf –config=/etc/denyhosts.conf
            openerp 2706 0.0 0.7 434172 126880 ? Sl Nov11 21:23 python /opt/openerp/server/bin/ -c /etc/openerp-server.conf
            root 30324 0.0 0.0 7636 984 pts/0 S+ 20:05 0:00 grep –color=auto python


          • Alan Lord says:

            So openerp-server and openerp-web are both running already.

            That is why you can’t start it again.

  • amadou says:

    I’ve installed openerp-server for the first time. I keep getting this error when trying to connect to it from a client or browser

    [2011-11-15 20:33:50,391][template1] ERROR:db.connection_pool:Connection to the database failed
    Traceback (most recent call last):
    File “/opt/openerp/server/bin/”, line 303, in borrow
    result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
    OperationalError: server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.

    Thank you for helping me understand what I did wrong.

  • gabu says:

    thanks, very usefull!!!

  • lima2x says:

    Thank you so much for this great Tuto.
    I’d like to use both clients, so when you say :

    If you now start up the GTK client and point it at your new server you should see a message like this:

    How shall we install GTK Client with the same efficiency ?

    • Alan Lord says:

      Thanks. Installing the GTK client is easy – but you don’t want to do that on the same machine as the server. Just download the deb (or exe) from OpenERP, or copy the source tarball of the GTK client into your local ~/bin dir and run it from there.

      There are some dependencies required for the client – Google is your friend 🙂

  • Just wanted to say “thank you” for the excellent writeup. MUCH better than the official OpenERP documentation!

  • Neng says:

    really appreciate

  • weissi8 says:


    Also as a Windows User I managed to install openERP thanks.

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>