Install v13 Production on Ubuntu 20.04 VPS - This is how I did it "Easy Install" script

@bkm No, that was actually not the problem, I had the redis.conf set correctly to only already. The problem was, that the virtualenv didn’t set up correctly.

I uninstalled everything python, redid etc. Then I started again according to the description here:

It is manual, but at least I have more control over it now :slight_smile:

Then it would be helpful for you to add back to the post what exactly you found wrong with the virtualenv install and what fixed it so that others can also benefit from your revelation.

That is how the community grows here. Please post your specific fix and we can add it to the list of pre-requisites to get right before running the (which is the topic of this thread).

Thanks in advance for your participation.


@bkm I actually don’t think that something was wrong with the script, it probably was more something I did before. I am trying to install ERPNext on a machine that already existed and not a fresh one.

Anyone got error with Ldap ad? I’m getting ldap3.core.exceptions.LDAPKeyError: “key ‘samaccountname’ not found” error

To everyone who keeps on getting errors, easy install scripts are abandonware and are often outdated. A very simple and foolproof solution is to install bench using the Hitchhikers guide to installing Frappe Bench on linux. A few things you should be careful about is to install python3 instead of python2.7 and install the related python3 packages and not the 2.7 ones. I recently bought a new vps and tried almost every single easy install guide on the community and the internet and in the end the only thing that worked was the hitchhikers guide. Also it works best with production mode.

1 Like


I have to interject here. I know the easy install script ( is not always the best working answer, but it is certainly not abandonware. It is actively updated every week.

The problems associated with using the easy install method are varied and constantly changing through no fault of the script itself.

The easy install script uses a playbook method of installing all of the necessary components to get an operational system. The playbook package itself is another open source 3rd party code set that is NOT maintained by the Frappe-ERPNext team. IT is maintained by it’s own development project. It is also frequently updated very much like ERPNext is updated. Sometimes those updates interfere with the smooth operation of the ERPNext installation. When that happens, our Frappe developers have to spend valuable volunteer time to dig into code they didn’t write to try and figure out how to get the installation process to work again.

If that isn’t enough… Almost every aspect of the frappe-erpnext systems are built from, or rely on other 3rd party open source projects in order to function. Packages like git, curl, yarn, redis, ansible, and wkhtmltopdf are all required to get a functional frappe/erpnext system and yet every one of them are open source projects themselves that are independently run by their own communities. Each of those independent projects also release updates and changes which sometimes causes our installs to fail.

I acknowledge that the easy install methods may not get nearly enough testing time, but it is certainly not to blame for all of the apparent failures to install. The developers of frappe/erpnext cannot police the code of every package they use to build their own project.

One final note on Hitchhikers Guide…
It is also full or errors! It is not updated very often and it references very old package versions that are either no longer available or otherwise obsolete. It is also NOT written for the non-coder/non-developer users that are experiencing the most difficulties with installs. The only people that can get any help from the Hitchhikers Guide are other developers or coders that can see the packages and already understand the significance of each block of the install. They can already understand what needs to be changed in the text. Makes you wonder why none of those people that push the guide ever go back and fix the text. After all it is also an open source text. :grin:

So, if you find problems with the easy install method, there is also another (better explained) set of manual steps that can help even the novice user get a successful installation. Try this:

So to @Vesper_Solutions I do not believe it is fair to call the easy install method abandonware just yet. The fact that is doesn’t always work is why we have this community. We help each other with work-arounds for such problems when we can.


1 Like

I agree that the community serves as a great help for all of us but for those who rely on frappe and erpnext for real life professional use cases, time is of the essence.

@bkm Recently I had asked an expert to create an Easy Install script for Ubuntu 20. It works flawlessly each time. I have tested multiple times and it has never failed me. What users dont understand is that by default Ubuntu 20 installs python 3.8 and that version has to be replaced before starting fresh bench installation. Reinstalling OS does not do help.

This is how I do it. I am novice on Linux but I follow this method religiously.

export LC_ALL=C.UTF-8
adduser [name of new user, dont use frappe or erpnext. Make it unique]
usermod -aG sudo [user name you created above]
sudo su [user name you created above]
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install python3.6
sudo python3 --production --user [user name you created in the above] --version [ERP version you want like 11,12,13] --site [site name you want to set like] --mysql-root-password [SQL password you want to set] --admin-password [Admin Password you want to set]  --verbose

You have to enter information in the [ ] and without the brackets.

Once I have entered the last command I go for a coffee and smoking break. Back in 15 minutes to see Bench + Frappe + ERPNext has been successfully installed! message.

I cant guarantee how long this will work but it has yet to fail me. And please dont ask me what is the difference in my than the official version. I have no idea.

Best of luck.

P.S. All my server are Intel Xeon 4 core, 8 GB RAM, 200 GB SSD. Server specification also make huge difference.


Join frappe team and help them in fixing the install script. You’re expecting them to fix things for you for free while you earn from it. Common thinking about open source being free but there is a lot of time and effort put in to make things work.

Good luck with your projects.

Thanks for sharing @Muzzy !!

I think your process works for you for 2 reasons.

  • Number one, you have your own file to work from (although thanks for sharing the link to it in your command).

  • Number 2, you are likely installing everything from scratch yourself for the Ubuntu OS. When Ubuntu 20.04 is allowed to install things from it’s own list of repositories, it does in fact install Python 3.8 and that is a problem. Once Python 3.8 is installed you CANNOT get rid of it and install 3.6. The python installer will not let you overwrite the newer with the older version. So, this tells me you are installing python 3.6 as part of your OS install.

Most of the rest of us are using prepared OS images from the VPS provider and they almost all already have python 3.8 as part of the image before you even spin it up. It is already “baked in” the image as soon as you fire it up. Most of my effort to get to work with Ubuntu 20.04 was related to getting it to work with python 3.8 and I did get that to work. I have several servers running ERPNext v13.4.1 and python 3.8 on Ubuntu 20.04

However, this “baked in” problem started to bother me a great deal and I started looking for alternatives. I wound up switching my new installs to Debian 10 because the images for it an all of the VPS providers I have been using are pretty stripped down and you have to install all of the prerequisites yourself anyway. That gets me past any further problems with cutting edge packages being “baked in” the images I spin up.

I am happy to hear someone else is having such good luck with installs.

Thank you for the explaining the steps.


I don’t install the OS. It is installed by the VPS when I purchase it. My servers also have 3.8 hence the intial extra command of getting python 3.6 before ERPNext installation command. I have tried the above method on VPS and local server OS (server edition).

Hi @Muzzy
Thanks a lot for sharing.
If I want to use your shared steps, is it valid for develop installation? what need to be changed for the same?

@nmami I have updated what you need to do for information in [ ]

Hi @Muzzy
Just now completed successfully production install

But my question if i need to install development not production what steps I need to use?

I got your last update between [] but still for production instance all steps?


just change --production to --develop. Rest all same

Failed, unfortunately don’t know why.

Sorry but dont have any idea about develop. Maybe you can set production completely and then migrate to develop.

1 Like

worked once like a charm. then i tried to create another droplet, following the exact steps but fails, tried more than 4 time now. Digital ocean droplet - Ubuntu 20.04 LTS , 1vCPU 2GB ram 50GB SSD

TASK [bench : Setup Procfile] ****************************************************************************************
task path: /tmp/.bench/bench/playbooks/roles/bench/tasks/main.yml:60
<> EXEC /bin/sh -c 'echo ~root && sleep 0'
<> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /var/tmp `"&& mkdir /var/tmp/ansible-tmp-1624372529.164145-42719-56623924971094 && echo ansible-tmp-1624372529.164145-42719-56623924971094="` echo /var/tmp/ansible-tmp-1624372529.164145-42719-56623924971094 `" ) && sleep 0'
Using module file /usr/local/lib/python3.8/dist-packages/ansible/modules/commands/
<> PUT /root/.ansible/tmp/ansible-local-275201gw0qoy8/tmpddzhdowa TO /var/tmp/ansible-tmp-1624372529.164145-42719-56623924971094/
<> EXEC /bin/sh -c 'setfacl -m '"'"'u:[USER]:r-x'"'"' /var/tmp/ansible-tmp-1624372529.164145-42719-56623924971094/ /var/tmp/ansible-tmp-1624372529.164145-42719-56623924971094/ && sleep 0'
<> EXEC /bin/sh -c 'sudo -H -S -n  -u [USER] /bin/sh -c '"'"'echo BECOME-SUCCESS-uyvaboicpersjjsurhzpqbmhpfmnpqml ; /usr/bin/python3 /var/tmp/ansible-tmp-1624372529.164145-42719-56623924971094/'"'"' && sleep 0'
<> EXEC /bin/sh -c 'rm -f -r /var/tmp/ansible-tmp-1624372529.164145-42719-56623924971094/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": true,
    "cmd": [
    "delta": "0:00:00.480597",
    "end": "2021-06-22 14:35:29.921658",
    "invocation": {
        "module_args": {
            "_raw_params": "bench setup procfile",
            "_uses_shell": false,
            "argv": null,
            "chdir": "/home/[USER]/frappe-bench",
            "creates": "/home/[USER]/frappe-bench/Procfile",
            "executable": null,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true,
            "warn": true
    "msg": "non-zero return code",
    "rc": 1,
    "start": "2021-06-22 14:35:29.441061",
    "stderr": "Aborted!",
    "stderr_lines": [
    "stdout": "\u001b[93mWARN: bench is installed in editable mode!\n\nThis is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`\n\u001b[0m\nA Procfile already exists and this will overwrite it. Do you want to continue? [y/N]: ",
    "stdout_lines": [
        "\u001b[93mWARN: bench is installed in editable mode!",
        "This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`",
        "A Procfile already exists and this will overwrite it. Do you want to continue? [y/N]: "

No idea why it fails with exact same config.

I see the same errors on other systems now as well. When I created this in April it was working well, but as you can see in other posts in this thread, the Ubuntu image has been changing and becomes unfit for installing ERPNext without a great deal of work (which also seems to change every week as well).

To that end, I have stopped using Ubuntu as my OS and started using Debian 10 because it tends to be a bit more stripped down and less stuff that you don’t need built into it. Here is my steps for getting Debian 10 running:

If you insist on using Ubuntu, there is one other method you can try. I used these step for a while before I turned away from Ubuntu. You might find this to be working better:

Hope this helps.



Tried v13 debian10 as per your suggestion. works well. restored my prod db from v12 and with minimal effort, its up and running now. only faced minor hiccups due to invalid data field options in my custom apps.