[Tutorial] How to 'manually' install ERPNext v13.11 Production on Debian 10 (w/SSL cert)

The installation completed perfectly with SSL also in place.

I got stuck with setting the email ( SMTP ) setting , tried all possible ways for Gmail ( Main Password, App Password ) and all it says is Request Timed Out .

I tried other email services also but same. Any Help will be appreciated .

Thank you very much, you saved me time, as I’ve spent more than three days trying to install ERPNext on Ubuntu 20.04.
It works on Debian 11, also.

I have installed Erpnext using the following steps listed above… But I have to always run bench start when I reboot the server… I tried to modify the redis configuration files but no luck… So, How to tell Bench to automatically start when the server is rebooted???

run bench setup production

That was the command I ran during the installation… But still it did not automatically start… While running bench start I get a warning of something called : caniuse-lite, its says to update it using some npx command… Maybe that might be the issue

I solved the error… It was indeed a Caniuse-Lite Error…

I am following your tutorial on Debian 11.

This command raises the error:

ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

Also notice that the table name is user but the field name is User (with capital U) .

Please help

It sounds like you missed the first line of that set of instructions telling you to use a different named database. Here it is again for reference:

USE mysql;
UPDATE user SET plugin=' ' WHERE user = 'root';

Hope this helps.
If not, then you likely have a very unusual server configuration for mysql.


1 Like

I confirm, I was using the mysql database. The server is Debian 11

Apparently on newer versions of Mariadb you don’t just go and change the user table, instead you have to use the ALTER user command as said here

Maybe we need to update these instructions.

:rofl: No. I think not!

Maybe someone can take the time to figure out all of the differences between Debian 10 and Debian 11 and then write another guide for Debain 11.

This one is for Debian 10.

Maybe one day I will have the time to do a Debian 11 version, but that is not anytime very soon.




same bro, i try this command on mariadb 10.6 with ubuntu 22 but error.

@bkm @Divert can you help me please? whats a correct command for this? Tell me ASAP.


@Tri_Agung read my comment here. It will give you the hint to your answer.

Still I have not been able to install ERPNext no matter what guide I try. I am trying to set a VPS from Digital Ocean that already has ERPNext in it’s image. Just fire up the image and you have ERPNext, the problem is that it is not clear to me how to set your custom domains.

What is the difference between sites and domains in ERPNext language?

Unfortunately I cannot help you with this.

I am a fan of ONLY using LTS version of operating systems so as to reduce the volatility of the constantly changing support packages.

That is why I write my tutorials for only LTS versions of the OS as well. So what I spend my valuable time researching and writing about currently are Debian 10 and Ubuntu 20.04.

For any other operating systems, you are on your own. The newer OS versions take up way too much time due to the constant changes, and I still have a business to run.


Sites are separate instances of ERPNext, such as you might have with a multi-tennant configuration.

Domains are the modules that focuses ERPNext into different business solutions such as Distribution, Retail Sales, Manufacturing, etc.


1 Like

In this case, are you speaking about URL domains or ERPNext business solution domains?

If it is the former, then this excerpt from the instructions should help you set your URL to the site:

Hope this helps.


1 Like

@bkm Thanks a lot, this tutorial Works flawlessly. I just installed successfully. Thanks again…

In the steps where you ask log out and back in, I had to do a su - [USER] and averything worked fine.


Setting Up Environment
$ /usr/bin/python3 -m venv env
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

    apt install python3.8-venv


apt install python3.8-venv

it worked.

I think installation procudure can be summarized as

  • Install required apps (mariadb, redis, nginx, etc…)
  • Install bench and frappe
  • Install erpnext
  • setup production
  • dns, site, ssl post configurations.

These are independent actions I believe.

So I think we need clear steps for each action. It would also help anyone if we can identify which step they have trouble.

We can create something like this for each step I think.

Excelente tutorial despues de muchos intentos hasta ahora, por fin logre instalarlo con exito … Gracias BKM

There is currently an issue at this step:

bench init --frappe-branch version-13 frappe-bench

This error comes up:

The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

apt install python3.8-venv

You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.

The fix is to run:

apt install python3.8-venv

And the installation will continue afterwards.