Install ERPNext on Ubuntu 18.04 Server

In this post, we explain to you how to install ERPNext on Ubuntu 18.04 in DigitalOcean, Amazon AWS or any other droplet provider. Before we start installing we have to know about what is ERPNext? ERPNext is a free and open-source integrated web-based ERP software developed by Frappe. ERPNext is used by manufacturers, distributors and services companies. In ERPNext offer large number of Apps like accounting, sales, CRM, purchasing, e-commerce, point of sale, inventory, manufacturing, warehouse, project management and many more. So let’s start how to install ERPNext on Ubuntu 18.04.

Install ERPNext on Ubuntu 18.04

Step 1 Update and Upgrade APT

Update APT list of available packages and their versions. And use upgrade command to actually installs newer versions of the packages.

sudo apt-get update && sudo apt-get upgrade

Step 2 Install Prerequisite

You may have to install Python prerequisite dependencies in order to execute install.py (step 4).

sudo apt-get install python-minimal

Step 3 Download Installation Script

You have to execute following command to fetch ERPNext installation script file.

wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py

Step 4 Run Installation script (Install ERPNext on Ubuntu 18.04)

Next you have to run the following installation script depending on development or production environment.

  1. For development environment:
    python install.py --develop --user frappe
  2. For production environment:
    python install.py --production --user frappe

Above script will install all the prerequisite, command line bench, create new bench and create new ERPNext site on bench.

While running this script you will asked password for MariaDB root user and Frappe Administrator user.

Please enter mysql root password: 
Re-enter mysql root password: 
Please enter the default Administrator user password: 
Re-enter Administrator password: 
Passwords saved at ~/passwords.txt

Finally, installation is completed you will getting this message,

Frappe/ERPNext has been successfully installed!

Step 5 Start Server

Now you have to login with frappe user and navigate to frappe-bench directory.

sudo su - frappe -s /bin/bash
cd frappe-bench/

Finally, you have to start the server using bench start command.

bench start

Go to your web browser open your server IP address with 8000 port number http://0.0.0.0:8000 and you will see the ERPNext login screen. Here you have to login with username “administrator” and password as per you configured on step 4.

Here you can find list of ERPNext bench command. And you can explore here other ERPNext related posts.

If you like our article, please consider buying a coffee for us.
Thanks for your support!

Support us on Buy me a coffee! Buy me a coffee!



10 Responses Leave a Comment

  1. Great! single command to install everything all.

  2. Hello,

    I have error to install

    “sudo apt-get install -y git build-essential python3-setuptools python3-dev libffi-dev libssl1.0-dev”

    tell me is unable to locate

    1. blank
      SpeedySense Editorial September 1, 2019 at 8:12 PM

      You facing issue while you install thru the script. We suggest you to install manually here is the article for manually installation.

  3. Traceback (most recent call last):
    File “install.py”, line 413, in
    install_bench(args)
    File “install.py”, line 135, in install_bench
    run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
    File “install.py”, line 327, in run_playbook
    success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
    File “/usr/lib/python2.7/subprocess.py”, line 190, in check_call
    raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘sit e.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frapp e’]’ returned non-zero exit status 2

    i m getting this error while running production environment commad:
    python install.py –production –user frappe

    1. blank
      SpeedySense Editorial December 23, 2019 at 8:11 PM

      Can you please follow this manually instalation process.

  4. Hello,
    I’ve followed your guide, installed on UBUNTU SERVER LTSC 18.4.04
    Once I’ve tried to start the whole thing (bench start) I can’t reach the webpage.
    16:58:39 system | redis_cache.1 started (pid=28592)
    16:58:39 system | redis_socketio.1 started (pid=28593)
    16:58:39 redis_socketio.1 | 28601:C 02 Apr 16:58:39.816 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
    16:58:39 redis_socketio.1 | 28601:C 02 Apr 16:58:39.816 # Redis version=4.0.9, bits=64, commit=00000000, modified=0, pid=28601, just started
    16:58:39 redis_socketio.1 | 28601:C 02 Apr 16:58:39.816 # Configuration loaded
    16:58:39 redis_socketio.1 | 28601:M 02 Apr 16:58:39.817 * Increased maximum number of open files to 10032 (it was originally set to 1024).
    16:58:39 redis_socketio.1 | 28601:M 02 Apr 16:58:39.817 # Creating Server TCP listening socket 127.0.0.1:12000: bind: Address already in use
    16:58:40 system | socketio.1 stopped (rc=-15)
    16:58:40 system | schedule.1 stopped (rc=-15)
    16:58:40 system | worker_long.1 stopped (rc=-15)
    16:58:40 system | worker_default.1 stopped (rc=-15)

    1. Without the portnumber I was able to connect to the login page.
      But after the login I get:
      ‘ascii’ codec can’t decode byte 0xd0 in position 1801299: ordinal not in range(128)

      1. Ok found out I had to change the locale of the system.
        Followed this guide:
        https://discuss.erpnext.com/t/error-while-running-production-mode-for-version-12/50403/4

  5. whats the password for user frappe

    1. blank
      SpeedySense Editorial December 7, 2020 at 5:44 PM

      You need to override password

      sudo bench –site sitename set-admin-password newpassword

Join the Discussion.