Installing Odoo 9 on Ubuntu 14.04

Hi guys,

1. Introduction

In this tutorial I will learn you how to install Odoo 9 on Ubuntu 14.04. The script that you will use is based on the code from André Schenkels but has been updated and improved.

2. Downloading the script

The first step is to download my script from Github and to add the code in a new .sh file on your Ubuntu machine, wherever you’d like this.
For example right under /home. Open up an Ubuntu terminal and cd to the directory where you’d like to keep the script and then create the file:

If you’re curious about how the whole code looks and works you can find it on my Github account.

Now open up the file and edit the parameters to your liking:

There are some things you can configure/change to your likings at the top of the script. You can choose if you wish to install Wkhtmltopdf or not, which version you’d like, where the location is and most importantly what the master admin password is. Tip: always modify this for every Odoo you install!

3. Making the Odoo installation file executable

The next step is to make this file executable. After you’ve made it executable you can execute it and everything will be installed automatically.
do this with the following command:

4.Running the script

Now that the code is in your file and the file is executable you simply have to execute it with the following command:

You will see that the script automatically starts updates, downloads required packages, creates the user, downloads the code from Github, …
Give the script a few minutes to configure and install everything and eventually you will see something like this:
Result install script

You now have a fully functional Odoo V9 on your system! Congratulations.
Odoo V9

5. Extra information

In the script you saw there was an option to change the Odoo port (OE_PORT). When you’d change this port number to 8070 in the install script it would be applied to /etc/your-config-file.conf and this would give you the ability to change the default port.
To apply these changes you should do the following:
Changing Odoo settings
The -c will change the configuration and memorize what you’ve changed under /etc/your-config-file.conf. Because my port was set to 8070 this is telling the Odoo that it should run on port 8070. When you would now open up your browser and navigate to http://localhost:8070/ you will see it is running there:
Odoo V9 alternative port

Has this tutorial helped you, do you have any feedback or questions? Post away!




Odoo Experts

112 thoughts on “Installing Odoo 9 on Ubuntu 14.04

  1. Federico says:

    Nice job Yenthe!
    I see you left unchanged the port and the service name on the script but on the second-last picture you’re clearing using a different service/server name and on the last picture the port is 2044 not the stock 8069. I know you did it because you’re using various versions (like me), but it could generate a little confusion for the average user. Good to know you forced wkhtmltopdf 0.12.1 directly from the script.
    How is the stability now? I’m still having issues with the new POS and my old python scripts.

    • Yenthe666 says:

      Hi Federico,

      Thanks for the feedback! You’re right that the screenshots are different from the script. I wanted to show the differences that are possible with the script and how easy it is to modify the port for example. (with a simple sudo service odoo-server -c /etc/odoo-server.conf for example).Do you think I should change those screenshots to the default and that I should just add an extra chapter at the end explaining the possibilities?
      The stability is pretty good, it seems to increase in every version and 9.0 isn’t officially released yet so! 🙂

      • Federico says:

        A last, little, chapter about the configuration of the port and of the server could be a good add. But keep in mind we are speaking about average user, not developers. Your call. 🙂

        • Yenthe666 says:

          Hi Federico,

          Understood. I’ll simplify what I have now, change the pictures and I’ll try to add that chapter in tommorow. 🙂 Thanks a lot for the feedback!

    • Eli says:

      How can I update Odoo, If I used your manual to install it. I’m having some bugs that I believe can be resolved using an update.

      • Yenthe666 says:

        Hi Eli,

        You can easily navigate into the Odoo directory and do a git pull to update your code. For example:
        cd /odoo/odoo-server/
        git fetch origin 9.0
        git reset –hard origin/9.0
        Then do a -u all of the database and you have the newest code. Watch out with git reset –hard though, any code added in default modules (which is against the rules) will be removed.

        • Julian says:

          Ok thanks for that. Interestingly, I’ve seen many developers advocating use of git pull, which in the right circumstances is fine.

          For safetys sake I will read up on creating a module for my chnages just to be on the safe side.

          Thanks for your explanation , I’m not sure if its often explained as clearly as you have here 🙂

  2. I try install:
    sudo ./odoo9_install.sh
    everything goes running but it can not continue in:
    —- Setting permissions on home folder —-
    * Create server config file
    * Change server config file
    * Create startup file
    * Create init file <–Take long time and can not continue, please help… Thank you ;-).

    • Yenthe666 says:

      Hi Charlie,

      Never had this problems. I suspect you’re using some sort of forwarding for the domains like Nginx? Seems like something is still wrong there. Are there any Odoo specific errors about this in your logfile or terminal?

  3. Another issue in the script discovered:

    —- Create custom module directory —-
    mkdir: cannot create directory ‘/odoo/custom’: Permission denied
    mkdir: cannot create directory ‘/odoo/custom/addons’: No such file or directory

    OS: Ubuntu 14.04.3

      • I grabbed the latest version of the script yesterday around 10pm, so assume that this is the latest version?

        I’ll try and restore to the barebone snapshot and give it a go again now with AppArmor uninstalled.

        • Yenthe666 says:

          Hi Charlie,

          Perhaps it is nice to give this a try on a clean VM, which is not in production? Either way if you run in to problems again drop me an e-mail at yenthe.vanginneken@vanroey.be or make an issue on Github. Then I can help you from there on. 🙂

          • It’s been tried on a clean Ubuntu 14.04.3 LTS with OpenSSH as the only thing installed. Tried again yesterday after uninstalling AppArmor, but with no prevail.

            I run a datacenter, so development / production env. might be a bit blurry 🙂
            The server were deployed as per regular daily practice and still the script gives us internal server errors after installation.

            I’ve tried 4 different scenarios now and are skipping further testing till we for certainty have a tested and working solution.

            Nice job though, with the script!

          • Yenthe666 says:

            Hi Charlie,

            This is really strange as I tried multiple ways and I never run in to any problems. Are you sure that the script isn’t limited / blocked to do some operations? Drop me an e-mail at yenthe.vanginneken@vanroey.be and we’ll sort this out. Thanks for the feedback too!

    • Yenthe666 says:

      Hi Carlos,

      This depends on how you configure this installation script. If you would take my example your addons folder would be under /odoo/odoo-server/addons

  4. Ashish Vijayan says:

    OMG, 1st when I saw your explanation, I thought it wont work. Because, I have installed 8 version, & it was like typing lots of several codes in terminal. But this one, I must say you my friend, its amazing. Great one. It was very simple. Very simple means…..Very Very Very simple. Thanks.. Thanks a lot…………….

  5. Thank you very much for you great script, people like you are wondeful. Do you want a coffe? send me the link for donations.
    Have a nice day.
    🙂

    • Yenthe666 says:

      Hi Carlos,

      Thank you for the great feedback! This is really nice to read 🙂 I’m more then happy that I can help people and save them some time, that is what I started blogging for. So just subscribe to my blog, keep an eye out for it and I’m happy! I don’t like to ‘beg’ for donations hehe 🙂

  6. Yenthe666 says:

    Hi Ziada,

    Thanks! No you do not need any apache server or anything else. Do you get an internal server error or really nothing? Follow the progress of the shell script and see where it gives a problem. I assume you have a rights problem!

  7. Nikolaos says:

    Thank you for your tutorial. You saved me a lot of time.
    i kindly ask you if you can upload an update procedure.
    Best regards
    Nikos

    • Yenthe666 says:

      Hi Nikolaos,

      No problem, I’m happy to hear it has helped you! Do you mean as in how to update your codebase from Github with your local installation? That would be:
      sudo su yourOdooUser
      cd /your/odoo/location
      git pull origin 9.0

    • Yenthe666 says:

      Hi Ynca,

      Ofcourse you can! Change the portnumber to 80 for example and it will run on port 80. Be sure to have nothing else running on the port though! Another way is to setup an Nginx redirect to port 80.

  8. sebastien says:

    Once again thanks for your help.
    Test on two differents VM :
    – 1 core (Sandy Bridge) / 1,7GB of RAM
    – 1 core (Ivy Bridge) / 3,75GB of RAM
    Don’t see any difference (only 8 users) so we’ll stay on the small one (very attractive price)

    • Yenthe666 says:

      Hi Sebastien,

      No problem at all! As for your two different VM’s: The RAM will only matter if you have a lot more users and a lot of calculations from within your Odoo. Otherwise you will be fine with 1.7GB!

    • Yenthe666 says:

      Hi Beruh,

      Thanks a lot for the feedback! So after using the script from Github everything went fine? Do you have any idea what made the script stop? I can’t reproduce the problem some people have sadly..

  9. Carlos Rivera says:

    Hi, in this version, where i can enable Technical Features for adminstrator?, to see the menu options “Update Module List” or how i can load mymodule and install it?

    in terminal i do:
    cd /odoo/odoo-server
    sudo ./odoo-py scaffold mymodule /odoo/custom/addons
    cd /odoo/custom/addons/mymodule and add some fields in models.py and edit templates.xml but in my dashboard i can not see the option to update module list.
    Thank you.

  10. Dare Ojo-Bello says:

    Hi,

    I took time to read all of the comments and I am specially thrilled by the fact that you found time to reply every single comment.

    One quick question before I test this script.

    Which is stable for Odoo 8? Ubuntu 12.04 LTS or Ubuntu 14.04 LTS

    Thanks
    Dare

    • Yenthe666 says:

      Hi Dare,

      I try to answer all questions. 🙂 Both 12.04 and 14.04 should be perfectly stable for Odoo 8. I personally always use 14.04 and never had any problems.

  11. Robert R says:

    Thats correct. When I have some time this week, I’ll try your script again, on a fresh VM. I’ll let you know how that goes.

    • Yenthe666 says:

      Hi Robert,

      Thanks for the feedback! I assume this is really a problem with copying from the blog and some character not being converted correctly.. Keep me updated!

  12. Ogami says:

    Hi, Thanks a lot for the script. I wonder if there is an easy way to remove completely odoo 8 from a debian server. Thanks

    • Yenthe666 says:

      Hi Ogami,

      At the moment there aren’t any good uninstallation scripts around.. You would have to remove the user, the service, the code and the config files manually.

  13. advancedalarmtec says:

    When I copied from your blog it got stuck where the previous comments were. When I went to your GitHub site and copied it, the install went 100% Thank you so much for your time and effort!

    • Yenthe666 says:

      Thanks a lot for your feedback and the information! Looks like this confirms the fact that my blog does not correctly escape something in the code. I’ll look in to a fix/alternative for this!

  14. Hi Yenthe,

    Thanks you very much for the easy installer, worked fine no issues.

    I am planning to launch SAAS ( Software as a service) for Odoo. So that small vendors can easily afford the price. I am thinking of having following options:

    1. Each company to have its own subdomain. For example
    My main hosting is at http://erp.kss.com

    And there is a customer, “xyz”. So his domain will be
    http://xyz.kss.com

    2. Each company to have specific database. ( I believe I can create one for each company)

    3. Each company to have its own individually subscribed module set.

    4. Each user to have specific level of access on selected modules only. For example, a worker can upload time sheets, see his pay, apply for leave, and see job assigned. An account incharge can see all worker salaries, etc, where as the owner of business can see how much are expenses for each job, and what is net profit earned, which is not seen by even accountant.

    5. Can each company have any specific fields added on specific form? (user input)

    6. Can a company have seperate work flow, or a stage of processing etc added, which is custom, and not available to other customers.

    Overall, no customer should be able to browse any other company’s data, everything should be isolated.

    — How do I do this?

    not sure where do I start. Any pointers?

    Warm Regards,
    Anand Khatri

  15. Good morning and thanks for you tutorial,
    try to do all you explain here but i face an issue. i get the message bellow. and after verification it seems that there is no application on the port 8069.
    can you help me
    Regards

    Page Web inaccessible

    ERR_CONNECTION_REFUSED
    Masquer les détails
    La tentative de connexion de Google Chrome à 178.170.72.104 a été rejetée. Il est possible que le site Web soit bloqué ou que votre réseau ne soit pas correctement configuré.

    • Yenthe666 says:

      Hi Abdou,

      Check if the Odoo service is up and running (do a ls -l in a terminal to find it) or try to restart the service (sudo service odoo-server restart).

  16. This is good. but you really should be instructing people to use RDS instead of having postgres on their main server. It’s safer and WAYYYY easier to upgrade to the next version when it comes out.

    • Yenthe666 says:

      Hi Nolan,

      What exactly do you mean with you should be instructing people to use RDS instead of having postgres on their main server? Do you mean the separation of the databases and the Odoo codebase on two servers?

  17. Marcus P. says:

    Hi Yenthe, nice install script. Everything works fine.

    Now after two month experience the question of updating the system Comes up. So how to run updates?

    Should I use apt-get update? Will this also update odoo? Will this also update the modules? Or should i use the update button of each module?

    How do you keep your system up-to date?

    I am also asking to benefit from the latest bug-fixes in odoo v9 as it is constantly improved.

    Thanks

    Marcus

    • Yenthe666 says:

      Hi Marcus,

      The progress of updating your Odoo codebase is really easy.
      1) move into the correct directory, for example: cd /odoo/odoo-server
      2) git fetch origin 9.0
      3) git reset –hard origin/9.0
      Do note that this hard reset removes any changes that you made if they are in the default Odoo modules (which is against the rules anyways).
      After this the code has been fully updated but you still need to update this to the database. Stop your Odoo service (sudo service odoo-server stop) and then start it up in the terminal with a -u all to update all modules in your Odoo! (for example: ./odoo-py -u all –xmlrpc-port=8080)

  18. Sanjay Arora says:

    Yenthe

    What do you think of installing Odoo via a Docker container, for an added layer of isolation & re-provisioning?

    Have you tried it?

  19. Nouman says:

    Hi there i am receiving a n error while making install odoo file executable system says “chmod: cannot access ‘odoo-install.sh’: No such file or directory”

    • Yenthe666 says:

      Nouman,

      Sorry I’ve recently rewritten this blog post to make it easier and I made a type, saying odoo-install.sh in place of odoo_install.sh, it is edited now!

  20. Yenthe666 says:

    Hi Mugisha,

    1) Download the module from Github or somewhere else
    2) Place it in your addons folder (for example: odoo/odoo/addons)
    3) Open up your Odoo and update your modules list (from the apps module and don’t forget to have the developer mode activated)
    4) Go to apps and search for your newly added app
    5) Click install

  21. Oscar says:

    What about as far as bug fixes or updates to current odoo is that done automatically through git hub when ever I pull from it and do installations. Would you recommend updatinh it by backing up doo database and repulling and restoring the database. I know error are always possible but how reliable is the git hub repository? Thanks maybe with Ubuntu 16.04 containers might make solve some of issues like updates and compatibility… Thank you I will donate for your time.

    • Yenthe666 says:

      Hi Oscar,

      I’d recommend you to take a dump of your database before backing up, just in case something would go wrong. I’ve needed it once in 1.5 year, so it shouldn’t happen to often but then you have a way back.
      The github repository is very stable, I barely have any problems with it. If anything would go wrong you can just update your repo again anyways, so it is not like you’re locked out forever.
      I always do a git pull to update the Odoo code and then a -u to update the database and so far this works out perfectly for me. 🙂
      And if you’d choose to donate: thanks a lot already!

  22. Hi I am new to this world, and managed at first attempt to install Odoo onto my Ubuntu server. It says it has loaded the South African accounts. But the re are no accounts, only the 2 bank accounts I created in the guided set up.

    Do you have a fix? I had a similar issue on a Windows install, and couldn’t get the default tax accounts to work in their respective product etc drop-downs.

    • Yenthe666 says:

      Hi Taylor,

      Thanks a lot! At the moment I don’t have a tutorial (and neither have I tested) about Fedora!
      Perhaps you could give my script a try on it?

  23. alex says:

    Hello!

    Is it no longer possible to clone the enterprise addons from github? I was very suprised as my odoo partner told me, they are not allowed to provide me the enterprise version.

    We have an Odoo Enterprise Contract and we are not allowed to install it by ourselves?

    This is really dissapointing…

    • Yenthe666 says:

      Hi Alex,

      Enterprise code has never been public, you can only access it when you are an official partner or when you have bought the Enterprise. In these cases you should be allowed to install it by yourself.

  24. Balam Eliseo Barron Ortiz says:

    Perfect tanks and i hope you can build for other S.O. i dont now maybe centos or arch.

    • Yenthe666 says:

      Hi Balam,

      Thanks! I will soon experiment with CentOS so I’ll try to create a tutorial about that in the next weeks/months too.

      • Sanjay Arora says:

        Yenthe,

        Would you please do a tutorial of correct odoo 9 automatic install via Docker, with postgresql & odoo in different containers. I have been trying but not getting anywhere.

        And I have question too, if you know the answer I would be very grateful. How does odoo scale? Is there a way to put it behind a load balancer & directing reads to multiple slave instances & writes to master? Or any other system?

        Thanks.
        Sanjay.

        • Yenthe666 says:

          Hi Sanjay,

          Creating Odoo environments in Docker is on my to-do list, I just didn’t get to it yet! Separating the postgreSQL and Odoo can probably be done with external authentication but I don’t really see a plus side in it? As for scaling, load balancing etc.. Have a look at Nginx and Pgpooler.

  25. Federico says:

    Yenthe, my friend!
    This version of the script is a BIG step forward compared with the last I’ve tried. Congratulations!
    Now it become my stock installer on new servers even if just for V8, I’m still having big issues to convert my script on V9…

    • Yenthe666 says:

      Hi Federico,

      Nice to see you like it and that it works nice! What exactly do you mean with ‘I’m still having big issues to convert my script on V9…’?

      • Federico says:

        I have many with the old API, many lines of code, but the bigger problem is I can’t get the auto refresh module works on V9. Need time to migrate…

        • Yenthe666 says:

          Create an issue on my Github account (under odoo_samples). I had to create an automatic refreshed view for V9 recently. If you create an issue on Github I’ll post an example on it.

    • Yenthe666 says:

      Hi TuanNa,

      More than welcome! Judging by your IP it is a public IP, not the local IP. On the server that you’ve installed it on it should be accessible (For example 192.168.2.1:8069). Putting this publicly available has to be done on your firewall / router / … depending on your network setup.
      Being able to Access it without a port should be done with port forwarding. Either do this with Nginx or make it run on port 80 by default.

  26. Hi,

    I am having similar issue like TuanNa, but only when I try to access Odoo from a network computer..

    I have serveral ubuntu/windows systems where I want to access odoo setup done on a single server..

    the url on server 192.168.1.8:8069 works perfectly fine.. but when tried on network computer it dosnt work..

    however xampp installed on the server is working from any network computers when called using an ip..

    Can you suggest anything?

    Looking forward.

    • Yenthe666 says:

      Hi VirJ,

      This really sounds like a networking / firewall issue and there is no way to tell you what is wrong remote. This sounds to me like your Odoo service isn’t publicly available and that it is blocked somewhere along in your network.

    • Yenthe666 says:

      Hi Jim,

      Not with the default Odoo command line but you could do this with ERPpeek. This Python library allows you to install modules and run commands on the Odoo from Python code. You could then trigger those commands when the database is created to install it.

  27. Matt says:

    Hi Yenthe,

    Set up went smoothly and I was able to open Odoo once without troubles. On coming back, I got a 500 internal server error. Something to do with postgresql user error on googling? Any ideas?

    Thanks,
    Matt

    • Yenthe666 says:

      Hi Matt,

      Sounds to me like you’ve got some issues with not enough rights. Check out the logfiles and google the error code. 🙂

  28. Jayanthi says:

    I already have a odoo8 installation, I tried this script with Port 8070 and the installation went through successfully, but the page localhost:8070 doesnt load .
    Please advice

    • Yenthe666 says:

      Hi Jayanthi,

      Looks like something went wrong and that your installation didn’t finish / succeed. Have a look at your logfile (under /var/log/odoo) in order to found out what is wrong.

  29. Frank says:

    Hi Yenthe,
    I have the Community version of ODOO 9 running fine on an Ubuntu 14.04 VPS and when I login to the console, Ubuntu recommends to upgrade to Ubuntu 16.04 LTS with ‘do-release-upgrade’. Should I do that? Will it give problems with the present Odoo installation?
    Thanks.

    • Yenthe666 says:

      Hi Frank,

      An upgrade from Ubuntu 14.04 to 16.04 shouldn’t give any problems. I’d suggest you to take a copy of the server though, just to be absolutely sure.

  30. Thnx, this script was golden! Installed everything fast and quickly. That’s how the tutorials should look like 🙂

    All the best,
    Gen

  31. Hi Yenthe, Thanks for the script. When I followed the script everything was fine and no error until last system messages as per in the script.
    When i go thru firefox browser localhost:8069 I received the following:
    “An error occurred during a connection to localhost:8069. SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long)
    The page you are trying to view cannot be shown because the authenticity of the received data could not be verified”.

    Would you please advise me the solution to this problem.

    Highly appreciate your response.

    • Yenthe666 says:

      Hi Indra,

      You’re welcome! The issue you describe above is coming from your HTTPS. You either have a self signed certificate or something is wrong with it, both cause this notification. Have a look at some SSL and HTTPS tutorials, it is an often explained topic.

  32. Indra says:

    Hi Yenthe,
    Thanks for your quick response, I will follow up your advice.
    The problem was on the laptop when i install on the desktop no problem at all, worked fine I feel great thanks once again.

Leave a Reply

Your email address will not be published. Required fields are marked *