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

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:

How I can do erpnext access only from subdomain? Do I need do something in nginx config? What?

Make sure you name site as subdomain.domain.com and have the IP address set in DNS through control panel.

Add --site subdomain.domain.com in the easy install command.

This really has more to do with how you have your DNS pointers configured. You can make any subdomain the primary domain for an ERPNext installation.

For example:

If I own erpbybkm.com I can go to the doamin name provider and create many subdomains such as
testing.erpbybkm.com
production.erpbybkm.com
sandbox.erpbybkm.com

I can then build 3 different ERPNext servers on 3 different IP Addresses and then use DNS pointers to point each of the subdomains to one of the 3 servers.

At the servers I use the following to set them up for their new subdomain URL:

cd frappe-bench
bench config dns_multitenant on
bench setup add-domain --site site1.local [your.new.URL]
bench setup nginx (answer Y to the question about replacing the config file)
sudo service nginx restart

That is the easiest way to add a URL. Doing it this way gives you the ability to change the URL later if you want without the confusion of trying to rename site directories and all that crap.

BKM

3 Likes

The first time I ran the script it exited with this error:

subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=kare’]’ returned non-zero exit status 2

Then I ran these:

sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs

and ran the install script again and it went through just fine.

Thanks

Jay

1 Like

That was on a Digital Ocean instance. I just tried on an AWS EC2 Instance and the same error and same solution.

Thanks

Jay

This did the trick for me. Thanks!

My full command:

sudo python3 install.py --verbose --production --user erpuser --mariadb-version 10.5 --frappe-branch version-13 --erpnext-branch version-13 --site hrms.narayanagroup.com --mysql-root-password 'mysqlpass' --admin-password 'adminpass'

3 Likes

NOT WORKING !!! Tested 10 times

There’s a package issue that causes installation to fail when using easy install. To fix the issue, run the following command to install the right package version:

sudo pip3 uninstall setuptools
sudo pip3 install setuptools==59.6.0
sudo pip3 install -e /home/[your _user]/.bench/

Then retry the easy installation. The installation should be successful afterwards. To cover all bases, you could reboot your server afterwards before first login (I always do that for good measure even though I can’t certify that it’s a necessary step).

I did that :

sudo pip3 uninstall setuptools

sudo pip3 install setuptools==59.6.0

sudo pip3 install -e /home/[your _user]/.bench/

Either the installation works but with the message “Sorry, we will be back soon”

Then I guess rebooting the server is necessary after all. Reboot your server and you will be fine.

After REBOOT, NOT WORKING !! Frappe is dead !
the message “Sorry, we will be back soon”