RPI Computers

Installing an ERP and CRM with Odoo on Raspberry Pi

Big companies usually spend a lot of money to have complete ERP (Enterprise Resource Planning) and CRM (Customer Relationship Management) solutions. These products usually support business and internal tasks to perform correctly complex processes. Small companies usually adopt low-cost solutions (sometimes simple spreadsheets).

In this article, we’ll see a very simple way to setup Odoo on Raspberry Pi computer boards. Please note that Odoo has a resource-intensive installation process, so using a Raspberry PI 4 model B would be better, while the Raspberry PI 3 model B/B+ could result in a timeout error on your browser during the installation process (even this shouldn’t affect your installation, you may need only to reset the admin password as shown in this post).

What is Odoo

Odoo, formerly known as OpenERP, is an open-source enterprise resource planning (ERP) software that offers a suite of business applications to manage and automate various business processes. Odoo provides modules for various business functions, including accounting, inventory management, project management, customer relationship management (CRM), e-commerce, and human resources (HR).

Odoo is built on a modular architecture, which means businesses can choose which modules to use and customize them to suit their specific needs. This makes Odoo highly flexible and adaptable, allowing it to be used by businesses of all sizes and industries.

It has an Open Source basis (Community Edition), but its features can be easily expanded by adding modules and third-party apps and integrations. Odoo has also Customer Support and Commercial features to support the needs of all companies.

What We Need

As usual, I suggest adding from now to your favourite e-commerce shopping cart all the needed hardware, so that at the end you will be able to evaluate overall costs and decide if to continue with the project or remove them from the shopping cart. So, hardware will be only:

Step-by-Step Guide

Preparing the Operating System

Start preparing the operating system for your computer board. I suggest to install Raspberry PI OS Lite, as it doesn’t include a desktop environment, so resulting in a more performing solution. If your need, you can also install it on a Raspberry PI OS Desktop.

It is strongly recommended that you have updated your installation before starting:

sudo apt update -y && sudo apt upgrade -y

Install PostgreSQL

Our Odoo installation will keep data into a PostgreSQL database, also this residing in our Raspberry PI computer. Installing the database is as simple as running a single command:

sudo apt install postgresql -y

Installing Odoo

Also installing our Odoo instance is simple, but requires adding a new key:

wget -O - https://nightly.odoo.com/odoo.key | sudo gpg --dearmor -o /usr/share/keyrings/odoo-archive-keyring.gpg

and apt source:

echo 'deb [signed-by=/usr/share/keyrings/odoo-archive-keyring.gpg] https://nightly.odoo.com/16.0/nightly/deb/ ./' | sudo tee /etc/apt/sources.list.d/odoo.list

Issuing a new “sudo apt update” will now get packages also from the odoo repository and will allow us to install Odoo with the aptitude (apt) package manager:

sudo apt update -y && sudo apt install odoo -y

… and wait… The installation will require a while. Once finished, connect with your browser to the following URL (substitute <<YourRaspberryIpAddress>> with the required IP address):

http://<<YourRaspberryIpAddress>>:8069

You will see the following initialization page:

Complete the required fields (at your choice) and click “Create Database”:

Again, wait a while to complete the database configuration. Because of the heavy setup process, the page could result in a timeout. In this case, launch again in your browser the URL:

http://<<YourRaspberryIpAddress>>:8069

The login page will appear:

You should use your email/username and password. If everything is ok, you will be logged on:

If something went wrong because of the heavy installation, don’t give it up! You can use the admin password recovery procedure.

Admin Password Recover Procedure

Type the following terminal command:

sudo nano /etc/odoo/odoo.conf

Change the “admin_passwd = xxxxx” line, by setting your new password for the admin user. So, your odoo.conf should appear similar to the following:

[options]
db_host = False
db_port = False
db_user = odoo
db_password = False
default_productivity_apps = True
admin_passwd = my_supersecret_password

Edit the admin password with whatever you want, save and exit. Restart Odoo:

sudo systemctl restart odoo

Re-launch the default URL (http://<<YourRaspberryIpAddress>>:8069) in your browser and login using “admin” as Email and what you set in odoo.conf as password. If left as mine above, it will be:

Email: admin

Password: my_supersecret_password (the one you edited above)

You should now be able to use your Odoo installation.

Getting Started with Odoo on Raspberry PI

As seen, by default Odoo shows you the App list screen. At the top-right of your Odoo dashboard, you will find the menu button that enables you to switch between apps and settings. The Apps page is the one we’re coming from. When we’ll install new apps, we’ll find their shortcuts in the menù on top, near the menu button

The settings page lets you manage your users and companies. By default, only 1 user is available and you can add more with the “New” button, according to your needs:

Installing an App on Odoo

Odoo is like an empty box. You must add apps in order to get features and functionalities. There are free and paid apps available from the Odoo marketplace (the Apps page). Usually, the free ones have an “Upgrade” button in their widget, while the free ones have an “Activate” button. Let’s try, for example, to activate the Calendar App.

Back to the App dashboard, identify the Calendar widget:

Click the “Activate” button available from Calendar Widget. After the Calendar installation, the button will turn to “Installed”:

Within the same Calendar Widget, the menu on the top right corner will make it possible for to you uninstall the module.

Once installed, you can find the new app from the main menu button:

Here you can note that the Calendar app has also installed a number of additional Apps not required… It’s not a clear behaviour, but till they are free I can remove them one by one.

Now, going to the Calendar app, we’ll finally get our calendar page:

Odoo Documentation

The complete Odoo documentation can be found at the official Odoo docs.

Next Steps

Interested in more projects with your RPI? Take a look at peppe8o Raspberry PI computers tutorials pages.

Enjoy!

peppe8o

Open source and Raspberry PI lover

View Comments

  • Just for information:
    I tried with a Raspberry Pi 3B+ and nice to see the first screen after the installation (initialization page) but after setting up the database, i got always a timeout (trying to show the login page) :(
    So no working for me with a version lower than the Raspberry Pi 4!

    • Hi Adam,
      as said in this post, installation process after database setup is heavy and may lead to a timeout page. In this case, just wait a while and simply try querying again "http://YourRaspberryIpAddress:8069" page. This time it should work. Let me know if it goes ok.
      Many thanks for your feedback

      • Thanks,
        With my Raspberry pi 4 no problem, no timeout, all working perfectly :)
        The only step to add for me:
        Not to forget to setting locale config before installing PostgreSQL and odoo.
        Just follow these commands and PERL will not show any error:

        $ export LANGUAGE=en_US.UTF-8
        $ export LANG=en_US.UTF-8
        $ export LC_ALL=en_US.UTF-8
        $ locale-gen en_US.UTF-8
        $ dpkg-reconfigure locales

        *My first comment was concerning the installation in a Raspberry pi 3, I tried twice and was impossible to run it. But anyways, now with the Raspberry pi 4 everything runs great :)

        • Thank you for your feedback, Adam. Addictional ino for Raspberry PI 3B users: to have it working in setup phase, but generally to have the best from Raspberry PI, it is better to use performing SD cards. Performing SD card have the same effect that SDD disks have vs HDD disks on personal computers: if you boost speed on media hosting your OS, you have an overall improvement in performances. Other optimization tricks can be found at //peppe8o.com/4-tricks-to-improve-raspberry-pi-performance-and-power-consuption/

  • Better with 3 way command
    1)sudo passwd
    2)su root
    3)wget -O - https://nightly.odoo.com/odoo.key | apt-key add - && echo "deb http://nightly.odoo.com/13.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list && apt-get update && apt-get upgrade -y && apt-get install postgresql -y && apt-get install odoo -y

    4)localhost:8069 (aka PROFIT!)

  • Hello,
    During the installation I got this error:
    Errors were encountered while processing:
    odoo
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    Can you please help?

    • This is a generic final error alert. The cause should be available from previous terminal rows while installing, so I need to get the specific error to help you.
      Common causes may be a missing package from required ones, a missing permission, a missing folder, etc. Please try again installation process being aware to follow all steps (from update/upgrade ones) and post all error parts from your terminal

  • Thanks for this post!!!!!
    Can I change Odoo 12 by 14 in the installing odoo step?

    Sorry for my english, I speack spanish

    Maxi

  • Thank you for the tutorial. I was able to get to the point where I can create a database but after doing so and waiting a while, once I reload the website, I get a temporary error 500.
    How can this be troubleshoooted?
    Thank you

    • Hi Eliseu,
      please use the Admin Password Recover procedure step. The heavy database setup procedure can bring to 500 server error in Raspberry PI (expecially with not performing micro SD cards). However, the admin password recover procedure should do the trick. Please let me know if it works.

      • Hi Peppe8o,
        what I forgott to mention, I am trying this on a Raspberry Pi 2 with 32 bit OS (Maybe this is an issue? I have just ordered a new Raspberry PI 4 and will try it again once it has been delivered).

        I have just done everything from scratch again, but same result. After creating the database and waiting a while, error 500. I than tried the admin password recover procedure, but still getting teh 500 error.

        This is the content of the log file after restarting the odoo service, maybe you can recognize something where the problem might be?
        2020-11-11 14:27:35,441 1000 INFO ? odoo.service.server: Initiating shutdown
        2020-11-11 14:27:35,442 1000 INFO ? odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
        2020-11-11 14:27:42,554 1070 INFO ? odoo: Odoo version 14.0-20201111
        2020-11-11 14:27:42,556 1070 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
        2020-11-11 14:27:42,557 1070 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons', '/var/lib/odoo/.local/share/Odoo/addons/14.0']
        2020-11-11 14:27:42,558 1070 INFO ? odoo: database: odoo@default:default
        2020-11-11 14:27:44,456 1070 INFO ? odoo.addons.base.models.ir_actions_report: You need Wkhtmltopdf to print a pdf version of the reports.
        2020-11-11 14:27:44,940 1070 WARNING ? odoo.addons.base.models.res_currency: The num2words python library is not installed, amount-to-text features won't be fully available.
        2020-11-11 14:27:45,104 1070 INFO ? odoo.service.server: HTTP service (werkzeug) running on raspberrypi:8069
        2020-11-11 14:29:43,878 1070 INFO ? odoo.http: HTTP Configuring static files
        2020-11-11 14:29:44,222 1070 INFO itsn odoo.modules.loading: loading 1 modules...
        2020-11-11 14:29:44,492 1070 INFO itsn odoo.modules.loading: 1 modules loaded in 0.27s, 0 queries (+0 extra)
        2020-11-11 14:29:44,503 1070 ERROR itsn odoo.modules.loading: Some modules have inconsistent states, some dependencies may be missing: ['auth_totp', 'base_import', 'odoo_referral', $
        2020-11-11 14:29:45,791 1070 INFO itsn odoo.modules.loading: Modules loaded.
        2020-11-11 14:29:45,818 1070 INFO itsn odoo.addons.base.models.ir_http: Generating routing map for key None
        2020-11-11 14:29:46,200 1070 INFO itsn werkzeug: 127.0.0.1 - - [11/Nov/2020 14:29:46] "GET / HTTP/1.1" 303 - 12 0.087 2.203
        2020-11-11 14:29:47,177 1070 WARNING ? odoo.addons.base.models.ir_cron: Skipping database itsn because of modules to install/upgrade/remove.
        2020-11-11 14:29:48,952 1070 INFO itsn werkzeug: 127.0.0.1 - - [11/Nov/2020 14:29:48] "GET /web HTTP/1.1" 303 - 1 0.002 0.022
        2020-11-11 14:29:49,131 1070 INFO itsn werkzeug: 127.0.0.1 - - [11/Nov/2020 14:29:49] "GET /web/login HTTP/1.1" 500 - 4 0.030 0.063
        2020-11-11 14:29:49,204 1070 ERROR itsn werkzeug: Error on request:
        Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 270, in run_wsgi
        execute(self.server.app)
        File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 258, in execute
        application_iter = app(environ, start_response)
        File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 440, in app
        return self.app(e, s)
        File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 124, in application
        return application_unproxied(environ, start_response)
        File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 99, in application_unproxied
        result = odoo.http.root(environ, start_response)
        File "/usr/lib/python3/dist-packages/odoo/http.py", line 1294, in __call__
        return self.dispatch(environ, start_response)
        File "/usr/lib/python3/dist-packages/odoo/http.py", line 1262, in __call__
        return self.app(environ, start_wrapped)
        File "/usr/lib/python3/dist-packages/werkzeug/wsgi.py", line 766, in __call__
        return self.app(environ, start_response)
        File "/usr/lib/python3/dist-packages/odoo/http.py", line 1464, in dispatch
        result = ir_http._dispatch()
        File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 241, in _dispatch
        return cls._handle_exception(e)
        File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 209, in _handle_exception
        return request._handle_exception(exception)
        File "/usr/lib/python3/dist-packages/odoo/http.py", line 743, in _handle_exception
        return super(HttpRequest, self)._handle_exception(exception)
        File "/usr/lib/python3/dist-packages/odoo/http.py", line 314, in _handle_exception
        raise exception.with_traceback(None) from new_cause
        ValueError: External ID not found in the system: web.login - - -
        2020-11-11 14:29:50,096 1070 INFO itsn werkzeug: 127.0.0.1 - - [11/Nov/2020 14:29:50] "GET /favicon.ico HTTP/1.1" 404 - 2 0.018 0.031

        Thank you

        • Hi Eliseu,
          please try with RPI4. Installation process is already heavy for Raspberry PI 3 model B+, so older models can have too low performances to complete initialization process, resulting in inconsistent modules if timeouts occur during setup.

          Let me know if other issues occur with the new PI.

          Giuseppe

  • I am getting an error for the step: Installing Odoo:

    Warning: apt-key output should not be parsed (stdout is not a terminal)

    • Hi Abot. This is only a warning, not an error. So you should be able to continue by simply ignoring it.
      Let me know if works.

      • This is from my putty session. I'm a new user so I'm sure its something easy! :)

        root@raspberrypi:/home/pi# wget -O - https://nightly.odoo.com/odoo.key | apt-key add -echo "deb http://nightly.odoo.com/12.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list
        --2021-02-06 14:32:34-- https://nightly.odoo.com/odoo.key
        Resolving nightly.odoo.com (nightly.odoo.com)... 178.33.123.40
        Connecting to nightly.odoo.com (nightly.odoo.com)|178.33.123.40|:443... connected.
        Warning: apt-key output should not be parsed (stdout is not a terminal)
        HTTP request sent, awaiting response... 200 OK
        Length: 3112 (3.0K) [application/octet-stream]
        Saving to: ‘STDOUT’

        - 0%[ ] 0 --.-KB/s in 0s

        Cannot write to ‘-’ (Broken pipe).
        root@raspberrypi:/home/pi# apt update && apt install odoo
        E: Type 'gpg' is not known on line 1 in source list /etc/apt/sources.list.d/odoo.list
        E: The list of sources could not be read.
        root@raspberrypi:/home/pi#

  • This is from my putty session. I'm a new user so I'm sure its something easy! :)

    root@raspberrypi:/home/pi# wget -O - https://nightly.odoo.com/odoo.key | apt-key add -echo "deb http://nightly.odoo.com/12.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list
    --2021-02-06 14:32:34-- https://nightly.odoo.com/odoo.key
    Resolving nightly.odoo.com (nightly.odoo.com)... 178.33.123.40
    Connecting to nightly.odoo.com (nightly.odoo.com)|178.33.123.40|:443... connected.
    Warning: apt-key output should not be parsed (stdout is not a terminal)
    HTTP request sent, awaiting response... 200 OK
    Length: 3112 (3.0K) [application/octet-stream]
    Saving to: ‘STDOUT’

    - 0%[ ] 0 --.-KB/s in 0s

    Cannot write to ‘-’ (Broken pipe).
    root@raspberrypi:/home/pi# apt update && apt install odoo
    E: Type 'gpg' is not known on line 1 in source list /etc/apt/sources.list.d/odoo.list
    E: The list of sources could not be read.
    root@raspberrypi:/home/pi#

    • Ok. This should be a really rare problem. I bet you are copying commands from this page to a program like Microsoft Word (or somethig similar), then to your PI terminal. I say this because in wget command the second "-" doesn't appear to be a minus, but an insane MS Word char...
      Please, try to copy command to notepad and check that the "-" char before "https://nightly....." is a minus. Or use following:
      wget -O - https://nightly.odoo.com/odoo.key | apt-key add -

  • Just to be sure I manually typed it in as I was using notepad to make sure the line break in the commands given wouldn't break anything.

    root@raspberrypi:/home/pi# wget -o - https://nightly.odoo.com/odoo.key | apt-key add -echo "deb http://nightly.odoo.com/12/0/nightly/deb/ ,/" >> /etc/apt/sources.list.d/odoo.list
    Warning: apt-key output should not be parsed (stdout is not a terminal)
    root@raspberrypi:/home/pi# apt update && apt install odoo
    E: Type 'gpg' is not known on line 1 in source list /etc/apt/sources.list.d/odoo.list
    E: The list of sources could not be read.

    • This time your error comes from the lower case in "-o" option in wget, instead of upper "-O". Linux command options are case sensitive... Please copy from here and paste directily in your terminal following commands (in 2 different rows):
      wget -O - https://nightly.odoo.com/odoo.key | apt-key add -
      then, after this command execution:
      echo "deb http://nightly.odoo.com/12.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list

  • Where does odoo save its data!
    Question: If you have set up a Raid 1 system, which files and paths do you have to copy? And which conf must be edited so that odoo can find the data on Raid 1.

    • Hi Thomas,
      you are right, it is really hard to find in Odoo doc where data are stored. I watched at https://registry.hub.docker.com/_/odoo/?tab=description, where docs on installing official odoo image with docker are published. Usually, with Docker you map local volumes where data are stored to avoid data loss on container remotion. According to this document, it seems that Odoo data are in following folders:

      • Odoo web data: /var/lib/odoo
      • Odoo configuration: /etc/odoo
      • Odoo addons: /mnt/extra-addons
      • Odoo database (postgres) data: /var/lib/postgresql/data/pgdata

      Hope this can help you

Published by
peppe8o

Recent Posts

Some links in this post may be affiliate links. We may get paid if you buy something or take an action after clicking one of these, but without addictional costs for you compared to direct buying.

Making Money with Raspberry PI: Bandwidth Sharing Apps

In this tutorial, I will give you a few ways for making money with Raspberry…

24 hours ago

Raspberry PI OS Lite: Headless Install, Setup and Configure

Steps to install the lite version of Raspberry PI OS without Desktop Environment to provide…

2 weeks ago

Setup a TOR proxy with Raspberry PI (The Onion Router) with APT or Docker

This tutorial will show you how to install a TOR proxy in your Raspberry PI.…

2 weeks ago

How to Use Incremental Rotatory Encoder with Raspberry PI Pico

In this tutorial, I will show you how to connect and use an Incremental Rotatory…

3 weeks ago

Run Ollama in Raspberry PI: Self-Hosted Generative AI

This tutotial will show you how to install Ollama in your Raspberry PI, so getting…

1 month ago

Manage Raspberry PI GPU Memory Split

As you know, the Raspberry PI is a single-board computer (excluding the Pico). This means…

1 month ago