[Odoo 17] Install Odoo 17 using Docker on Mac Intel

Sania Rizqi
5 min readMar 7, 2024

--

Hi, Folks!

Odoo, the open-source business management software, has really stepped up its game in the latest version, Odoo 17. If you’re rocking a Mac with an Intel setup, I’ve got your back with a simple guide to walk you through the installation process. Let’s get Odoo up and running for all your business needs! 🚀

🧐 What is Local Server Odoo?

Local Server Odoo is one of Odoo Implementation, which runs on a personal computer or laptop, with the configuration done manually by the user.

What’s the benefit?

First of all, installing Odoo locally allows users to work without relying on an internet connection. This can be beneficial in situations where internet connectivity is unstable or unavailable. With local implementation, users can keep Odoo running and manage their business without any obstacles due to network issues.

Also, using Odoo locally gives the freedom to explore the different modules available without connectivity limitations. Users can test, integrate, and configure modules according to their business needs without depending on the internet availability. This allows users to design an Odoo system that fully suits their business processes without being limited by connectivity factors.

Furthermore, local installation also makes customization easier. By running Odoo locally, users have full control over the databases used, especially using PostgreSQL. This allows users to manage and configure the database according to their needs, including the settings of the ports used. This allows users to integrate Odoo with their IT infrastructure more easily and provides flexibility in setting the system configuration.

Prerequisites

Before diving into the installation process, ensure the following prerequisites are met:

Installing Docker

You can install docker using Homebrew with this command:

brew install docker

If you haven’t install Homebrew, you can run this command on your terminal:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Another way to install docker, you can install it at the following link and choose the one that suits your mac.

https://docs.docker.com/desktop/install/mac-install/

You can verify if Docker is installed correctly by running:

docker --version

Installing PostgreSQL

You can install PostgreSQL using Homebrew with this command:

brew install brew install postgresql

Or you can install PostgreSQL by following this link:

https://postgresapp.com/downloads.html

You can verify if PostgreSQL is installed correctly by running:

psql --version

🚀 Installation

  1. Create Docker Compose File.

After installing Docker and Postgresql, you must create several folders and files needed to store the required configuration. Make a folder on your computer, which will become your project environment:

mkdir -p ~/projects/odoo-docker
cd ~/projects/odoo-docker
touch docker-compose.yml
mkdir ./config && touch config/odoo.conf
mkdir ./addons

2. Add this content to your docker-compose.yml file. You can add this content through terminal or editor like Visual Studio Code.

version: '3.3'

services:
# Web Application Service Definition
# --------
#
# All of the information needed to start up an odoo web
# application container.
web:
image: odoo:17.0
depends_on:
- db

# Port Mapping
# --------
#
# Here we are mapping a port on the host machine (on the left)
# to a port inside of the container (on the right.) The default
# port on Odoo is 8069, so Odoo is running on that port inside
# of the container. But we are going to access it locally on
# our machine from localhost:9000.
ports:
- "8069:8069"

# Data Volumes
# --------
#
# This defines files that we are mapping from the host machine
# into the container.
#
# Right now, we are using it to map a configuration file into
# the container and any extra odoo modules.
volumes:
- ./config:/etc/odoo
- ./addons:/mnt/extra-addons

# Odoo Environment Variables
# --------
#
# The odoo image uses a few different environment
# variables when running to connect to the postgres
# database.
#
# Make sure that they are the same as the database user
# defined in the db container environment variables.
environment:
- HOST=db
- USER=odoo
- PASSWORD=odoo

# Database Container Service Definition
# --------
#
# All of the information needed to start up a postgresql
# container.
db:
image: postgres:16

# Database Environment Variables
# --------
#
# The postgresql image uses a few different environment
# variables when running to create the database. Set the
# username and password of the database user here.
#
# Make sure that they are the same as the database user
# defined in the web container environment variables.
environment:
- POSTGRES_PASSWORD=odoo
- POSTGRES_USER=odoo
- POSTGRES_DB=postgres # Leave this set to postgres

3. Add this content too to your odoo.conf .

[options]

admin_passwd = admin

# |--------------------------------------------------------------------------
# | Port Options
# |--------------------------------------------------------------------------
# |
# | Define the application port and longpolling ports.
# |

xmlrpc_port = 8069

# |--------------------------------------------------------------------------
# | Database Configurations
# |--------------------------------------------------------------------------
# |
# | Database configurations that setup Odoo to connect to a
# | postgresql database.
# |

db_host = db
db_user = odoo
db_password = odoo
db_port = 5432

4. Run the container

You can start up the container by running this on your terminal :

docker-compose up

5. Congratulations! The installation was successful. You can directly access your Odoo in your browser by typing http://localhost:8069 .

🔧 Set your Odoo up!

Once you access your Odoo on your localhost, http://localhost:8069, you’re gonna have this view:

Here, we create a database for Odoo. You can fill the form then click Create database.

After creating the database, you will be redirected to the login page. You need to login with the email and password that you registered when creating the database.

Tadaa!✨ Here is how Odoo 17 looks like. Now you can freely customize your Odoo locally.

What to do with daily workflow

You can easily start up the container by running this :

docker-compose up

To stop the container, you can use Ctrl+C.

Or you can easily use the Docker app to start and stop your Odoo container.

Here’s another command you could use for docker :

docker-compose up -d # Start containers up in the background

docker-compose restart # Restart containers

docker-compose stop # Stop containers

docker-compose down # Destroy containers (WARNING: This could destroy the data inside containers as well)

🎉Congratulations!

You’ve successfully installed Odoo 17 using Docker on your Mac. Now you can free to use Odoo locally!

Feel free to explore additional Docker features and configurations for fine-tuning your Odoo setup. Happy Odoo-ing!

--

--