ERPNext is a comprehensive open-source Enterprise Resource Planning (ERP) system that helps businesses streamline their operations, manage accounting, HR, manufacturing, and more from a single platform. Installing ERPNext on Ubuntu 24.04 allows you to set up a robust, scalable, and customizable ERP system on a Linux server, ideal for small to medium-sized enterprises or developers wanting to experiment with ERPNext. Before starting, ensure your server meets the minimum requirements, has a clean Ubuntu 24.04 installation, and that you have root or sudo access.
What You’ll Need
- Ubuntu 24.04 server or desktop with a clean installation
- Root or sudo privileges
- At least 8 GB RAM (16 GB recommended for production)
- Minimum 50 GB disk space
- Domain name (optional but recommended)
- Basic knowledge of Linux terminal commands
- Internet connection with stable bandwidth
Step-by-Step
- Update your system packages: Open a terminal and run:
sudo apt update && sudo apt upgrade -yThis ensures all existing packages are up to date, reducing compatibility issues later.
- Install required dependencies: Install essential packages with:
sudo apt install -y git python3-pip python3-venv nodejs npm redis-server curlThis installs Git for cloning repositories, Python dependencies, Node.js for front-end assets, Redis for caching, and curl for downloading files.
- Set up Python environment: Create a dedicated user for ERPNext (recommended for security):
sudo adduser erpnext --gecos "ERPNext User" --disabled-passwordSwitch to the new user:
sudo -i -u erpnext - Clone the ERPNext bench repository: As the erpnext user, run:
git clone https://github.com/frappe/bench.git ~/bench-repo cd ~/bench-repoThis repository contains the tools needed to manage ERPNext instances.
- Install Bench CLI: Still as the erpnext user, run:
pip3 install --user --upgrade pip pip3 install --user benchAdd ~/.local/bin to your PATH if needed:
export PATH=$PATH:~/.local/bin - Create a new bench instance: Initialize a new ERPNext site with:
bench init frappe-bench --frappe-branch version-13Replace ‘version-13’ with the desired ERPNext version. Navigate into the directory:
cd frappe-bench - Create a new site and install ERPNext: Run:
bench new-site yourdomain.comFollow prompts to set administrator password and database credentials. Then, install ERPNext app:
bench get-app erpnext --branch version-13 bench --site yourdomain.com install-app erpnext - Set up a production environment: Install supervisor and nginx:
sudo apt install -y supervisor nginxConfigure supervisor to manage ERPNext workers and set up nginx as a reverse proxy for access via your domain.
- Start ERPNext services: Run:
bench setup production yourdomain.com sudo supervisorctl reread sudo supervisorctl update sudo supervisorctl restart allThis will launch ERPNext in a production-ready environment accessible via your domain or server IP.
- Access your ERPNext instance: Open a browser and navigate to http://yourdomain.com or your server IP. Log in with the administrator credentials you set earlier.
Common Mistakes
- Failing to update system packages before starting, leading to dependency issues.
- Not creating a dedicated user, which can cause permission problems or security risks.
- Using incompatible ERPNext or Frappe branches; always verify branch compatibility.
- Skipping the setup of nginx or supervisor, resulting in ERPNext not running properly or being inaccessible.
- Not configuring DNS or SSL for production, which can compromise security and accessibility.
Tips
- Always back up your data before performing major updates or migrations.
- Use a domain name and SSL certificate (via Let’s Encrypt) for production to ensure secure access.
- Monitor server resources and logs regularly to troubleshoot performance issues.
- Document your setup process for easier maintenance and future upgrades.
- Join ERPNext community forums for support and best practices.
Troubleshooting
If ERPNext does not start or behaves unexpectedly, consider the following steps:
- Check logs: Review logs located in
~/frappe-bench/logsfor errors related to supervisor, nginx, or ERPNext itself. - Verify services: Ensure all ERPNext services are running:
sudo supervisorctl status - Rebuild assets: Sometimes, clearing and rebuilding assets helps:
bench build - Restart services: Restart the bench services:
bench restart - Check domain and DNS: Make sure your domain points correctly to your server IP and that SSL certificates are valid if used.
- Update ERPNext: Run:
bench update --upgradeto get the latest fixes and features.
If problems persist, consult the ERPNext community forums or official documentation for specific issues.
Frequently Asked Questions
1. Can I install ERPNext on a desktop Ubuntu 24.04 or only on servers?
While technically possible on a desktop, it’s recommended to install on a dedicated server environment for better stability, security, and performance.
2. Is ERPNext installation on Ubuntu 24.04 secure?
Security depends on proper configuration, including setting up firewalls, SSL certificates, and regular updates. Follow best security practices during setup.
3. How do I update ERPNext after installation?
Navigate to your bench directory and run bench update --upgrade. Always back up before upgrading.
4. Can I run multiple ERPNext sites on one server?
Yes, using bench, you can create multiple sites with separate configurations, but ensure your server has adequate resources.
5. What are common post-installation issues?
Common issues include service startup failures, DNS or SSL misconfigurations, and permission errors. Logs are your best troubleshooting tool.
Related
- How to Clear Cache on iPhone 13 for Better Performance
- How to Clear Cache on iPhone 12 for Better Performance
- How to Clear Cache in Microsoft Edge for Better Browsing