There is a problem with installing ERPNext on Ubuntu.

Hi. I have been trying to install ERPNext 15 on Ubuntu 22.04 for 2 days, but I can’t complete the installation successfully.
I am using the automated installation script for ERPNext. GitHub - flexcomng/erpnext_quick_install: Unattended install script for ERPNext Versions, 13, 14 and 15
I don’t know what else to do; it just won’t install. I recorded a video showing what I did and where it fails.

Please check it.

while installation don’t add any user and try to install again it will work

I followed this guide, but I keep getting a 404 error :frowning:

Do you mean not creating a Frappe user and installing everything as root?

Yes, don’t create the user, simply start from the beginning, remove and install ubuntu wsl again,
Install the script and it will work.

I tried many times and it’s working fine.

I tried installing without creating an additional user, but my SSH client keeps closing at the same point every time. I tried other SSH clients, but they also close.
I uploaded a video showing how and when it closes.

@flexy2ky any suggestion

@Qmax The issue is simple… you’re running the script as root and bench commands terminate when run as root. When you enter your site url and administrator password, the next step in the script is bench new-site [your-site-name]. This command cannot be executed as a root user so bench returns an error because the command was issued by the root user based on the video you have shared. The reason why the ssh session terminates and the window closes is that the script runs in virtual mode so it does not maintain its state once it begins to run so if there’s any interruption, it terminates and for most ssh clients, this means the connection will close. if you however use terminal (for mac or ubuntu systems) or command line (for windows) even when the connection terminates, the terminal window will remain open allowing you to see the error which resulted in the termination of the install process.

To fix this, ensure you create a non-root user and assign sudo permissions to that user. You then ssh into your vps as that user before downloading and running the script. I am currently working on a revision of the script to handle errors and prevent termination if there’s an error. This will be released soon.

Also note that if you are successful in completing the installation, your site may not run on Contabo as their vps comes bundled with Apache2 by default which prevents nginx used by frappe to run. So you have to remove the Apache2 web server and all associated dependencies and then restart your server for nginx to run.

1 Like


My first time installing ERPNext on Ubuntu, it took me almost a month to get it right.
I recommend not to run directly on Ubuntu. If you mess up the installation you have to go back and install Ubuntu again and tray again to install ERPNext. This is a terrible waist of time.

I recommend that you install ERPNext in Docker on Windows or Ubuntu. That way if there any mistakes, ect. you just delete the docker images and containers and start again. Saves you from re-installing Ubuntu again or Docker.

Installation of ERPNExt on Docker takes about 10 minutes, and its normally always perfect, I never get errors from the docker installation. If you have a big enough server you can also use this type if docker installation for server production installation

Here are some tutorials.

Follow-up video

This script installs the required libraries + Frappe + ERPNext in less than 30 min on any Ubuntu Installation. Even if its a fresh Ubuntu instance.

@Qmax erpnext canbe installed in the fresh site only. just create a new site and intsall erpnext 15 first and then you can start bench. you can use erp 15 only on frappe 15. just pull erp app by bench get-app erpnext --branch version-15