[UPD:2019-11-15] ERPNext manual install on Debian Buster 10.x

[UPD:2019-11-15] 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, and I like to match the port to the IP, so in the end it will be running on – 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.

12 thoughts on “[UPD:2019-11-15] ERPNext manual install on Debian Buster 10.x

  1. Bench isn’t being installed correct or something, stuck on #147.

    Do you have an updated guide for the latest (12.1.8) kind sir? ๐Ÿ™‚

    1. Here’s my output:

      fatal: [localhost]: FAILED! => {
      “changed”: true,
      “cmd”: [

      1. Oops, wrong one.

        Here’s my output.

        ERROR: botocore 1.13.17 has requirement python-dateutil=2.1; python_version >= “2.7”, but you’ll have python-dateutil 2.8.1 which is incompatible.

        I’ve pip installed botocore but still a no go…

    2. Which OS are you using?
      #147 might fail if you have created a subdir called site1.local already, and then you run this command again.
      Could you send me trace screens on trent@murgatroyd.za.net and I will have a look.

      1. I’m using Ubuntu 18.04 at the moment, but I’ve tried replicating exact steps of yours in Debian Buster as well (Debian wouldn’t let me get through starting at line 57, with installing of dependencies…).

        But on Ubuntu 18.04, it’s all going well until Bench part, where it gives me that botocore and dateutil errors. I’ve looked into the error and found that changes made on Github repo of botocore is being bombarded with dateutil changes as well…

        I’ll just wait it out a little bit.

        1. Although I have successfully installed it on an ubuntu machine (I think I had to do a few workarounds), it is specifically for Debian Buster 10.x – the dependency issues from ubuntu are not included in the sequence.
          I recommend trying it on a freshly installed minimal debian 10 machine.

          1. It was fresh Debian ๐Ÿ™‚

            At this point, I’m willing to give you access to my fresh Debian VPS if you find the time ๐Ÿ˜€

          2. Try adding this (after the wkhtmltopdf section)… I have updated the script
            sudo apt install -y python-dateutil
            If it doesn’t work, we can try the VPS route over the weekend

  2. Got stuck at line 55 & 57, showing multiple errors of missing dependent pacakages

  3. 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 *

one × three =