odoo14.service<\/code> and open it using your favorite text editor:<\/p>\n\n\n\nnano \/etc\/systemd\/system\/odoo14.service<\/pre>\n\n\n\nAdd the following lines:<\/p>\n\n\n\n
[Unit]\nDescription=Odoo14\nRequires=postgresql.service\nAfter=network.target postgresql.service\n\n[Service]\nType=simple\nSyslogIdentifier=odoo14\nPermissionsStartOnly=true\nUser=odoo14\nGroup=odoo14\nExecStart=\/opt\/odoo14\/odoo14-venv\/bin\/python3 \/opt\/odoo14\/odoo\/odoo-bin -c \/etc\/odoo14.conf\nStandardOutput=journal+console\n\n[Install]\nWantedBy=multi-user.target<\/pre>\n\n\n\nRun the following command for systemd<\/code> to read the newly created service configuration:<\/p>\n\n\n\nsystemctl daemon-reload<\/pre>\n\n\n\nStart the Odoo 14 service:<\/p>\n\n\n\n
systemctl start odoo14<\/pre>\n\n\n\nEnable the Odoo 14 instance to start automatically on a server boot:<\/p>\n\n\n\n
systemctl enable odoo14<\/pre>\n\n\n\nTo check and verify the status of our Odoo 14 service, run the following command:<\/p>\n\n\n\n
systemctl status odoo14<\/pre>\n\n\n\nYou should receive the following output:<\/p>\n\n\n\n
#systemctl status odoo14\n\u25cf odoo14.service - Odoo14\nLoaded: loaded (\/etc\/systemd\/system\/odoo14.service; enabled; vendor preset: enabled)\nActive: active (running) since Fri 2020-10-02 16:51:41 UTC; 12s ago\nMain PID: 29627 (python3)\nTasks: 4 (limit: 19101)\nMemory: 58.3M\nCGroup: \/system.slice\/odoo14.service\n\u2514\u250029627 \/opt\/odoo14\/odoo14-venv\/bin\/python3 \/opt\/odoo14\/odoo\/odoo-bin -c \/etc\/odoo14.conf<\/pre>\n\n\n\nIf you want to install another Odoo instance, you can repeat all of the steps from this section. Do not forget to use a different name for the second Odoo user, third Odoo user, and so on. You can name the user however you want, just do not forget to create a PostgreSQL user with the same<\/strong> name.<\/p>\n\n\n\n<\/span>Step 4 – Setting up Apache as a Reverse Proxy<\/span><\/h2>\n\n\n\nIf you only need to access Odoo using an IP address, then you are finished with installing Odoo 14 on Ubuntu 20.04. You can access it in your web browser by using your IP address at the default port, 8069. <\/p>\n\n\n\n
However, if you have a valid domain name and you would like to use it in order to access your Odoo 14 instance instead of typing the IP address and the port number in the URL, you will have to set up a reverse proxy. We’ll be using Apache to accomplish that task in this tutorial.<\/p>\n\n\n\n
Apache is considered as the most widely-used and user-friendly web server software. It is fast, secure, reliable, and can be easily customized depending on your needs.<\/p>\n\n\n\n
To install Apache on the server, run the following command:<\/p>\n\n\n\n
apt install apache2<\/pre>\n\n\n\nOnce the installation is complete, enable Apache to start automatically upon system boot using the following command:<\/p>\n\n\n\n
systemctl enable apache2<\/pre>\n\n\n\nTo verify that Apache is running, open your web browser and enter your server’s IP address (e.g. http:\/\/111.222.333.444<\/code>). If Apache is successfully installed, you should see a message saying \u201cIt works!\u201d.<\/p>\n\n\n\nEnable the proxy<\/code> and proxy_http<\/code> modules in Apache using the following commands:<\/p>\n\n\n\na2enmod proxy\na2enmod proxy_http<\/pre>\n\n\n\nCreate a new Apache configuration file for your domain:<\/p>\n\n\n\n
nano \/etc\/apache2\/sites-available\/yourdomain.com.conf<\/pre>\n\n\n\nName the above file using your registered domain name. Then open the file and add the following lines:<\/p>\n\n\n\n
<VirtualHost *:80>\nServerName yourdomain.com<\/strong>\nServerAlias www.yourdomain.com<\/strong>\n\nErrorLog ${APACHE_LOG_DIR}\/yourdomain<\/strong>-error.log\nCustomLog ${APACHE_LOG_DIR}\/access.log combined\n\nProxyRequests Off\n<Proxy *>\nOrder deny,allow\nRequire all granted\n<\/Proxy>\n\nProxyPass \/ http:\/\/yourdomain.com<\/strong>:8069\/\nProxyPassReverse \/ http:\/\/yourdomain.com<\/strong>:8069\/\n<Location \/>\nOrder allow,deny\nRequire all granted\n<\/Location>\n<\/VirtualHost><\/pre>\n\n\n\nDo not forget to replace all occurrences of yourdomain.com<\/code> with your actual registered domain name.<\/p>\n\n\n\nEnable the newly created Apache configuration:<\/p>\n\n\n\n
a2ensite yourdomain.com<\/pre>\n\n\n\n