Self host Odoo 18 on Ubuntu 24.04 server using Docker containers (nginx, postgresql, odoo, certbot)

Опубликовано: 15 Май 2026
на канале: Open Source Hustle
4,734
135

00:00 Introduction
00:30 Prerequisites
01:34 Replacing article with your domain
01:50 Creating a server user
02:33 Setting server's timezone
03:05 Installing Docker
03:17 Project directories
03:30 compose.yml file
06:00 UFW setup
06:18 Initial nginx setup
06:40 Gzip
06:52 Requesting certificates and ssl settings
07:18 Final nginx configuration
08:22 Cronjob for certificate renewals
09:10 odoo.conf setup
09:45 Accessing Odoo
10:40 Removing -i base flag
11:30 Adding custom modules
12:50 Testing SSL and security headers
13:15 Conclusion

Article version of this video:
https://opensourcehustle.com/blog/odo...

Get 300$ on vultr to test out their platform:
https://www.vultr.com/?ref=9687233-9J

This video explains how to self host and odoo application on an Ubuntu 24.04 server using docker. To do so 4 containers are used, a db container with postgresql, an Odoo container, an nginx container and a certbot container.

Note that the versions used for these container can be modified, for example we are using odoo:18.0 in this tutorial but you can modify it to odoo:17.0 to use odoo version 17 instead, the same goes for other containers.

Nginx is used to route traffic to our odoo application securely using cerbot generated Let's Encrypt certificates. Additionally, Gzip is added to compress html,css and js, and security headers are added to further secure our application.

Docker volumes are used to save container data on the host machine for persistance, regardless if the container is destroyed.

odoo related settings are covered, such as changing the users password, adding a proxy mode, and hiding db options using list_db option.

Custom modules can be added by adding the addons_path option, next the custom module can be added to the addons volume, the app list can be then updated within odoo and you can find the custom module available for activation.

If you need assistance or have suggestions, reach out to me directly or leave a comment.

Take care!

Support the channel:
https://buymeacoffee.com/opensourcehu...

Email:
[email protected]

Linkedin:
  / alixsander-haj-saw-524ba9201  

Website:
opensourcehustle.com