[NEW:2020-07-18] ERPNext v12 manual install on ubuntu 16/18/20 with Python v3.x

[NEW:2020-07-18] ERPNext v12 manual install on ubuntu 16/18/20 with Python v3.x

I have tested this new sequence several times on each of ubuntu v16.04, 18.04 and 20.04 via VirtualBox – it works consistently.
I applied a few minor updates to the previous Debian 10 post and discovered some errors, hence this “NEW” version.
Other differences specific to this version:
– ONLY v12 (not v11+updates)
– Python 3.x environment
– wkhtmltopdf latest 0.12.X-1 (the default is 0.12.3 and this is often updated to 0.12.5, but I figured why not put in the very VERY latest one)

There is almost nothing new or amazing in the script – it is just a compilation+cleanup of things I have tripped over.
I created it because there are numerous posts and questions about how to install on ubuntu XX, and I could never answer them with any certainty since, although ubuntu is based on debian, there ARE differences in the processes and sequences, and I’d never actually used (or liked) ubuntu.
At the time of creation {2020-07-18} this will install erpnext/frappe 12.10.1/12.8.1 in production mode, using a python3 environment. The created VM’s are available for download – links at the bottom.

Like the Debian 10.4 article, it is based on various documents and notes that I have picked up on the ERPNext forums. I have left my little scraps of notes in comment lines. I will credit referenced posts/articles wherever I used them.

The syntax is ZSH/BASH compliant if you want to copy/paste it.
I run it line by line (in some cases, like if …..fi; you need to copy/paste the relevant block) instead of as a script so that I get properly warned if anything is wrong along the way.


The pre-prep (Yes, I know you can’t prepare before you prepare)

Before we start on the OS & ERPNext pieces, let’s create a base machine using VirtualBox (although you could just as easily run this on a PC of suitable spec).
I created a VM as follows (XX=16/18/20):
VMname=uXXe, ubuntu 64bit, 4GB RAM, 16GB vHDD, Network in bridge mode (I assume it gets a DHCP address on/from your LAN).
VBox will assign 4GB to swap, leaving you 8GB for the OS etc, and after everything below, you’ll be left with a few GB of free space.

Start with a basic install with the version of your preference
ubuntu 16 [FYI: as per the ubuntu forums, the default mini.iso on the ubuntu 16 page does NOT work properly – use this link to get a working one]
ubuntu 18
ubuntu 20

Perform the install as follows:
– nonGUI,
– set your closest mirror to speed things up a bit,
– I use AUTO partitioned [this becomes ~4GB:swap,~12GB(remainder):/], but if you’re an advanced user, you could manually configure this.
ONLY these are selected
[*]SSH server
[*]standard utilities {on v16 it shows as [*]basic ubuntu server}
– This will fetch a bunch of files for the install. On v16.04 ~170 files, on v20.04 about 300 files
– I prefer to create a non-root user/password set to user001/user1password at install time, and use this as the SSH login for the initial part.
– [This step is optional – you could just create that user as erpnext01, but I have experienced occasional permission errors that way, so I prefer this method]
The IP address of the machine (in this example) is 192.168.1.244, and I like to match the port to the IP, so in the end it will be running on http://192.168.1.244:8244 – but that’s just personal preference, and is not essential.

At the end of it, you’ll get a production version of ERPNext (v12 stable at the time of this update) running on a minimalist non-GUI ubuntu.


The preparation process

Within/during the install, I set the users as follows (please do NOT use these values – they are not safe)!

  • user001/user1password – with sudo permissions
  • root/rootpassword
  • MySQL(root):mysqlpassword
  • erpnext01/erpnextpassword – with sudo permissions
  • Administrator:adminpassword

Once this completes, and has rebooted, you can login as root, and run the install steps below.
I normally modify the SSH port from the default of 22, to another non-standard values (eg. 22244) which gives a glimmer of extra protection from script kiddies (but not from real hackers, who would find the port anyway). I don’t allow direct root login via SSH except with PKI infrastructure. This is achieved by editing the SSH config file

I personally prefer to SSH into the VM instead of using the TTY – specifically using terminator (OR you can use PuTTY) since it allows copy on select & right-click paste+go, which makes life really easy


The actual setup/install process for the server portion

login as user001

If you didn’t create your ERPNext user at install time, then you can do it here (I recommend this method over creation at install time)…


Now we’ll perform the ERPNext side of the installation.

erpnext 12.10.1
frappe 12.8.1


The resulting .ova’s can be downloaded here and then imported into VirtualBox…

I can offer absolutely no guarantees about whether it will work for you – it does work 100% for me if that’s any consolation. It has everything normally required to get your system working. Please CHANGE all the relevant passwords and ports to suit your own needs as the current ones are public knowledge from the article!

It is at the point where you usually do your GUI setup and contains only the default installation info – 0% customised/configured.


2 thoughts on “[NEW:2020-07-18] ERPNext v12 manual install on ubuntu 16/18/20 with Python v3.x

  1. Hi Trent, the first time i tried using Erpnext i felt like i was in hell. Dozens of inconsistent install scripts, shoddy documentation and outdated info. Your script really helped me install , learn and understand the whole process.

    Keep up the good work. If you ever get around to Kubernetes or Remote Databases, I am sure that write up will help scores of people like me.

Leave a Reply to Aiswariya Cancel reply

Your email address will not be published. Required fields are marked *

19 − 4 =