Install v13 Production on Ubuntu 20.04 VPS - This is how I did it "Easy Install" script

several versions ago, there are no difficulties installing in Ubuntu 18/20 using cake & bakery document. But several days ago when trying installing in 20 then 18, errors are popping, and @bkm post of Debian 10 became my permanent solution!

Hmm, well, I don’t want to be overly negative but…give up on Ubuntu doesn’t seem to be the best solution. :frowning:

I’ve tried every option I could think of and/or find on forums but nothing works so I guess I’ll wipe my system, install Debian or some other variety that apparently (fingers crossed) works and give that a try. Sigh…

Hello, I installed ERPnext. And this run on my localhost through browser, but I can’t complete installation. Https://127.0.0.1/app/setup-wizard/0 I press button “Next” but nothing to happen. What should I do?

In the last one month I have spun and killed my test instance several times and I have not faced any issue running the Easy Install Script for fresh installs. My OS of choice is Ubuntu 20.04 and the python version installed every time is python 3.8.10. However, I haven’t faced any issue installing or running ERPNext. I only kill the instance every time because it is my test bench so I run a lot of crazy stuff in it just to see how they work.

goldenscrew,

I managed to get everything up and running and sort of documented the process here.

I’m not sure how helpful the information there will be but…maybe worth a quick run through.

Cheers

Would you mind recording a video and share?

Not working !

fatal: [localhost]: FAILED! => {
“changed”: false,
“invocation”: {
“module_args”: {
“allow_unauthenticated”: false,
“autoclean”: false,
“autoremove”: false,
“cache_valid_time”: 0,
“deb”: “/tmp/wkhtmltox.deb”,
“default_release”: null,
“dpkg_options”: “force-confdef,force-confold”,
“force”: false,
“force_apt_get”: false,
“install_recommends”: null,
“only_upgrade”: false,
“package”: null,
“policy_rc_d”: null,
“purge”: false,
“state”: “present”,
“update_cache”: null,
“upgrade”: null
}
},
“msg”: “Breaks existing package ‘wkhtmltopdf’ that conflict: ‘wkhtmltopdf’. But the ‘/tmp/wkhtmltox.deb’ provides it via: ‘wkhtmltopdf’”
}

RUNNING HANDLER [mariadb : restart mysql] **************************************
task path: /tmp/.bench/bench/playbooks/roles/mariadb/handlers/main.yml:2

PLAY RECAP *********************************************************************
localhost : ok=38 changed=24 unreachable=0 failed=1 skipped=47 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 500, in
install_bench(args)
File “install.py”, line 281, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 416, in run_playbook
success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.6/subprocess.py”, 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=frappe’]’ returned non-zero exit status 2.

I installed in Ubuntu 18 in around 20 minutes using the following;
UPDATE: 16/09/2021 Now you need to configure redis. (Steps given below as per @bkm )

sudo apt-get update
sudo apt-get upgrade

adduser frappe
usermod -aG sudo frappe

export LC_ALL=C.UTF-8

sudo apt install git libffi-dev python3-minimal build-essential python3-distutils python3-setuptools python3-pip python3-testresources libssl-dev wkhtmltopdf redis

Nest we need to fix a potential problem in the redis config file:

sudo nano /etc/redis/redis.conf

When the editor is open, search for: “port 6379” and edit to to “port 13000” then (ctrl+o and ctrl+x) to save and exit

sudo systemctl restart redis

wget https://raw.githubusercontent.com/frappe/bench/develop/install.py
sudo python3 install.py --verbose --production --user frappe --frappe-branch version-13 --erpnext-branch version-13
3 Likes

try to install it on Ubuntu Server 21.04 when I use last command

sudo python3 install.py --verbose --production --user [USER] --mariadb-version 10.5 --frappe-branch version-13 --erpnext-branch version-13

I have error:
The repository ‘Index of /mariadb/repo/10.4/ubuntu/ hirsute Release’ does not have a Release file.

Installation works fine… but it says

WARN: bench is installed in editable mode!

How to correct this?

now i reinstall my ubuntu server 21.04 and now I have next error, please see screnshot.

Ignore it. It’s just information. We have it on all servers. No issue faced b

Use only Ubuntu 20 or older. Doesn’t work on 21.

I change Ubuntu 20 on 21 in /tmp/.bench/playbooks/roles/wkhtmltopdf/tasks/main.yml and it was installed.

1 Like

Best to wipe the server and reinstall the OS. I tried going backwards from 20 to 18 once an found that much of the original files stayed in place. The kernel did regress but not to anything you would have found in v18 so I could never get it to work.

Best to wipe the server and start over (unless you are an Ubuntu OS guru and can reconfigure it ALL by hand).

BKM

we are in need of customizing erpnext we need an expert to support us

After completed steps on VirtualBox got the following
message.

Bench + Frappe + ERPNext has been successfully installed!

How can I access the site from the Host os browser?

http://localhost:8080/
http://site1.localhost/
http://site1.localhost:8080/

Does not connect to the server. port forwarding has been configured as follows

Do I need to run?
sudo bench setup production

================= Update Successful Result =================
These easy installation steps works fine in
Host os elementary OS 5.1.7 Hera (Built on Ubuntu 18.04.4 LTS)
VirtualBoox 6.1
Guest os Ubuntu 20.04 server

Once you get

Bench + Frappe + ERPNext has been successfully installed!

message. run

  1. cd frappe-bench to change the directory

  2. sudo bench setup --yes production [USER] to Setup Production as described in https://frappeframework.com/docs/user/en/bench/guides/setup-production

  3. sudo systemctl enable supervisor

  4. sudo systemctl enable nginx
    then restart the server (guest os)

Set port forwarding as follows

Then you can access the site using the host os browser

http://site1.localhost:8000/
http://localhost:8000/

Log in using

Username: Administrator
Password: admin ( if you changed the password at installation use it )

Installed versions

:+1:

Hello. What if I install it by root user?
And how I can launch erpnext on subdomain or domain?

You should never install as root user!

In fact, if you were to use the Easy Install scripts as root user it would fail after giving you a bunch of errors about attempting to use root user. (BTW… this is different from installing in a user directory as “sudo”)

Frappe/ERPNext operates as if the “user” is always logged into the server so the system can be available to the public via the webserver. By installing in the root user you would open yourself up to multiple kinds of hacks that would compromise your server. This is likely why the official install scripts checks for the user and fails in the install is in the root user.

You would be welcome to try installing by a manual method as root user, but I suspect there would still be many problems to overcome on that route.

BKM

1 Like

thanks, I will reinstall it :slight_smile: