FedoraRHEL Based

How To Install ERPNext on Fedora 42

Install ERPNext on Fedora 42

ERPNext stands as one of the most powerful open-source Enterprise Resource Planning (ERP) systems available today, offering comprehensive business management solutions for organizations of all sizes. Built on the robust Frappe Framework, this web-based application delivers modules for financial accounting, inventory management, customer relationship management, human resources, project management, and e-commerce functionalities. Installing ERPNext on Fedora 42 provides businesses with a stable, secure, and cutting-edge platform that leverages the latest packages and security updates from the Fedora ecosystem. This comprehensive guide walks through every step of the installation process, from initial server configuration to production deployment, ensuring you can successfully deploy ERPNext on your Fedora 42 server.

Understanding ERPNext and Frappe Framework

ERPNext provides an integrated business management platform designed specifically for small and medium-sized enterprises. The software eliminates the need for multiple disconnected applications by centralizing all business operations into a single, unified system. At its core lies the Frappe Framework, a full-stack web application framework written in Python and JavaScript that powers ERPNext and numerous other applications.

The Frappe Bench CLI tool serves as the command-line interface for managing Frappe applications, sites, and deployments. This powerful utility handles everything from installation and updates to backup and migration tasks. The framework architecture separates the frontend (Frappe Desk) from backend logic, creating a flexible and extensible platform. ERPNext Version 15 represents the current stable release, bringing enhanced features, improved performance, and better user experience compared to previous versions.

Organizations ranging from small startups to mid-sized enterprises leverage ERPNext to streamline operations, reduce costs, and improve data visibility. The open-source GNU General Public License ensures freedom to modify and distribute the software while benefiting from an active global community of developers and users.

Prerequisites and System Requirements

Hardware Requirements

Proper hardware allocation ensures optimal ERPNext performance. The minimum specifications include 2GB RAM, 20GB disk space, and a 2GHz dual-core processor. However, production environments demand more robust resources. Recommended specifications include 4GB RAM, 40GB disk space, and a 2GHz quad-core processor or better.

Development environments can operate on minimal resources, but production deployments serving multiple concurrent users require additional memory and processing power. Organizations should scale hardware based on expected user count, with an additional 1GB RAM for every 10-15 concurrent users. Storage requirements increase proportionally with business data volume, transaction frequency, and document attachments.

Software Requirements

A fresh installation of Fedora 42 Server provides the foundation for ERPNext deployment. Root or sudo access remains essential for installing packages and configuring system services. An active internet connection facilitates package downloads from Fedora repositories and GitHub. Production deployments benefit from a registered domain name or subdomain pointing to the server’s IP address.

Basic Linux command-line knowledge helps troubleshoot issues and customize configurations. The installation process requires Python 3.10 or higher, Node.js 18.x, MariaDB 10.3 or later, Redis server, Nginx web server, Supervisor process manager, Git version control, and various development libraries.

Step 1: Initial Server Setup and Configuration

Update System Packages

Begin by updating all system packages to their latest versions. Connect to your Fedora 42 server via SSH and execute the following commands:

sudo dnf update -y
sudo dnf upgrade -y

The DNF package manager downloads and installs available updates. If kernel updates are applied, reboot the server to load the new kernel version.

Set Correct Timezone

Accurate timezone configuration ensures proper scheduling of background jobs and cron tasks. Check the current server timezone:

date
timedatectl

Set your regional timezone using the timedatectl command:

sudo timedatectl set-timezone "Asia/Jakarta"

Replace “Asia/Jakarta” with your appropriate timezone identifier. Verify the change by running the date command again.

Configure SELinux

Security-Enhanced Linux (SELinux) provides mandatory access control security mechanisms. However, it can interfere with Nginx and ERPNext operations. Two options exist: disable SELinux or configure appropriate security contexts. For simplified installation, many administrators choose to disable it.

Edit the SELinux configuration file:

sudo nano /etc/sysconfig/selinux

Change SELINUX=enforcing to SELINUX=disabled. Save the file and exit. This change takes effect after the next reboot.

Configure Firewall

Open required ports through the firewall to allow external access to ERPNext services:

sudo firewall-cmd --permanent --add-port=22/tcp
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=443/tcp
sudo firewall-cmd --permanent --add-port=8000/tcp
sudo firewall-cmd --reload

Port 22 handles SSH connections, ports 80 and 443 serve HTTP and HTTPS traffic, and port 8000 provides development server access.

Create Dedicated System User

Creating a dedicated user improves security by isolating ERPNext processes from the root account:

sudo useradd -m -d /home/erpnext erpnext
sudo usermod -aG wheel erpnext
sudo passwd erpnext

Set a strong password when prompted. Reboot the system to apply SELinux changes, then switch to the new user:

su - erpnext

Step 2: Install Required Dependencies

Install Development Tools and Libraries

ERPNext requires numerous development packages and libraries. Install essential build tools and dependencies:

sudo dnf groupinstall "Development Tools" -y
sudo dnf install git python3-devel python3-pip gcc make openssl-devel libffi-devel zlib-devel bzip2-devel xz-devel -y

Install wkhtmltopdf for PDF generation capabilities:

sudo dnf install wkhtmltopdf -y

These packages provide the compilation tools and libraries necessary for building Python packages and Frappe dependencies.

Install and Configure Python

Fedora 42 ships with Python 3.10 or higher by default. Verify the Python version:

python3 --version

Upgrade pip to the latest version and install additional Python packages:

sudo pip3 install --upgrade pip
sudo dnf install python3-venv python3-testresources -y

The python3-venv package enables virtual environment creation, which Frappe Bench uses to isolate application dependencies.

Install Node.js and Package Managers

Install Node Version Manager (NVM) to manage Node.js installations:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
source ~/.bashrc

Use NVM to install Node.js version 18:

nvm install 18
nvm use 18

Verify the installation and install Yarn package manager globally:

node --version
npm --version
sudo npm install -g yarn

Node.js powers the frontend build process while Yarn manages JavaScript dependencies efficiently.

Step 3: Install and Configure MariaDB Database

Install MariaDB Server

MariaDB serves as the relational database management system for ERPNext:

sudo dnf install mariadb-server -y

Start and enable the MariaDB service:

sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo systemctl status mariadb

The status command confirms the service is running correctly.

Secure MariaDB Installation

Run the security script to harden the MariaDB installation:

sudo mysql_secure_installation

Respond to the prompts: set a root password, remove anonymous users, disable remote root login, remove the test database, and reload privilege tables. These steps significantly improve database security.

Configure MariaDB for ERPNext

ERPNext requires specific MariaDB settings for optimal performance. Create a custom configuration file:

sudo nano /etc/my.cnf.d/erpnext.cnf

Add the following configuration:

[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4

Restart MariaDB to apply the changes:

sudo systemctl restart mariadb

This configuration ensures proper UTF-8 character encoding support for international characters and emojis.

Create ERPNext Database and User

While the Frappe Bench handles database creation automatically, understanding manual database setup proves valuable for troubleshooting. The bench initialization process creates necessary databases and users during site creation.

Step 4: Install and Configure Redis Server

Redis provides in-memory caching and message brokering for ERPNext background jobs and real-time features. Install Redis:

sudo dnf install redis -y

Start and enable the Redis service:

sudo systemctl start redis
sudo systemctl enable redis
sudo systemctl status redis

Test Redis connectivity:

redis-cli ping

A “PONG” response confirms successful installation and operation.

Step 5: Install Nginx Web Server

Nginx acts as a reverse proxy server, handling incoming HTTP requests and forwarding them to the ERPNext application:

sudo dnf install nginx -y

Start and enable Nginx:

sudo systemctl start nginx
sudo systemctl enable nginx

Access your server’s IP address in a web browser to verify Nginx installation. The default Nginx welcome page should appear.

Step 6: Install Supervisor Process Manager

Supervisor manages ERPNext background processes, ensuring they restart automatically if they crash:

sudo dnf install supervisor -y

Start and enable Supervisor:

sudo systemctl start supervisord
sudo systemctl enable supervisord

Frappe Bench automatically generates Supervisor configuration files during production setup.

Step 7: Install Frappe Bench

Install Bench CLI

Switch to the erpnext user and install Frappe Bench using pip3:

pip3 install --user frappe-bench

Add the local binary path to your PATH environment variable:

nano ~/.bashrc

Add this line at the end of the file:

export PATH=$PATH:~/.local/bin

Activate the environment variable:

source ~/.bashrc

Verify bench installation:

bench --version

Initialize Frappe Bench

Create a directory for the bench installation and initialize it:

cd ~
bench init frappe-bench --frappe-branch version-15

This command downloads the Frappe Framework, sets up a Python virtual environment, installs dependencies, and initializes the bench directory structure. The process takes several minutes depending on internet speed and server performance.

Upon completion, the frappe-bench directory contains apps, sites, config, env, and logs subdirectories. The virtual environment isolates Frappe and ERPNext dependencies from system-wide Python packages.

Step 8: Create a New Site

Navigate to the frappe-bench directory:

cd ~/frappe-bench

Create a new ERPNext site using your domain name or localhost for testing:

bench new-site site1.local

For production with a domain name:

bench new-site erpnext.yourdomain.com

The command prompts for the MariaDB root password and administrator password for ERPNext. The site creation process initializes a new database, installs the Frappe application, and configures the site directory.

Set the newly created site as the default:

bench use site1.local

This command eliminates the need to specify the site name in subsequent bench commands.

Step 9: Download and Install ERPNext Application

Get Required Applications

ERPNext requires the payments app as a dependency. Download it from the official repository:

bench get-app payments
bench get-app --branch version-15 erpnext

These commands clone the applications from GitHub into the apps directory. The version-15 branch ensures compatibility across all components.

Install Applications to Site

Install ERPNext and payments on your site:

bench --site site1.local install-app payments
bench --site site1.local install-app erpnext

The installation process migrates database schemas, installs DocTypes, and configures the applications. This takes several minutes as ERPNext contains numerous modules and components.

Verify installed applications:

bench version

This displays all installed apps and their respective versions.

Step 10: Development Server Testing

Test the installation using the development server:

bench start

This command launches multiple processes including web server, socketio, schedule, and worker processes. Open a web browser and navigate to:

http://your-server-ip:8000

The ERPNext login page appears if installation succeeded. Log in using “Administrator” as the username and the password set during site creation.

The setup wizard guides you through initial configuration: select language, country, timezone, currency, company name, and chart of accounts. Complete the wizard to access the ERPNext dashboard.

Press Ctrl+C in the terminal to stop the development server.

Step 11: Setup Production Environment

Enable Scheduler and Configure Site

Enable the scheduler for automated background tasks:

bench --site site1.local scheduler enable
bench --site site1.local set-maintenance-mode off

The scheduler executes cron jobs for email notifications, report generation, and data synchronization.

Setup Production Configuration

Configure ERPNext for production deployment:

sudo bench setup production erpnext

Replace “erpnext” with your actual system username. This command generates Nginx and Supervisor configuration files, sets proper permissions, and restarts services. Respond “yes” when prompted to replace existing configuration files.

The production setup configures Nginx as a reverse proxy on port 80, eliminating the need to specify port 8000. Supervisor manages Frappe processes, automatically restarting them if they fail.

Restart Services

Restart all services to apply production configurations:

sudo supervisorctl restart all
sudo systemctl restart nginx

Access ERPNext through your browser using the server IP or domain name:

http://your-server-ip

The ERPNext interface loads without specifying a port number.

Install ERPNext on Fedora 42

Step 12: Configure SSL/HTTPS (Optional)

HTTPS encryption protects sensitive business data transmitted between users and the server. Install Certbot for Let’s Encrypt certificates:

sudo dnf install certbot python3-certbot-nginx -y

Obtain and install an SSL certificate:

sudo bench setup lets-encrypt site1.local

Or use Certbot directly:

sudo certbot --nginx -d erpnext.yourdomain.com

Follow the prompts to configure HTTPS redirection. Certbot automatically renews certificates before expiration through a systemd timer. Verify automatic renewal:

sudo certbot renew --dry-run

Access ERPNext securely via HTTPS:

https://erpnext.yourdomain.com

Post-Installation Configuration

Access system settings to configure email integration for notifications and communication. Navigate to Settings > Email Domain and add your SMTP server details. Configure email accounts for sales, support, and HR departments to enable automated email workflows.

Set up print settings and letterhead under Settings > Print Settings. Upload your company logo and customize print formats for invoices, quotations, and delivery notes. Configure users and assign roles through User and Role List, implementing the principle of least privilege.

Establish a backup strategy using bench commands:

bench --site site1.local backup

This creates database and file backups in the sites/site1.local/private/backups directory. Schedule automated backups using cron jobs and transfer them to remote storage for disaster recovery.

Common Troubleshooting Tips

Permission denied errors often stem from incorrect ownership. Ensure the erpnext user owns all files in the frappe-bench directory:

sudo chown -R erpnext:erpnext ~/frappe-bench

Database connection issues typically indicate incorrect MariaDB credentials or service failures. Verify MariaDB is running and check site_config.json for correct database settings.

Port conflicts occur when another service occupies ports 80, 443, or 8000. Identify conflicting processes using:

sudo netstat -tulpn | grep :80

Node.js version incompatibility causes build failures. Always use Node.js 18.x as specified in the requirements. Redis connection errors suggest the Redis service is stopped. Restart it using systemctl.

Nginx configuration errors prevent the web server from starting. Test configuration syntax:

sudo nginx -t

Check log files for detailed error information: ~/frappe-bench/logs/bench-start.log for application logs and /var/log/nginx/error.log for Nginx errors.

Security Best Practices

Regular system updates protect against vulnerabilities. Schedule weekly updates:

sudo dnf update -y

Update ERPNext and Frappe periodically:

cd ~/frappe-bench
bench update

Implement strong password policies requiring minimum length, complexity, and regular rotation. Disable root SSH login by editing /etc/ssh/sshd_config and setting PermitRootLogin to no. Use SSH key authentication instead of passwords.

Install and configure fail2ban to prevent brute force attacks:

sudo dnf install fail2ban -y
sudo systemctl enable fail2ban
sudo systemctl start fail2ban

Restrict MariaDB access to localhost only by binding to 127.0.0.1 in the configuration file. Enable two-factor authentication in ERPNext for administrator and privileged accounts under User settings.

Maintenance and Updates

The bench update command refreshes Frappe, ERPNext, and all installed applications:

cd ~/frappe-bench
bench update

This command pulls the latest changes from GitHub, updates Python and JavaScript dependencies, runs database migrations, and builds assets. Always create backups before updating.

For major version upgrades, consult the official ERPNext migration guide. Test updates in a development environment before applying them to production. Monitor the update process for errors and check application functionality afterward.

Subscribe to the Frappe forum and ERPNext release notes to stay informed about new features, bug fixes, and security patches. The community provides valuable assistance for troubleshooting and customization questions.

Congratulations! You have successfully installed ERPNext. Thanks for using this tutorial for installing ERPNext on Fedora 42 Linux system. For additional help or useful information, we recommend you check the official ERPNext website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button