{"id":1334,"date":"2021-12-16T12:19:15","date_gmt":"2021-12-16T09:19:15","guid":{"rendered":"https:\/\/files2.tojikon.net\/files-cloud\/2021\/08\/31\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server\/https:\/\/files2.tojikon.net\/files-cloud\/2021\/08\/31\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server\/"},"modified":"2021-12-16T12:19:15","modified_gmt":"2021-12-16T09:19:15","slug":"how-to-set-up-the-odoo-business-suite-on-ubuntu-server","status":"publish","type":"post","link":"https:\/\/tojikon.net\/en\/1334-how-to-set-up-the-odoo-business-suite-on-ubuntu-server\/","title":{"rendered":"How to set up the Odoo business suite on Ubuntu Server"},"content":{"rendered":"<section id=\"related_posts\">\n<div class=\"block-head\">\n<h3>Related Articles<\/h3>\n<\/div>\n<\/section>\n<p>Odoo is a business suite platform that runs on Ubuntu. With Odoo, users can boost their sales, run POS, timesheets, help desks, inventory, and purchases. In this guide, we\u2019ll show you how to install Odoo on Ubuntu 20.04 LTS.<\/p>\n<p>Note: Although this guide focuses on Ubuntu 20.04 LTS, it is also possible to get the app working with newer releases of Ubuntu.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-407191 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server.png\" alt=\"\" width=\"1200\" height=\"711\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server.png 1200w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server-2.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server-3.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server-4.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<h2>Installing Odoo dependencies on Ubuntu<\/h2>\n<p>Before Odoo can be installed on Ubuntu, the dependencies need to be installed on the system. To get these dependencies working, start by opening up a terminal window and logging into your Ubuntu server via SSH.<\/p>\n<p>Now that you\u2019re logged in, use the <strong>apt install<\/strong> command below to install the packages listed below. These packages are important for building Odoo, and without them, the build will fail.<\/p>\n<pre>\nsudo apt install git python3-pip build-essential wget python3-dev python3-venv \\\npython3-wheel libfreetype6-dev libxml2-dev libzip-dev libldap2-dev libsasl2-dev \\\npython3-setuptools node-less libjpeg-dev zlib1g-dev libpq-dev \\\nlibxslt1-dev libldap2-dev libtiff5-dev libjpeg8-dev libopenjp2-7-dev \\\nliblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev\n<\/pre>\n<p>There are a lot of packages to install on Ubuntu Server for Odoo to build correctly. Sit back, be patient and allow the package manager to get everything set up.<\/p>\n<h2>Creating an Odoo user account<\/h2>\n<p>You should never run server software with the root user account on your Ubuntu Server. It is dangerous, especially if any vulnerabilities are found. Instead, it is best to create a dedicated user with specific permissions.<\/p>\n<p>Using the <strong>useradd<\/strong> command, create the \u201codoo14\u201d user account.\u00a0<\/p>\n<pre>\nsudo useradd -m -d \/opt\/odoo -U -r -s \/bin\/bash odoo14\n<\/pre>\n<h2>PostgreSQL<\/h2>\n<p>The Odoo application uses PostgreSQL for database management. So, PostgreSQL must be set up on the system for Odoo to work correctly. To start, use the <strong>apt install<\/strong> command below and install the \u201cpostgresql\u201d package onto Ubuntu Server.<\/p>\n<pre>\nsudo apt install postgresql\n<\/pre>\n<p>After setting up PostgreSQL, a user account must be created to interact with the database. To create a new user, use the <strong>postgres -c<\/strong> command below.<\/p>\n<pre>\nsudo su - postgres -c \"createuser -s odoo14\"\n<\/pre>\n<h2>Wkhtmltopdf<\/h2>\n<p>The Odoo business suite has the ability to render HTML pages into PDF files, as well as other formats. This feature is optional, and you do not need to use it. However, if you do plan to utilize this feature, you\u2019ll have to set up Wkhtmltopdf on Ubuntu Server.<\/p>\n<p>To start the installation of wkhtmltopdf on Ubuntu Server, use the <strong>wget<\/strong> download command below and download the latest release of Wkhtmltopdf.<\/p>\n<pre>\nwget https:\/\/github.com\/wkhtmltopdf\/packaging\/releases\/download\/0.12.6-1\/wkhtmltox_0.12.6-1.focal_amd64.deb\n<\/pre>\n<p>After downloading the file to your Ubuntu Server system, you must install the package. The quickest way to install the Wkhtmltopdf package is with the <strong>apt install<\/strong> command below.<\/p>\n<pre>\nsudo apt install .\/wkhtmltox_0.12.6-1.focal_amd64.deb\n<\/pre>\n<h2>Installing Odoo<\/h2>\n<p>With the dependencies, PostgreSQL, and everything else set up, now is the time to install Odoo on Ubuntu. To start, log into your new user account created earlier.<\/p>\n<pre>\nsudo -s\nsu odoo14\n<\/pre>\n<p>Once logged in, use the <strong>git clone<\/strong> command to download the latest release of Odoo to your Ubuntu server. Keep in mind that Odoo is quite large so the cloning process may take a bit of time to complete.<\/p>\n<pre>\ngit clone https:\/\/www.github.com\/odoo\/odoo --depth 1 --branch 14.0 \/opt\/odoo14\/odoo\n<\/pre>\n<h2>Python modules<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-407191 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server.png\" alt=\"\" width=\"1200\" height=\"711\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server.png 1200w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server-2.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server-3.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server-4.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<p>With the code downloaded, you\u2019ll need to use Python3 to create a new environment for Odoo. First, access the Odoo folder directory using the <strong>CD<\/strong> command. Then, use <strong>python3<\/strong> to create a new environment, and enter it with the <strong>source<\/strong> command.<\/p>\n<pre>\ncd \/opt\/odoo14\/odoo\npython3 -m venv odoo-venv\nsource odoo-venv\/bin\/activate\n<\/pre>\n<p>Finally, install all required Python3 modules using the <strong>pip3 install<\/strong> command. These modules are critical to using Odoo.<\/p>\n<pre>\npip3 install wheel\npip3 install -r odoo\/requirements.txt\n<\/pre>\n<p>When everything is installed via Pip3, exit the Python environment by using the <strong>deactivate<\/strong> command below.<\/p>\n<pre>\ndeactivate\n<\/pre>\n<h3>Plugins<\/h3>\n<p>While it is not required, Odoo allows for custom plugins. If you\u2019d like to use them, use the following command to create the plugin folder.<\/p>\n<pre>\nsudo mkdir -p \/opt\/odoo14\/odoo-custom-addons\n<\/pre>\n<h2>Configuring Odoo<\/h2>\n<p>Odoo is installed, but it needs to be configured. First, log out of the Odoo user with the <strong>exit<\/strong> command. Then use the <strong>touch<\/strong> command to create a new configuration file.<\/p>\n<pre>\nsudo touch \/etc\/odoo14.conf\n<\/pre>\n<p>Open up the new configuration file using the Nano text editor.<\/p>\n<pre>\nsudo nano \/etc\/odoo14.conf\n<\/pre>\n<p>Once inside the configuration file, paste the code below.<\/p>\n<p><code>[options]; This is the password that allows database operations:<br \/>admin_passwd = CHANGE-TO-A-SECURE-PASSWORD<br \/>db_host = False<br \/>db_port = False<br \/>db_user = odoo14<br \/>db_password = False<br \/>addons_path = \/opt\/odoo14\/odoo\/addons,\/opt\/odoo14\/odoo-custom-addons<\/code><\/p>\n<p>Save the edits in Nano by using the <strong>Ctrl + O<\/strong> keyboard combo. Exit with <strong>Ctrl +<\/strong> X.<\/p>\n<h2>Systemd<\/h2>\n<p>You\u2019ll need to create a Systemd service file to use Odoo. Using the <strong>touch<\/strong> command, create a new service file.<\/p>\n<pre>\nsudo touch \/etc\/systemd\/system\/odoo14.service\n<\/pre>\n<p>Open the text file with the Nano text editor and paste the code inside of it.<\/p>\n<p><code>[Unit]Description=Odoo14<br \/>Requires=postgresql.service<br \/>After=network.target postgresql.service<\/code><\/p>\n<p><code>[Service]Type=simple<br \/>SyslogIdentifier=odoo14<br \/>PermissionsStartOnly=true<br \/>User=odoo14<br \/>Group=odoo14<br \/>ExecStart=\/opt\/odoo14\/odoo-venv\/bin\/python3 \/opt\/odoo14\/odoo\/odoo-bin -c \/etc\/odoo14.conf<br \/>StandardOutput=journal+console<\/code><\/p>\n<p><code>[Install]WantedBy=multi-user.target<\/code><\/p>\n<p>Save the edits in Nano by using the Ctrl + O keyboard combo. Exit with Ctrl + X. Then, activate the new system file, and turn it on.<\/p>\n<pre>\nsudo systemctl daemon-reload\nsudo systemctl enable odoo14.service\n<\/pre>\n<p>Start up the service with the <strong>start<\/strong> command.<\/p>\n<pre>\nsudo systemctl start odoo14.service\n<\/pre>\n<h2>Setting up Odoo<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-407192 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server-1.png\" alt=\"\" width=\"1200\" height=\"648\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server-1.png 1200w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server-5.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server-6.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-set-up-the-odoo-business-suite-on-ubuntu-server-7.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<p>With Odoo installed on Ubuntu Server, head over to a computer, open up a new browser and access the Odoo installation. Then, log in with your admin password and follow the prompts to configure your new installation.<\/p>\n<pre>\nHTTP:\/\/ubuntu-server-ip-address:8069\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Related Articles Odoo is a business suite platform that runs on Ubuntu. With Odoo, users can boost their sales, run POS, timesheets, help desks, inventory, and purchases. In this guide, we\u2019ll show you how to install Odoo on Ubuntu 20.04 LTS. Note: Although this guide focuses on Ubuntu 20.04 LTS, it is also possible to &hellip;<\/p>\n","protected":false},"author":1,"featured_media":1335,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21],"tags":[33],"_links":{"self":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1334"}],"collection":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/comments?post=1334"}],"version-history":[{"count":0,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1334\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media\/1335"}],"wp:attachment":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media?parent=1334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/categories?post=1334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/tags?post=1334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}