How to install erpnext version 12 on ubuntu 18.04

Dear Team,

How to install erpnext version 12 on ubuntu 18.04. Kindly provide the steps.


You can try the instructions found here:

Note that it says it works on Ubuntu 16.

The Virtualbox image could also be used, which contains ERPNext on a Ubuntu 14 VM.

Support for Self Hosted ERPNext is also available:

18.04 does the Easy Install smoothly. you just need to install python3-minimal python3-setuptools and build-essential preferably redis-server before running the Easy Install. If it is a vanilla system and you are root, use the sudo -H option.
To use the Easy Install options to the fullest, I woud advise exploiting the command as:
sudo -H python3 --production --site–user frappe --mysql-root-password whatever_you_fancy --admin-password whatever_you_fancy --bench-name bench_you_would_like_to_call

that will give you a version-12 erpnext and frappe on 12.0.0


Do not forget to assign a password to the frappe user and add it to the sudoers group. This user does not need to be named frappe by any means.

Hi, I got below error:

sudo -H python3 --production --site–user erpnext --mysql-root-password whatever_you_fancy --admin-password whatever_you_fancy --bench-name bench_you_would_like_to_call
usage: [-h] [–develop | --production] [–site SITE]
[–without-site] [–verbose] [–user USER]
[–bench-branch BENCH_BRANCH] [–repo-url REPO_URL]
[–frappe-repo-url FRAPPE_REPO_URL]
[–frappe-branch FRAPPE_BRANCH]
[–erpnext-repo-url ERPNEXT_REPO_URL]
[–erpnext-branch ERPNEXT_BRANCH] [–without-erpnext]
[–version VERSION] [–overwrite]
[–mysql-root-password MYSQL_ROOT_PASSWORD]
[–mariadb-version MARIADB_VERSION]
[–admin-password ADMIN_PASSWORD] [–bench-name BENCH_NAME]
[–container] error: unrecognized arguments: erpnext

I tried to install different method and now it shows as below:

erpnext@erpnext:/srv/bench/frappe-bench$ bench version
erpnext 12.0.3
frappe 12.0.3

If I done bench update it show below error:

pymysql.err.InternalError: (1184, “Aborted connection 75 to db: ‘unconnected’ user: ‘erpnext’ host: ‘localhost’ (init_connect command failed)”)

due to some reason mariadb is not connecting. please help me to resolve this.

Mariadb version is mariadb Ver 15.1 Distrib 10.4.6-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Nothing is stored in my database. database is empty now.

while running this command bench new-site localhost I get below error:

pymysql.err.InternalError: (1184, “Aborted connection 79 to db: ‘unconnected’ user: ‘erpnext’ host: ‘localhost’ (init_connect command failed)”)

It is very hard for me to help you when you apply a different method at least without knowing the method you have applied.

Looks like the OS user erpnext is not a mariadb user and there are methods to check and correct this. However, if you are on a vanilla system, I would not recommend doing that. Reinitialize the system and let Easy Install do its job.

I have installed it using the method explained here GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps

please let me know about venilla system. is it dabian os?

It is a Ubuntu 18.0.4LTS. Installed with min 4GB ram and 20GB disk. All upgrades installed and prerequisite packages installed. Note that this installation will be based on Python3.

Are you root while doing this?

Not everything that is written there is up to date :slight_smile: Live and learn

Thanks. I have same system.

I am doing this with the erpnext user not the root. I am thinking it might be some database issue. its not connecting properly.

Then, you need to assign erpnext user to sudo group and assign the password. Looks like you have installed mariadb under a different user and did not do the necessary config.

Reinstall the system with the sequence I have laid down and you will be up and running in no time.

thanks. I will check

yes, I have installed mariadb as root user

Reinstall Ubuntu 18.0.4LTS. Do apt update and apt upgrade as root. Reboot.
Install pyhton3-setuptools python3-minimal redis-server build-essential
Download and run the Easy Install script with proper parameters on sudo -H switch.
assign a password to erpnext user and add it to sudoers
login with erpnext user and go to bench folder