Install docker and docker-compose yourself, then run the following to set up first Odoo instance @ localhost:10019 (default master password: minhng.info):
curl -s https://raw.githubusercontent.com/minhng92/odoo-19-docker-compose/master/run.sh | bash -s -- --destination odoo-one --port 10019 --chat 20019and/or run the following to set up another Odoo instance @ localhost:11019 (default master password: minhng.info):
curl -s https://raw.githubusercontent.com/minhng92/odoo-19-docker-compose/master/run.sh | bash -s -- --destination odoo-two --port 11019 --chat 21019Arguments:
--destination: Odoo deploy folder (e.g., odoo-one)--port: Odoo port (e.g., 10019)--chat: Live chat port (e.g., 20019)--password: Master password (admin_passwd). Optional, defaults to the value in etc/odoo.conf.--db-password: PostgreSQL password (env POSTGRES_PASSWORD/PASSWORD). Optional, defaults toodoo19@2025.
Example with a custom master password:
curl -s https://raw.githubusercontent.com/minhng92/odoo-19-docker-compose/master/run.sh | bash -s -- --destination odoo-one --port 10019 --chat 20019 --password test1234Example with custom master + database passwords:
curl -s https://raw.githubusercontent.com/minhng92/odoo-19-docker-compose/master/run.sh | bash -s -- --destination odoo-one --port 10019 --chat 20019 --password test1234 --db-password dbSecret123If curl is not found, install it:
$ sudo apt-get install curl
# or
$ sudo yum install curlStart the container:
docker-compose upThen open localhost:10019 to access Odoo 19.
- If you get any permission issues, change the folder permission to make sure that the container is able to access the directory:
$ sudo chmod -R 777 addons
$ sudo chmod -R 777 etc
$ sudo chmod -R 777 postgresql- If you want to start the server with a different port, change 10019 to another value in docker-compose.yml inside the parent dir:
ports:
- "10019:8069"
- To run Odoo container in detached mode (be able to close terminal without stopping Odoo):
docker-compose up -d
- To Use a restart policy, i.e. configure the restart policy for a container, change the value related to restart key in docker-compose.yml file to one of the following:
no= Do not automatically restart the container. (the default)on-failure[:max-retries]= Restart the container if it exits due to an error, which manifests as a non-zero exit code. Optionally, limit the number of times the Docker daemon attempts to restart the container using the :max-retries option.always= Always restart the container if it stops. If it is manually stopped, it is restarted only when Docker daemon restarts or the container itself is manually restarted. (See the second bullet listed in restart policy details)unless-stopped= Similar to always, except that when the container is stopped (manually or otherwise), it is not restarted even after Docker daemon restarts.
restart: always # run as a service
- To increase maximum number of files watching from 8192 (default) to 524288. In order to avoid error when we run multiple Odoo instances. This is an optional step. These commands are for Ubuntu user:
$ if grep -qF "fs.inotify.max_user_watches" /etc/sysctl.conf; then echo $(grep -F "fs.inotify.max_user_watches" /etc/sysctl.conf); else echo "fs.inotify.max_user_watches = 524288" | sudo tee -a /etc/sysctl.conf; fi
$ sudo sysctl -p # apply new config immediately
The addons/ folder contains custom addons. Just put your custom addons if you have any.
- To change Odoo configuration, edit file: etc/odoo.conf.
- Log file: etc/odoo-server.log
- Default database password (admin_passwd) is
minhng.info, update it via--passwordor in etc/odoo.conf#L75
Run Odoo:
docker-compose up -dRestart Odoo:
docker-compose restartStop Odoo:
docker-compose downIn docker-compose.yml#L20, we exposed port 20019 for live-chat on host.
Configuring nginx to activate live chat feature (in production):
#...
server {
#...
location /longpolling/ {
proxy_pass http://0.0.0.0:20019/longpolling/;
}
#...
}
#...- odoo:19
- postgres:18
If you find this project helpful, consider buying me a coffee to support my work!






