Fully Automated Install Script for ERPNext Version 14

@flexy2ky Thanks for the quick reply. It worked as you described.
ERPNext 15 is installed and the Login page loads, but without any CSS or JS files loaded, as they all end with a 404 not found error. I could see the files, they do exist. Though, I guess that has to do with some nginx settings in frappe bench. I’ll take a look into this later.

Awesome work! Thanks a lot again.

This is a permission issue. Go to your user’s home directory and run this command sudo chmod 755 /home/$(echo $USER) This should assign the necessary permissions to your user to be able to run the css and js files. You can then go to the frappe-bench directory and run bench --site[your-site-name] migrate && bench restart && bench [your-site-name] clear-cache for good measure. this should fix the issue you’re facing.

Done! Now it works like a charm.

Awesome :wink:

1 Like

I’ll try ISA

Hello
Tried several times and here is the outcome , tried 5 times to install on V14 on Ubuntu 22 with latest updates but fails every time.
Tried 3 times on Ubuntu 22 with latest updates with V15 only one successful installation and two failed.
Tried one time on Debian 10 with V14 , no errors looks successful installation , but when you point browser with the machine IP it shows apache default page.
Any suggestions ?

Clearly your server has apache running and ERPNext uses Nginx hence your issue. you need to completely uninstall apache from your server if you want to use it for ERPNext. I suspect you’re using Contabo VPS cos i know their machines come with apache preloaded so you need to get rid of it.

@flexy2ky Just to say thanks, this script is brilliant and saves a lot of time :smiley:

1 Like

Firstly - thanks for the great script. It’s the only way I’ve managed the install.

FYI - I’ve been playing around with it for 23.10 as well as Noble Numbat beta. Though mostly just for version 15. Changed line 26 to:
SUPPORTED_VERSIONS=(“24.04” “23.10” “22.04” “20.04” “11” “10” “9” “8”)

And added these at about line 319:
sudo rm -f /usr/lib/python3.11/EXTERNALLY-MANAGED
sudo rm -f /usr/lib/python3.12/EXTERNALLY-MANAGED

just before “sudo pip3 install frappe-bench”.

Works a treat with 23.10. For 24.04 - python3-distutils is not yet in the noble repos as of the time of this posting. For now that causes line 224 in the script to baulk: apt install git python3-dev python3-setuptools python3-venv python3-pip python3-distutils redis-server.

But manually installing everything else on that line before running the script (with the mods I mentioned) - then both Frappe & ERPNext (15) appear to install just fine. I’m not a Python person & so I’ve no idea how important python3-distutils is - or what Canonical’s plans for it are.

BTW - it appears node is being installed twice. Once as per the script - and again from the standard repos. So installing 15 on 22.04 you end up with:
node --version
v18.19.1
nodejs --version
v12.22.9

Can cause an issue with the payments module on version 14.

Cheers - Len

It’s nice that you were able to install on Ubuntu 23 and 24. However, Frappe has not announced official support for those releases yet hence i don’t want to include support for them until Frappe announces support officially. This is to ensure dependency versions do not cause problems down the line for users. And from your attempt, you actually removed the higher python versions in order for the instance to work which is a situation you want to avoid in a production instance. Best to align installs with direct version compatibility to maintain stability.

Node is actually not being installed twice. The default node version on ubuntu 22.04 is v12.22.9 and the script uses nvm to install node (this is necessary for effective version control and switching based on specific Frappe/ERPNext version required) but since nvm allows for multiple node versions to exist it does not ovewrite the existing version.

Kindly someone assist. I have tried several scripts and steps but ending up with this;

Getting erpnext
$ git clone GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) --branch version-14 --depth 1 --origin upstream
Cloning into ‘erpnext’…
remote: Enumerating objects: 5102, done.
remote: Counting objects: 100% (5102/5102), done.
remote: Compressing objects: 100% (4389/4389), done.
fatal: the remote end hung up unexpectedly MiB | 268.00 KiB/s
fatal: early EOF
fatal: index-pack failed
subprocess.CalledProcessError: Command ‘git clone GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) --branch version-14 --depth 1 --origin upstream’ returned non-zero exit status 128.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/bench/commands/make.py”, line 75, in init
init(
File “/usr/local/lib/python3.8/dist-packages/bench/utils/render.py”, line 105, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.8/dist-packages/bench/utils/system.py”, line 102, in init
get_app(
File “/usr/local/lib/python3.8/dist-packages/bench/app.py”, line 765, in get_app
app.get()
File “/usr/local/lib/python3.8/dist-packages/bench/utils/render.py”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.8/dist-packages/bench/app.py”, line 204, in get
self.bench.run(
File “/usr/local/lib/python3.8/dist-packages/bench/bench.py”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
File “/usr/local/lib/python3.8/dist-packages/bench/utils/init.py”, line 169, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: git clone GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) --branch version-14 --depth 1 --origin upstream

ERROR: There was a problem while creating frappe-bench

What is the hardware/vps configuration you’re using?

Its just a local instance i need to setup on a laptop not sure if i answered the question correctly.

Thank you for the script, great work. I would like to know how to add HRMS to this

The error suggests an issue with your hardware but i cannot tell exactly why and your screenshot suggests there should be enough resources to run the installation successfully.

cd frappe-bench
bench get-app hrms --branch [your-erpnext-version]
bench --site [your-site-name] install-app hrms

[your-erpnext-version] eg: version-15
[your-site-name] eg: erp.mydomain.com

first i tried just hrms without branch and version number. it gave error and entire site got corrupted and gave 404 error. i tried installing with version number as same as erpnext version and it worked fine.