{"id":2751,"date":"2025-01-20T09:45:23","date_gmt":"2025-01-20T09:45:23","guid":{"rendered":"https:\/\/www.dedicatedcore.com\/blog\/?p=2751"},"modified":"2025-04-26T09:14:48","modified_gmt":"2025-04-26T09:14:48","slug":"install-erpnext-ubuntu","status":"publish","type":"post","link":"https:\/\/www.dedicatedcore.com\/blog\/install-erpnext-ubuntu\/","title":{"rendered":"How to Install ERPNext on Ubuntu"},"content":{"rendered":"<p>To integrate and rationalize processes into unified movements, businesses rely on ERP systems nowadays, even ERPNext-Innovative, compared to open-source ERP software-possesses flexibility, affordability, and overall features it provides-from accounting, go to inventory, right up to HR and CRM-then award-winning flexibility on the site has well-proven construction-with easy user interfaces. The modules are customized to fit businesses of all sizes by automating and smoothing out possible avenues for increased productivity within. It&#8217;s to be installed on a very Ubuntu server to provide a reliable, secure, and scalable foundation for impressive software deployment.<\/p>\n<p>This article will embark on a comprehensive tutorial that demonstrates the steps involved in installing ERPNext on an Ubuntu server. A detailed step-by-step guide makes it convenient for beginners and experts alike to set up their robust ERP systems within this article. This tutorial will prepare you for setting up your server, installing ERPNext, optimizing it, and securing your protocols. Make an ERPNext host instance on a dedicated server like that on DedicatedCore, ensuring reliable and quick performance, as well as seamless scalability, to focus on growth instead of infrastructure limitations.<\/p>\n<p>This part form covers all the essential prerequisites: hardware, software, the complete installation process, and configuration guides after installation, followed by best practices to put in place around keeping healthy, almost for maintaining your ERPNext instance. And now, at the end of this guide, the case could be where you&#8217;re left with a fully functional ERPNext system, ready to partner with the business in getting some work done behind it. Give it a try. Let&#8217;s start wiring it up to get to the core of ERPNext on Ubuntu.<\/p>\n<h3><b>Requirements:<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">To ensure a smooth installation and optimal performance of ERPNext on Ubuntu, you need to meet specific operating system, hardware, and software requirements. Below is a breakdown of these prerequisites.<\/span><\/p>\n<h3><b>Operating System<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">ERPNext is compatible with Ubuntu, and for this guide, we recommend using <\/span><b>Ubuntu 20.04 LTS<\/b><span style=\"font-weight: 400;\"> or <\/span><b>Ubuntu 22.04 LTS<\/b><span style=\"font-weight: 400;\">. These Long-Term Support versions offer stability, security updates, and compatibility with ERPNext\u2019s dependencies. Ensure your Ubuntu installation is up-to-date with the latest patches and security updates before proceeding.<\/span><\/p>\n<h3><b>Hardware<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The hardware requirements for ERPNext depend on the size of your organization and the expected workload. Below are the minimum and recommended specifications:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Minimum Requirements<\/b><span style=\"font-weight: 400;\">:<\/span>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>CPU<\/b><span style=\"font-weight: 400;\">: 2-core processor (e.g., Intel Xeon or AMD equivalent)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>RAM<\/b><span style=\"font-weight: 400;\">: 4 GB<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>Storage<\/b><span style=\"font-weight: 400;\">: 40 GB SSD (for OS, ERPNext, and database)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>Network<\/b><span style=\"font-weight: 400;\">: Stable internet connection with at least 10 Mbps bandwidth<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><b>Pre-Installation Tips<\/b><\/h3>\n<p>If you are planning to use ERPNext on Ubuntu, make sure you use the following tips during the booting phase. Below are some quick preparation tips that could come in handy while installing ERPNext to avoid mistakes for your Ubuntu server:<\/p>\n<ol>\n<li><strong>Update the System:<\/strong> Run sudo apt update &amp;&amp; sudo apt upgrade -y to ensure all packages are up-to-date.<\/li>\n<li><strong>Setup a Non-Root User:<\/strong> Create a user with sudo privileges for security. This avoids the root account being used to do the installation.<\/li>\n<li><strong>Configure Firewall:<\/strong> Use ufw to allow ports 80 (HTTP), 443 (HTTPS), and 22 (SSH). For example, sudo ufw allow 80,443,22\/tcp.<\/li>\n<li><strong>Free Disk Space:<\/strong> Check around your server to make sure there is enough free disk space for ERPNext and its database, and for any data growth that will occur later.<\/li>\n<li><strong>Backup Important Data:<\/strong> Back up important data if this server is providing other applications in order to avoid unintentional data loss.<\/li>\n<li><strong>A Stable Connection:<\/strong> Connected to a reliable network for downloading packages and dependencies without interruption.<\/li>\n<li><strong>Choose a Domain (optional):<\/strong> If you&#8217;re going to access ERPNext using a domain, then make these changes in advance in the DNS settings.<\/li>\n<li><strong>Choose a Hosting Provider:<\/strong> Going for a hosting provider like DedicatedCore to have optimized servers with SSD storage and scalable resources will ensure ERPNext runs smoothly.<\/li>\n<\/ol>\n<p>With the requirements and tips mentioned above, a good groundwork for the installation of ERPNext is laid. Thereafter, the sections include the detailed procedure for installing, configuring, and optimizing your ERP system.<\/p>\n<h3><b>Why Is It Necessary to Install ERPNext?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Installing ERPNext on an Ubuntu server is essential for businesses aiming to centralize and optimize their operations. ERPNext integrates critical functions like accounting, inventory, sales, HR, and project management into a single platform, reducing manual processes and improving efficiency. Its open-source nature eliminates costly licensing fees, making it accessible for businesses of all sizes. By hosting ERPNext on a reliable Ubuntu server, such as those offered by DedicatedCore, you ensure scalability, security, and performance, enabling real-time data access and streamlined workflows. This setup empowers organizations to make informed decisions, enhance productivity, and adapt to growth seamlessly.<\/span><\/p>\n<h2>Steps and Process<\/h2>\n<p><span style=\"font-weight: 400;\">The installation of ERPNext on Ubuntu involves setting up the server, installing dependencies, configuring the environment, and deploying ERPNext using the Frappe Bench tool. Below is a concise step-by-step guide to get ERPNext up and running.<\/span><\/p>\n<h3>Step 1: Connect to Your Server<\/h3>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Access your Ubuntu server via SSH using a terminal or SSH client:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">ssh username@your_server_ip<\/pre>\n<p><span style=\"font-weight: 400;\">Replace username with your non-root user and your_server_ip with your server\u2019s IP address.<\/span><\/p>\n<ol start=\"2\">\n<li><span style=\"font-weight: 400;\"> Ensure you have sudo privileges for the installation process.<\/span><\/li>\n<\/ol>\n<h3>Step 2: Update the System<\/h3>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Update the package list and upgrade installed packages:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo apt update &amp;&amp; sudo apt upgrade -y<\/pre>\n<ol start=\"2\">\n<li><span style=\"font-weight: 400;\"> Reboot the server if necessary:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo reboot<\/pre>\n<h3>Step 3: Install Required Dependencies<\/h3>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Install essential packages for ERPNext:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo apt install -y python3-dev python3-pip python3-venv git curl software-properties-common mariadb-server mariadb-client redis-server nginx<\/pre>\n<ol start=\"2\">\n<li><span style=\"font-weight: 400;\"> Install Node.js (version 16.x):<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">curl -sL https:\/\/deb.nodesource.com\/setup_16.x | sudo -E bash -\r\n\r\nsudo apt install -y nodejs<\/pre>\n<ol start=\"3\">\n<li><span style=\"font-weight: 400;\"> Install wkhtmltopdf for PDF generation:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo apt install -y wkhtmltopdf<\/pre>\n<h3>Step 4: Configure MariaDB<\/h3>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Secure the MariaDB installation:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo mysql_secure_installation<\/pre>\n<p><span style=\"font-weight: 400;\">Follow the prompts to set a root password, remove anonymous users, and disable remote root login.<\/span><\/p>\n<ol start=\"2\">\n<li><span style=\"font-weight: 400;\"> Configure MariaDB for ERPNext by editing \/etc\/mysql\/my.cnf:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo nano \/etc\/mysql\/my.cnf<\/pre>\n<ol start=\"3\">\n<li><span style=\"font-weight: 400;\"> Add the following under the [mysqld] section:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[mysqld]\r\n\r\ncharacter-set-client-handshake = FALSE\r\n\r\ncharacter-set-server = utf8mb4\r\n\r\ncollation-server = utf8mb4_unicode_ci<\/pre>\n<ol start=\"4\">\n<li><span style=\"font-weight: 400;\"> Restart MariaDB:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo systemctl restart mariadb<\/pre>\n<h3>Step 5: Install Frappe Bench<\/h3>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Create a new user for ERPNext to enhance security:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo adduser --disabled-password --home \/home\/frappe frappe\r\n\r\nsudo usermod -aG sudo frappe<\/pre>\n<ol start=\"2\">\n<li><span style=\"font-weight: 400;\"> Switch to the frappe user:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">su - frappe<\/pre>\n<ol start=\"3\">\n<li><span style=\"font-weight: 400;\"> Install Bench:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">pip3 install --user frappe-bench<\/pre>\n<ol start=\"4\">\n<li><span style=\"font-weight: 400;\"> Add Bench to the PATH:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">echo 'export PATH=$PATH:~\/.local\/bin' &gt;&gt; ~\/.bashrc\r\n\r\nsource ~\/.bashrc<\/pre>\n<h3>Step 6: Initialize Bench and Install ERPNext<\/h3>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Initialize a new Bench directory:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">bench init frappe-bench\r\n\r\ncd frappe-bench<\/pre>\n<ol start=\"2\">\n<li><span style=\"font-weight: 400;\"> Set up a new ERPNext site:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">bench new-site site1.local --db-root-username root --db-root-password your_mysql_root_password<\/pre>\n<p><span style=\"font-weight: 400;\">Replace your_mysql_root_password with the MariaDB root password.<\/span><\/p>\n<ol start=\"3\">\n<li><span style=\"font-weight: 400;\"> Install the ERPNext app:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">bench get-app erpnext\r\n\r\nbench --site site1.local install-app erpnext<\/pre>\n<h3><span style=\"font-weight: 400;\">Step 7: Configure Nginx and Supervisor<\/span><\/h3>\n<ol>\n<li><span style=\"font-weight: 400;\"> Set up production mode for ERPNext:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo bench setup production frappe<\/pre>\n<p><span style=\"font-weight: 400;\">This configures Nginx and Supervisor for ERPNext.<\/span><\/p>\n<ol start=\"2\">\n<li><span style=\"font-weight: 400;\"> Enable and start Nginx:<\/span><\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo systemctl enable nginx\r\n\r\nsudo systemctl start nginx<\/pre>\n<h3><b>Step 8: Access ERPNext<\/b><\/h3>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Open a web browser and navigate to http:\/\/your_server_ip or your domain if configured.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Log in with the default credentials:<\/span>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>Username<\/b><span style=\"font-weight: 400;\">: Administrator<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>Password<\/b><span style=\"font-weight: 400;\">: The password set during site creation (check the frappe-bench\/sites\/site1.local\/site_config.json file if needed).<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Complete the setup wizard to configure your organization\u2019s details.<\/span><\/li>\n<\/ol>\n<h3><b>Step 9: Verify Installation<\/b><\/h3>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Ensure all ERPNext modules (e.g., Accounts, Inventory, HR) are accessible.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Test basic functionalities like creating a new user or adding a sales order.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Monitor server performance to confirm resource usage is within expected limits.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">By following these steps, you\u2019ll have a fully functional ERPNext instance running on your Ubuntu server. Hosting on a robust platform like DedicatedCore ensures your ERPNext setup benefits from high-speed SSD storage and scalable resources, minimizing downtime and maximizing efficiency.<\/span><\/p>\n<h3><b>Frequently Asked Questions (FAQs)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Below are three technical FAQs related to installing and managing ERPNext on Ubuntu, designed to address common concerns and provide clarity for users.<\/span><\/p>\n<p><b>1. How can I optimize MariaDB performance for ERPNext on Ubuntu?<\/b><\/p>\n<p><span style=\"font-weight: 400;\">To optimize MariaDB for ERPNext, adjust the my.cnf configuration to allocate appropriate memory and caching based on your server\u2019s resources. For instance, set innodb_buffer_pool_size to 50-70% of your RAM for better query performance. Additionally, ensure regular database maintenance, such as optimizing tables and indexing, to maintain efficiency as your ERPNext data grows.<\/span><\/p>\n<p><b>2. What should I do if I encounter a &#8220;Bench command not found&#8221; error after installation?<\/b><\/p>\n<p><span style=\"font-weight: 400;\">This error typically occurs if the Bench executable is not in your system\u2019s PATH. To resolve it, verify that you\u2019ve added export PATH=$PATH:~\/.local\/bin to your ~\/.bashrc file and sourced it using source ~\/.bashrc. If the issue persists, reinstall Bench using pip3 install &#8211;user frappe-bench as the frappe user and confirm the installation path.<\/span><\/p>\n<p><b>3. How do I secure my ERPNext instance on Ubuntu to prevent unauthorized access?<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Securing ERPNext involves enabling HTTPS with an SSL certificate (e.g., using Let\u2019s Encrypt), configuring a strong firewall with ufw to allow only necessary ports (80, 443, 22), and regularly updating ERPNext and its dependencies. Additionally, use strong passwords for the MariaDB root user and ERPNext Administrator account, and restrict SSH access to specific IP addresses for enhanced security.<\/span><\/p>\n<h3>Resources<\/h3>\n<p>In furtherance, to aid one another in installing, managing, and optimizing ERPNext in Ubuntu, below set forth is an assemblage of reliable external resources. These references give some further assistance with troubleshooting and community support for ERPNext deployment.<\/p>\n<p><strong>1. The official ERPNext Documentation<\/strong><\/p>\n<p>ERPNext documentation itself installs and configures too many modules, even customizing them. It compels the understanding of everything that the platform knows and goes a long way in troubleshooting the same.<\/p>\n<p>URL: https:\/\/docs.erpnext.com<\/p>\n<p><strong>2. Frappe Framework Documentation<\/strong><\/p>\n<p>The documentation of the Frappe Framework is relevant as ERPNext runs on this framework. It mainly contains all the technical details of the Bench commands, site management, and advanced configurations, significantly appealing to developers and system administrators.<\/p>\n<p>URL: https:\/\/frappeframework.com\/docs<\/p>\n<p><strong>3. Documentation of Ubuntu Server<\/strong><\/p>\n<p>Canonical describes in its documentation the server setup, security, and package management, which constitute those important aspects necessary for maintaining a stable ERPNext environment.<\/p>\n<p>URL: https:\/\/ubuntu.com\/server\/docs<\/p>\n<p><strong>4. DedicatedCore Hosting Solutions<\/strong><\/p>\n<p>DedicatedCore brings high-performance VPS and dedicated server hosting solutions with SSD storage for ERPNext hosting. Their support team assists with server optimization, especially for ERP applications.<\/p>\n<p>URL: https:\/\/www.dedicatedcore.com<\/p>\n<h4>Final Words on the Installation of ERPNext on Ubuntu<\/h4>\n<p>Installing ERPNext on an Ubuntu server is an intelligent choice by an organization wanting to streamline its processes and future-proof itself. This document has taken you through the entire process of realizing the importance of ERPNext in any industry with a proper, secure, and efficient installation.<\/p>\n<p>Using the dedicated hosting offered at DedicatedCore will ensure your instance of ERPNext works with optimal performance and scalability. Start your ERPNext journey today and become certified, unleashing the potential of integrated business management.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To integrate and rationalize processes into unified movements, businesses rely on ERP systems nowadays, even ERPNext-Innovative, compared to open-source ERP software-possesses flexibility, affordability, and overall&#8230;<\/p>\n","protected":false},"author":1,"featured_media":2771,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.dedicatedcore.com\/blog\/wp-json\/wp\/v2\/posts\/2751"}],"collection":[{"href":"https:\/\/www.dedicatedcore.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dedicatedcore.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dedicatedcore.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dedicatedcore.com\/blog\/wp-json\/wp\/v2\/comments?post=2751"}],"version-history":[{"count":6,"href":"https:\/\/www.dedicatedcore.com\/blog\/wp-json\/wp\/v2\/posts\/2751\/revisions"}],"predecessor-version":[{"id":2769,"href":"https:\/\/www.dedicatedcore.com\/blog\/wp-json\/wp\/v2\/posts\/2751\/revisions\/2769"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dedicatedcore.com\/blog\/wp-json\/wp\/v2\/media\/2771"}],"wp:attachment":[{"href":"https:\/\/www.dedicatedcore.com\/blog\/wp-json\/wp\/v2\/media?parent=2751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dedicatedcore.com\/blog\/wp-json\/wp\/v2\/categories?post=2751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dedicatedcore.com\/blog\/wp-json\/wp\/v2\/tags?post=2751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}