How to install v12 on Ubuntu 18.04

How do I get this darn thing installed? None of the install instructions work when you use the easy script thing. I keep getting an error in ansible-playbook like this:

sudo python3 --production --user erpadmin
Logs are saved under /tmp/logs/easy-install__2020-03-13__21-12.log
Checking System Compatibility…
ubuntu 18 is compatible!
Installing curl…
curl installed!
wget already installed!
git already installed!
Installing pip3…
pip3 installed!
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit
localhost does not match ‘all’
Input MySQL and Frappe Administrator passwords:
Please enter mysql root password:
Re-enter mysql root password:
Please enter the default Administrator user password:
Re-enter Administrator password:
Passwords saved at ~/passwords.txt
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit
localhost does not match ‘all’
[WARNING]: Consider using the get_url or uri module rather than running ‘curl’. If you need to
use command because get_url or uri is insufficient you can add ‘warn: false’ to this command task
or set ‘command_warnings=False’ in ansible.cfg to get rid of this message.
Traceback (most recent call last):
File “”, line 437, in
File “”, line 241, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “”, line 362, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’), stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.6/”, line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=erpadmin’]’ returned non-zero exit status 2.

Ahh crap, I see it bombs out when it runs this command:

echo 1 | tee /proc/sys/vm/swappiness

That’s a read-only file when I’m logged in as root. What the heck is this for???

Is erpadmin an existing Ubuntu user before you issue the command?
If so, use a user name that does not exist in Ubuntu.

For example, if you logged in as erpadmin, try using frappeadmin as the username:

sudo python3 --production --user frappeadmin --mysql-root-password mariadbpassword --mariadb-version 10.3 --admin-password adminpassword --verbose

This will create an Ubuntu frappeadmin user. You don’t have to wait to enter mysql root password, and ERPNext Administrator password because you supplied them with the prompt.

After this goes through, issue the following command to setup the frappeadmin user.

sudo usermod -aG sudo frappeadmin
sudo passwd frappeadmin    (make password for frappeadmin)
su - frappeadmin    (this will use frappeadmin as the sudo user, and go to its home directory)
cd frappe-bench

You can issue bench or Ubuntu commands at this point.

When you log in to Ubuntu, you login using frappeadmin user.

It is also good to issue this command

 echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

This will solve the ENOSPC gotcha.

I was logged in as erpadmin when I ran the command. erpadmin already had full sudo privileges.

The reason the install bombed was because it could not write to /proc/sys/vm/swappiness. I had to delete the last 2 lines in main.yaml to tell it to not bother modifying swappiness.

Are you using OpenVZ VPS? i.e. no swap is allowed by the host
if no, there’s something with redis nowadays to be installed with Ubuntu 18.04
I don’t know why! but you can continue after disable IPv6.
make sure redis is running before you run the install script again.

Simple workaround is already posted some time back.

nano /etc/redis/redis.conf
# locate follwoing
bind ::1 
# simply remove it or comment it by adding # in front of the line. it will look like following:
# bind ::1 
# Then restart installation again

Above steps fix your problem with redis server which fails to install when there is no IPv6 or misconfiguration with IPv6 on OS level.

you can proceed to install redis after comment the below line,

nano /etc/sysctl.conf
#net.ipv6.conf.all.disable_ipv6 = 1

additional settings for tuning - optional

vm.overcommit_memory = 1
net.core.somaxconn = 512
fs.file-max = 1048576

This is the reason why your install bombed. You used the same user as the one you logged in. You have to use another user (not yet existing) for frappe. This user that you indicate in the install command option will be made by the Easy Install for you.

After the installation, you made this new frappe user into a sudo user, give it a password, and su into its home directory.

This was a gotcha that got me when I started ERPNext, and this is what led me down the maze of manual installation procedures.

Now, to install Ubuntu 18 (don’t use 16 anymore or 19 yet), I just wget the and run the easy install command and have coffee.

After that I do frappe user sudo commands, the ENOSPC fix, and Redis configuration fix.

No, this had nothing to do with ipv6. It has to do with setting swappiness. IPv6 WAS enabled and it installed fine after I hand-tweaked the main.yaml file

In fact it is related and I have tested it on many cloud VMs with multiple cloud vendors where Ubuntu/Debian is base OS for ERPNext.

That’s weird, I wonder why ipv6 has anything to do with swap space…