[Guide] How to install ERPNext v14 on Linux Ubuntu (step-by-step instructions)

@shashank_shirke Thank you. That corrected the problem.

@shashank_shirke - Great guide mate. I think this is probably the first correct guide for version 14 on ubuntu 22.04

I am struggling with installing my positiveSSL on the ERP site, is this something you do as a service?

Hi @CodingRockz

Good to know that you found the guide helpful. Regarding the SSL certificate issue, you’ll first have to first add a custom domain and then enable dns_multitenant on the default site and then install your SSL certificate on the site.

@shashank_shirke This is largely a perfect guide thanks. I followed it and the only error that I encountered is on Mariadb barracuda issue.

It is important for the settings to be taken to /etc/mysql/mariadb.conf.d/mariadb.cnf instead of /etc/mysql/my.cnf.

That is the only change I did and it worked.

for me the mentioned one in the guide worked.

Hello Shashank!
Thank you so much for this guide. Recently I was able to install v13 with my own collected infos, but I never got to work production mode or the correct creation of PDF files.
I used your guide to install a new VM. I have a Proxmox server and I used the LXC Ubuntu 22.04 template.
Everything installed fine and it is much better than my own install guide.
I have one remaining issue: When i create an offer and I want to create&download the offer-PDF-file, then the PDF is zoomed in and the outer edges of the page are missing.
Do you have an idea how to solve this?
Thank you very much for your work!
Edit: It might be this bug:

Hi @mwogi

Thanks for the update on this. Some installations might require additional configuration to be done in MariaDB cnf files as well. This was required in v13 but for v14 I tried with just the my.cnf file and it did work.

But I understand some server images and packages repos are different and so might require additional configs. Thanks for updating this.

Also, please do share the exact config you used in the mariadb.cnf file so that it will be helpful for others facing this issue.

Hi @DrSchnagels

Great to know that you found the guide useful. As for the PDF generation issue, this has been reported in the past as well.

Can you confirm what version of wkhtmltopdf have you installed by running;

wkhtmltopdf --version

Also, if possible share a screenshot of a sample PDF file that you’re facing issues with.

this is my output:
Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.39-3-pve x86_64)
wkhtmltopdf 0.12.6


Hi!
Can you help me understand why there is two times a
“sudo bench setup production [frappe-user]”
in 7.3 and 7.5 ?
Thanks!

@shashank_shirke the link you attached worked. Thank you!

This is just to make sure that the NGINX config file is created correctly. Sometimes the NGINX config doesn’t get written correctly the first time so running the command twice ensure that there are no issues.

After some research I got the PDF creation working flawlessly. I found out that the installed version of wkhtmltopdf is the NON-qt-patched version. But the qt-patched version is needed in order to generate correct PDF files from the document preview.

The “sudo apt-get wkhtmltopdf” for Ubuntu 22.04 variant installs the non-qt-patched version. This one does not support the parameter " --disable-smart-shrinking".
Therefor all PDF files are truncated, shrunk, at the edges, even removing logos or text.
The preview is correct, the created pdf file is mistakenly shrunken / cut.

I solved it with these commands:

remove bad version

sudo apt-get remove wkhtmltopdf

download the latest, qt-patched version from the official github

visit wkhtmltopdf website to see for other distros
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb

install correct version with qt-patched and check if it works

sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb
vvv@gggg:~$ wkhtmltopdf -V
wkhtmltopdf 0.12.6.1 (with patched qt)

After this PDF files are correctly generated.
BTW: I tried to do “sudo bench install wkhtmltopdf” but this only threw errors at the end.

6 Likes

Thanks for the explanation!

**4.2 Install Node**
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profile
nvm install 16.15.0

Could you go into a bit more detail about this? Why is an old version of nvm installed?
What does this install.sh script do? Could this break this wonderful guide in the future?
What does the source - command do?
Thanks again so much for your help and explanations!

in 3.1 need add sudo service mysql restart before " ```
sudo mysql_secure_installation

Yes this might be required but it’s not a necessary step before we configure the MariaDB server.

Although restarting the MySQL server is a mandatory step once the config is done to make sure that the changes are applied.

Great to know that you solved the issue. May be it’s a random issue that some users might face depending on the repositories used to install the Ubuntu image.

The install.sh script is the default installation script used by nvm (version manager for Node) to install Node on a per-user, per-shell basis.

The reason for the specific version of Node is because it is one of the newest LTS versions (long-term supported) of Node and it is also compatible with v14 of Frappe & ERPNext.

As for the source ~/.profile command, it is used to set the correct environment variables.

Thanks

Oh wow! Thanks for the explanation!! I remember having to install a much older version of node for my first v13 install.
It’s awesome that it installs the newest LTS version!

This is just fantastic. Great job dude :clap: :clap: :clap: