[Guide] How to install ERPNext v14 on Linux Ubuntu (step-by-step instructions)

I can confirm that this procedure still works for also v13. We just changed some commands to v13 from v14.

1 Like


Bjr jobtient tjt des messages d’erreur jai envoye une photo

The yarn install failed with an ECONNrefused message
…try installing yarn before you run the script

This can change to

nvm install 16

Because it will install the latest of 16 which is 16.20 nowadays.

Managed to script it! :slight_smile:
Enjoy!

1 Like

@abrefael Awesome job with the script but it terminates at initialising frappe. It doesn’t include setting up production. Any particular reason why?

It’s possible.
However, I wanted to keep it general enough for whoever doesn’t want to install ERPNext, or just want to keep it as a development environment.
Plus, you need to log-off and log back in at this stage (at list before bench start) in order to add the nvm path to $PATH. So…

Not really. NVM returns the following commands to run immediately after install is completed which will enable you continue installation using the same terminal on the same session:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

If you add this after the installation of nvm package manager you could continue with the same session. To also help users who wish to use the script to install all the way to production you could add a prompt to ask if they wish to continue to production after frappe-bench is initialised. If the Answer is yes then you may ask them to provide the site and other relevant data in order to complete the production setup and this will enable the script to continue to production (which may even include letsenctypt SSL setup).

Just my little suggestion to make a great script and contribution even greater. Kudos to you for your contribution though.

Installed ERPNext as guided here.

but getting below error.

bench start running in one terminal.

SS of another terminal…

here is the SS before starting bench…

@buildwithhussain @NCP request to Check and guide

Hi @umarless,

please apply it.

sudo nano /etc/hosts

then add it like:

127.0.0.1 umar.localhost

Then check it.

Thank You!

1 Like

@umarless

bench --site <site-name> add-to-hosts
bench use <Your Site Name>

Finally

bench start

And Check browser.

2 Likes

Thanks @NCP and @pra17shant.

Its solved.

inspired by the work of @abrefael, I have created a script that installs ERPNext production with almost interaction. It also includes SSL installation from Letsencrypt.

Just supply your database password, site name and site administrator password when required and the script will handle the rest.

The script is currently compatible with Ubuntu 22.04 only for now but I am working on adding compatibility for Debian and CentOS.

I intend maintaining it long term and I welcome contributions to make the script better.

4 Likes

We should also perform performance optimizations. Easy script was somehow attempt it a little bit. It is beyond my scripting capabilities.

Yes Easy Script attempted it a bit but one of the reasons Easy Script no longer works is because it tried to account for every kind of scenario and environment thus making it too bloated. I think installation scripts should be restricted to standard installations only while instance tuning should be exclusively based on individual preferences and done manually. This is because there are several tuning combination possibilities for every instance and a simple script, short of becoming an AI tool itself, cannot identify and account for each scenario perfectly.

Hmm you are correct.

Then we can consider generating another script for performance checks.

I also believe that installation script should have 3 stages. So that if anything fails user can points us to right direction.

  • Make operating system ready (Date control, updates and installing mandatory packages)
  • Installing bench
  • Setting site and apps.

I am thinking of breaking the script into stages and also adding error handlers as well. I also intend allowing users to set up development instance if they don’t want to run production. The script will continue to be improved but my first priority is adding Debian and CentOS compatibility which I am currently working on. You can also contribute to it if you have the time.

3 Likes

I’ve added support for Ubuntu 20.04 LTS and Debian 10. Support for Debian 11 is partial as the production instance is installed successfully but I am currently getting errors with SSL installation on Debian 11. Once I fix that I will proceed to add support for CentOS. As soon as I’m able to finish these, I will begin to work on breaking the script into stages. Although I will want to keep the interaction to bare minimum to preserve the objective of the script as an almost no-interactive easy install script.

1 Like

Thank you

Great. I only use Ubuntu Server but some of my friends insist that ERPNext on CentOS perform much better.

Do you have any experince on that? To me, it should not bother much.