In this blog I will show you how to install Odoo version 13 on your Synology NAS. Once you have done that, you can implement a cool backend theme for Odoo 13.
There is now also a newer version of this post for installing Odoo 14 on your Synology NAS.
Docker is amazing. Odoo is also amazing. It’s a cool open source ERP project, formally known as openERP. They also have a paid solution where you can also get a Mobile App.
The free version however is fully functional and great to use as a test, development or sandbox environment.
Step 1. Login to you Synology NAS
Log into your synology nas. Do I need to say more? Business As Usual I expect.

Step 2. Install or Start Docker
If you have an older NAS (for this blog post I’m using the Synology 710+) you have to install the Docker package first. Open the Package Center, search for docker and install the package.

If you have a modern Synology NAS you will have the Docker package installed per default. You can then just hit Menu, next Docker. The dockerscreen will now appear. If you cannot find the Docker Package, please check if you NAS is supported on the Synology website.

Step 3. Download Docker Images
The Odoo installation will consist of two docker containers. One container will hold the database and the second container will hold the Application. The data will be persistent on you NAS. Synology has created a Docker share where you can store data.
We can start a container from an image. Lets start by downloading the images. We do this by searching the docker hub. This is configured by default in your Synology.
Download the odoo image:

Click on download to select the version you want. In our case we want version Odoo version 13.

Next we will search in the Register for ‘postgres’. Postgres is an open source database solution that is popular among many projects.
Search for it and press Download. For Postgres we will choose the latest version (latest Tag).

We are now complete and have downloaded everything we need to our Synology NAS, at least, when the download is finished. You can monitor that in the images tab.

Lets start and spin up some containers :-).
There are two options to start the containers. One, there is a Wizard, which this tutorial will guide you through. Second, a more commandline based option which I will not discuss at the moment.
Step 4. Start Database – Postgres
In the image tab, select Postgres, then click Launch. The first thing we need to do is give it a good name. We don’t have to expose ports because this database will not be reachable outside the Docker network.

Next we can provide limitations to the container, you can play around with that later, or not. You can also create a shortcut on the desktop. You can do that and that is a perfect assignment for when you want to do it again.

On the summary screen, check the ‘Run this container after the wizard is finished’

Before we can apply we need to add some environment variables. This will configure the database to your needs. In this example we set three variables: POSTGRES_USER
. POSTGRES_ PASSWORD
and POSTGRES_ DB
. These are the default settings of the Odoo image that we are using so we don’t need this configuration there.

If you want you data to persist (meaning it will not be gone when you delete this container) you can add a volume within Advance Settings. Below is an example where the data will be stored in /docker/odoo-pgdata on the NAS. If you just want to play around, leave it as it is.

For now we will leave that so we go to the summary postgres screen.

After clicking apply, the container will try to start immediately. You can check the status of the container going to the Container tab.

This all seems oke, and we now have successfully installed a postgress database with (maybe) no knowledge of postgres, linux or docker. How great is that?
Step 5. Start Odoo 13
Now that you already had such a thorough walkthrough, the Odoo container we’ll do a little bit compact. Click on the image and press Launch.
To be able to access the container we need to expose a port from inside the container to the outside. Add 8069 as local and container port.

Skip step 2 of the Docker wizard. After clicking next we can start configuring the advanced settings.
The Odoo container will look for the hostname db for the connection. However our container is called odoo-postgres so we have to make a link in the wizard.

With this link created the container is almost ready to start. Check the ‘Run this container after the wizard is finished’ and press apply.

To monitor the status of the odoo application go to the container tab. The container and the application should start in a couple of seconds.

We are now done with out activities. We have now installed a postgres database and an Odoo container that can connect to the database by providing a link. You did this without the need to know anything about linux, databases or installation scripts :-). Very good.
Step 6. Test Odoo Installation
Time to test the application. Goto the ip address of you Synology and add goto the exposed port. In our case this is 8069. After a clouple of seconds you should get the following screen where you can start you Odoo adventure.

Further reading
More information on the specific docker images and their parameters can be found below.
Docker images
Postgres | https://hub.docker.com/_/postgres |
Odoo | https://hub.docker.com/_/odoo |
Implement Odoo Backend theme
Interested in having a cool looking backend theme as shown below? Checkout this post, I created for you.

Final words
Hope you enjoyed this, step by step instruction to get up and running with Odoo and Docker. Did you try it, did I mis a step, let me know in the comments.
Subscribe to our newsletter!
10 replies on “Installing Odoo13 on a Synology (using Docker)”
Hi, thanks for your tutorial, I have followed it.
but it doesn’t work for me, I don’t understand why,
If you want to see, I get this messages IR module doesn’t exist…
stdout
14:52:32 2020-06-16 14:52:32,630 1 WARNING ? odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database db. stdout
14:53:30 2020-06-16 14:53:30,693 1 ERROR db odoo.sql_db: bad query: SELECT latest_version FROM ir_module_module WHERE name=’base’ stdout
14:53:30 ERROR: relation “ir_module_module” does not exist stdout
14:53:30 LINE 1: SELECT latest_version FROM ir_module_module WHERE name=’base… stdout
14:53:30 ^ stdout
14:53:30 stdout
14:53:30 2020-06-16 14:53:30,694 1 WARNING ? odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database db. stdout
14:53:33 2020-06-16 14:53:33,683 1 ERROR db odoo.sql_db: bad query: SELECT latest_version FROM ir_module_module WHERE name=’base’ stdout
14:53:33 ERROR: relation “ir_module_module” does not exist stdout
14:53:33 LINE 1: SELECT latest_version FROM ir_module_module WHERE name=’base… stdout
14:53:33 ^ stdout
14:53:33 stdout
14:53:33 2020-06-16 14:53:33,683 1 WARNING ? odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database db.
Thank you
Jules
Hi Jules,
Can you tell me where you get these errors? Is this while installing, while logging in, while installing modules.
Let me know.
Thanks,
Stuart
https://ip:8069
can’t establish a secure connection to the server “ip”
my network is using “bond”
port setting
local port 8069
container port 8069
type tcp
process identifer
15807
Execution command
/usr/bin/python3 /usr/bin/odoo –db_host 172.17.0.2 –db_port 5432 —
db_user odoo –db_password odoo
which part i done wrong?
Hi Stuart, Thanks for this tutorial,
I followed the same steps as given, both containers are running now, there is no error in log, but odoo is not running on browser, Can you give me hint where i am making mistake?
Hi Raj, What kind of error do you get in the browser? Did you use the correct port? Maybe a port was generated by the docker system that you need to use.
It works on DS 218+.
Thanks!
How to install Let’s Encrypt SSL in this ?
If you want to add a Let’s Encrypt Certificate you logon to your Synology. You goto to the Control Panel. Goto Security, then navigate to the Certificate tab.
If you have a recent Synology you will have the option to Add -> New Let’s Encrypt certificate.
Hi thank you for this tutorial, however it doesn’t work for me. When i use the settings on your slide “Setup postgres environment variables” The postgres container fails to start. In the log file for postgres I get the this error message.
“Error: Database is uninitialized and superuser password is not specified.
You must specify POSTGRES_PASSWORD to a non-empty value for the
superuser. For example, “-e POSTGRES_PASSWORD=password” on “docker run”.
You may also use “POSTGRES_HOST_AUTH_METHOD=trust” to allow all
connections without a password. This is *not* recommended.”
So when I add “POSTGRES_HOST_AUTH_METHOD=trust” to the environment variable the container no longer crashes but when I try to connect to https://ip:8069 my browser says “This site can’t be reached”
on your slide “Setup postgres environment variables” those settings don’t work for me. Are the settings in the picture
In order to simplify the whole installation process of odoo in the latest version, it is recommended to work with portainer and deploy the stuck from there. All in all, copy the settings and put in the relevant place> deploy and that’s it. It works great.