ERPNext Open Source ERP: Installation Guide for Accounting and Inventory

6月19日 Published inEnterprise Services

ERPNext is a free, open-source ERP system that centralizes accounting, inventory, manufacturing, assets, and projects into a single platform. It eliminates license fees and prevents vendor lock-in, offering a transparent alternative to proprietary software.

Accounting. Track every transaction with precision. Generate profit and loss statements that clearly outline revenue, expenses, and net income, allowing you to maintain full visibility over your cash flow.

Order Management. Monitor stock levels in real time and automate inventory replenishment. Manage sales orders, customers, suppliers, and shipments without the need for fragmented spreadsheets.

Manufacturing. Streamline production cycles by tracking material consumption and planning capacity. The system also handles subcontracting and shop floor optimization to improve operational efficiency.

Asset Management. Oversee the entire lifecycle of your assets, from initial purchase to final disposal. Whether managing IT hardware or heavy machinery, everything is logged in one place.

Project Management. Deliver both internal and external projects on time and within budget. Track specific tasks, employee timesheets, and support issues per project while monitoring real-time profitability.

The Frappe Framework

ERPNext is built on Frappe, a full-stack web framework developed in Python and JavaScript. It provides a robust foundation by handling database abstraction, user authentication, and REST APIs out of the box.

Frappe UI. This is a Vue-based component library that provides a modern, clean interface designed specifically for single-page applications.

Deployment Options

Frappe Cloud

Frappe Cloud is the managed hosting option. It takes care of installation, initial setup, version upgrades, monitoring, and general maintenance, making it an ideal choice for teams that prefer a hands-off approach.

Self-Hosted

Docker Deployment
Prerequisites: Docker, Docker Compose, and Git.

Execute the following commands to stand up the stack:

git clone https://github.com/frappe/frappe_docker
cd frappe_docker
docker compose -f pwd.yml up -d

Once the containers are running, open your browser to http://localhost:8080. The default credentials are Username: Administrator / Password: admin.

Development Environment
For a manual development setup, use the "bench" script. This utility manages dependencies like MariaDB and handles the application lifecycle.

# Start the bench server
bench start

# Create a new site
bench new-site erpnext.localhost

# Download and install the ERPNext application
bench get-app https://github.com/frappe/erpnext
bench --site erpnext.localhost install-app erpnext

Access your development environment at http://erpnext.localhost:8000/app.

Installation Details

System Requirements

  • OS: macOS, Debian/Ubuntu, or Windows via WSL.
  • Software: MariaDB 10.6.6+ (11.3 recommended for development), Python 3.10+, Node 18+, Redis 6, yarn 1.12+, pip 20+, wkhtmltopdf 0.12.5+, and cron.

macOS Installation Steps

  1. Install Xcode command line tools: xcode-select --install
  2. Install Homebrew.
  3. Download and install the wkhtmltopdf package manually.
  4. Install system dependencies: brew install [email protected] git redis [email protected] node@18 postgresql pkg-config mariadb-connector-c
  5. MariaDB Configuration (Required for Frappe versions older than v15.21.0): Edit your my.cnf file to set the character set to utf8mb4.
  6. Restart the database service: brew services restart [email protected]
  7. Install yarn globally: npm install -g yarn

Debian/Ubuntu Installation Steps

  1. Update your system: sudo apt update
  2. Install necessary packages: sudo apt install git python-is-python3 python3-dev python3-pip redis-server libmariadb-dev mariadb-server mariadb-client pkg-config
  3. Secure your database: mariadb-secure-installation
  4. Edit /etc/mysql/my.cnf to configure utf8mb4 (not required for v15.21.0+).
  5. Restart the service: sudo systemctl restart mariadb
  6. Install Node.js via nvm, then install yarn: npm install -g yarn
  7. Install the wkhtmltopdf .deb package.

Installing the Bench CLI

  • Use pip to install the utility: pip install frappe-bench (or pip3 depending on your environment).
  • If you encounter PATH issues, ensure the bin directory is added to your shell profile.
  • On systems with package management restrictions, use: pip install frappe-bench --break-system-packages
  • Initialize your bench environment: bench init <directory_name>