ERPNext manual install on Debian Buster 10.x

ERPNext manual install on Debian Buster 10.x

I have tested this sequence several times on Debian Buster 10 – it works consistently. Like the previous 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. The syntax is ZSH/BASH compliant if you want to copy/paste it.

I run it line by line 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:
VMname=DebERP, debian 64bit, 2GB RAM, 8GB vHDD, Network in bridge mode (I assume it gets a DHCP address on/from your LAN)

Start with a basic netinstall
– nonGUI install,
– set your closest mirror to speed things up a bit,
– auto partitioned to [~2GB:swap,~6GB(remainder):/]
– initially I had a 4GB vHDD, partitioned as… manual:(3+1), AND manual:(3.5+.5) – ran out of space on both – resized to 16GB autoPartition
– I resized again from 8-16GB. In the upgrade from v11(default) to v11(latest), and then the v12 upgrade, I ran out of space again – hence the increase.
ONLY SSH server, and standard utilities selected – NO gui! [retrieving 140 files…]
– IF you do add a GUI here, then you should check this note

The IP address of the machine (in my case) is 192.168.1.249, and I like to match the port to the IP, so in the end it will be running on http://192.168.1.249:8249 – but that’s just personal preference, and is not essential.
At the end of it, you’ll get a production version of ERPNext (v11 stable at the time of this update) running on a minimalist non-GUI Debian Buster v10 – with an option to upgrade ERPNext to v12 right at the end. [PS: v12 is REALLY nice]


The preparation process for Debian (Buster)

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

  • root/rootpassword
  • erpnext001/erpnextpassword – with sudo permissions
  • MySQL(root):mysqlpwd

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. 22022) 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


If you didn’t create your ERPNext user at install time, then you can do it like so…


Next, we’ll add the erpnext001 user to the sudoers list – the doubly safe way.


A note: in Debian Buster, the behaviour of su/sudo is different to previous versions. Using su erpnext001/su (for root), doesn’t convert the ENV/variables quite the same as before.
MUCH better to use su -l erpnext001 and/or su - (for root).


The actual setup/install process for ERPNext

login as root

I have seen a few occasions where frappe upgraded to v12.x.x, but erpnext only went to v11.x.x(latest) – something like this…
erpnext 11.1.46
frappe 12.0.14

This also relates to ~/frappe-bench/apps/erpnext/.git/config – it seems the default quotes around the FETCH command cause a mismatch. In this case, if you remove them, it seems to work OK.

erpnext 12.1.4
frappe 12.0.14


The resulting VM can be downloaded from here.
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.


1 thought on “ERPNext manual install on Debian Buster 10.x

  1. I thought that the preparation process would be more difficult, but thanks for clarifying anyway! It’s a pleasure to read your posts!

Leave a Reply

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

5 × 2 =