Odoo install script
This script is based on the install script from André Schenkels (https://github.com/aschenkels-ictstudio/openerp-install-scripts) but goes a bit further and has been improved. This script will also give you the ability to define an xmlrpc_port in the .conf file that is generated under /etc/ This script can be safely used in a multi-odoo code base server because the default Odoo port is changed BEFORE the Odoo is started.
If you set the parameter
Trueyou should also configure workers. Without workers you will probably get connection loss issues. Look at the deployment guide from Odoo on how to configure workers.
sudo wget https://raw.githubusercontent.com/Yenthe666/InstallScript/15.0/odoo_install.sh
There are a few things you can configure, this is the most used list:
OE_USERwill be the username for the system user.
GENERATE_RANDOM_PASSWORDif this is set to
Truethe script will generate a random password, if set to
Falsewe'll set the password that is configured in
OE_SUPERADMIN. By default the value is
Trueand the script will generate a random and secure password.
Falseif you do not want to install Wkhtmltopdf, if you want to install it you should set it to
OE_PORTis the port where Odoo should run on, for example 8069.
OE_VERSIONis the Odoo version to install, for example
15.0for Odoo V15.
IS_ENTERPRISEwill install the Enterprise version on top of
15.0if you set it to
True, set it to
Falseif you want the community version of Odoo 15.
OE_SUPERADMINis the master password for this Odoo installation.
INSTALL_NGINXis set to
Falseby default. Set this to
Trueif you want to install Nginx.
WEBSITE_NAMESet the website name here for nginx configuration
ENABLE_SSLSet this to
Trueto install certbot and configure nginx with https using a free Let's Encrypted certificate
ADMIN_EMAILEmail is needed to register for Let's Encrypt registration. Replace the default placeholder with an email of your organisation.
ENABLE_SSLmust be set to
Trueand the placeholder in
ADMIN_EMAILmust be replaced with a valid email address for certbot installation
sudo chmod +x odoo_install.sh
There are plenty of great services that offer good hosting. The script has been tested with a few major players such as Google Cloud, Hetzner, Amazon AWS and DigitalOcean. If you'd like you can use my DigitalOcean referral link which gives you a 100$ voucher for free for the first 60 days.
While technically you can run an Odoo instance on 1GB (1024MB) of RAM it is absolutely not advised. A Linux instance typically uses 300MB-500MB and the rest has to be split among Odoo, postgreSQL and others. If you install an Odoo you should make sure to use at least 2GB of RAM. This script might fail with less resources too. There are known issues on DigitalOcean for example where the installation crashes on 1GB RAM machines. See https://github.com/Yenthe666/InstallScript/issues/243