Installing Odoo 18 on Ubuntu for Beginners
ฝัง
- เผยแพร่เมื่อ 10 ก.พ. 2025
- Installing Odoo 18 Community Edition on Ubuntu
Server specs for making this demo: Ubuntu 24.04 on Microsoft Azure b2s image, 2 CPU 4 GB RAM 30GB HD
STEPS
Login to your Ubuntu server terminal app using an SH utility such as Putty or via xRDP
Update the package list to ensure you are installing the latest versions of the packages.
sudo apt-get update
Upgrade installed packages to their latest versions.
sudo apt-get upgrade
Install Python 3, pip, and other essential Python development libraries.
sudo apt-get install -y python3-pip
sudo apt-get install -y python3-dev libxml2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libpq-dev libjpeg8-dev liblcms2-dev libblas-dev libatlas-base-dev
Create a symbolic link for Node.js and install Less and Less plugins.
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo apt-get install -y node-less
Install PostgreSQL (the database used by Odoo) and create a new user for Odoo 18.
sudo apt-get install -y postgresql
sudo su - postgres
createuser --createdb --username postgres --no-createrole --superuser --pwprompt odoo18
Password=odoo18
exit
Create a system user for Odoo 18 and install Git to clone the Odoo source code.
sudo adduser --system --home=/opt/odoo18 --group odoo18
sudo apt-get install -y git
sudo su - odoo18 -s /bin/bash
git clone www.github.com... --depth 1 --branch master --single-branch .
exit
Install Python virtual environment and set up the Odoo environment.
sudo apt install -y python3-venv
sudo python3 -m venv /opt/odoo18/venv
Switch to root, navigate to the Odoo directory, activate the virtual environment, and install required Python packages.
sudo -s
cd /opt/odoo18/
source venv/bin/activate
pip install -r requirements.txt
Install wkhtmltopdf (used for printing PDF reports in Odoo) and resolve any missing dependencies.
sudo apt update
sudo apt-get upgrade
sudo apt install xfonts-75dpi
wget github.com/wkh...
sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo apt-get install -f
deactivate
Configure the Odoo instance by copying the default config file and editing it to suit your needs.
sudo cp /opt/odoo18/debian/odoo.conf /etc/odoo18.conf
sudo nano /etc/odoo18.conf
Odoo configuration file settings, including database connection and log file location.
[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = odoo18
db_password = odoo18
addons_path = /opt/odoo18/addons
default_productivity_apps = True
logfile = /var/log/odoo/odoo18.log
Set correct permissions on the Odoo configuration file to ensure security.
sudo chown odoo18: /etc/odoo18.conf
sudo chmod 640 /etc/odoo18.conf
Create a directory for Odoo log files and set appropriate ownership.
sudo mkdir /var/log/odoo
sudo chown odoo18:root /var/log/odoo
Create a systemd service file for Odoo 18 to manage it as a service.
sudo nano /etc/systemd/system/odoo18.service
Odoo systemd service configuration.
[Unit]
Description=Odoo18
Documentation=www.odoo.com
[Service]
Type=simple
User=odoo18
ExecStart=/opt/odoo18/venv/bin/python3.12 /opt/odoo18/odoo-bin -c /etc/odoo18.conf
[Install]
WantedBy=default.target
Set permissions and ownership on the systemd service file.
sudo chmod 755 /etc/systemd/system/odoo18.service
sudo chown root: /etc/systemd/system/odoo18.service
Enable the service to start on boot
sudo systemctl enable odoo18.service
Start the Odoo 18 service manually (since we haven't rebooted) and access Odoo from the browser.
sudo systemctl start odoo18.service
Run Odoo
From local server: localhost:8069
Configure the Database
Master Password: admin_passwd (remember this - it is important)
Database Name: odoo18
Email: admin (really your login name)
Password: admin
Click the CREATE DATABASE button
You are now ready to login to Odoo with:
User Name: admin
Password: admin
ADDITIONAL STEPS
Install XRDP
sudo apt install xrdp
sudo systemctl enable xrdp
sudo systemctl start xrdp
Install Ubuntu Desktop
sudo apt install kde-plasma-desktop
sudo systemctl set-default graphical.target
Install pgAdmin
sudo apt install curl ca-certificates gnupg
curl www.pgadmin.or... | sudo tee /etc/apt/trusted.gpg.d/pgadmin.asc
sudo sh -c 'echo "deb ftp.postgresql... -cs) pgadmin4 main" /etc/apt/sources.list.d/pgadmin4.list && apt update'
sudo apt install pgadmin4-desktop
CONTACT US
** AMA Systems performs FREE installations for customers. See odoo.amasystems.net
** For Odoo sales, training, and customizations, please contact us at info (at) amasystems.net or visit odoo.amasystems.net
Hey Albert,
Just wanted to drop you a line to say how much I'm digging your TH-cam channel! I especially loved your "Installing Odoo 18 on Ubuntu for Beginners" video - super clear, well-explained, and the comments section is blowing up with people saying the same thing. Seriously, you're gonna be THE go-to resource for this stuff before you know it.
The thing is, the community's hungry for more! We're all itching to see what else you've got up your sleeve. Personally, I'd be stoked to see you dive into some more technical deep dives, like:
-Setting up PyCharm/Odoo like a pro
-Odoo module development - that's where the magic happens!
-Odoo template wizardry
-Odoo and social media integration - taking it to the next level
Basically, anything Odoo-related with your signature clear style would be gold.
No pressure, but you've got a real knack for this. Thanks for sharing your knowledge and keep those videos coming!
🙂👍
Cheers,
Your step-by-step guide is very good!
I just discovered Odoo and I'm going to install it on an Ubuntu server prepared for testing.
Thank you very much for your great help.
I wish you success and prosperity.
This tutorial has been great so far, but I hit an error message when running this command:
pip install -r requirements.txt
It says there's no such file or directory. Any ideas?
UPDATE: Solved it. There was a subfolder called "odoo" within odoo18. The requirements file was in there.
Ubuntu also using python at the back please install different python version and its pip for the python packages management. After create a python environment at the project(env) than try to install requirement libraries.
this installed odoo Odoo 18.1alpha1 is this the correct version? we want to use the current stable build.
Can you make video on how to install Odoo 18 from a source file downloaded from the download page.
i could access the login page outside the server it shows site can't be reached how to fix this
You need to open port 8069 on your firewall
@AMASystems Thank you for your response i also allowed inbound rule in my azure machine for 8069 but still i can't accessable but i found the error my posgresql is not running actively it shows active(exited) that was the problem for that and how to fix that.
If you have a server on site. And a backup server online. What is the best service to use to have a backup ubuntu server
I am not aware of a "service" as that would be more of a networking question for your hosting platform. However, you could always just image the server periodically and have the image stored in a different zone.
@@AMASystems hi. Is the installation different if you want to install enterprise from the beginning
@@Beltechsa Yes, there is a different package and some additional dependencies. There are some TH-cam videos on this.
I suggest AWS S3 but you need a script or app to this. Just set a schedule action to trigger this logic at nights.