...
🚀 deploy erpnext on ubuntu vps
Learn how to deploy erpnext on ubuntu vps!

This article provides a guide demonstrating how to deploy ERPNext on Ubuntu VPS.

This guide uses Ubuntu 24.04 LTS, ERPNext v15, Frappe Bench, MariaDB, Redis, Supervisor, Nginx, and Let’s Encrypt SSL. Frappe’s production docs identify Bench as the CLI used to manage Frappe/ERPNext deployments and show the standard production flow: install Bench, create a site, get the ERPNext app, install it, check Supervisor, and update with bench update.

What is ERPNext?

ERPNext is a free, open-source Enterprise Resource Planning (ERP) platform that helps organizations manage nearly every aspect of their business from a single, integrated web application. It is built on the Frappe Framework using Python and JavaScript and is licensed under the GNU General Public License (GPL v3), making it suitable for self-hosting or customization.

Unlike traditional ERP systems that often require expensive licensing, ERPNext can be deployed on your own servers, in the cloud, or through managed hosting providers.

What does ERPNext do?

ERPNext combines multiple business applications into one system, allowing departments to share data in real time.

Major modules include:

Module Purpose
Accounting General ledger, accounts payable/receivable, bank reconciliation, taxes, financial statements
CRM Lead management, opportunities, customer interactions, quotations
Sales Quotes, sales orders, invoicing, customer management
Purchasing Supplier management, purchase orders, receipts
Inventory Warehouses, stock movements, serial numbers, batches
Manufacturing Bills of Materials (BOMs), work orders, production planning
Projects Tasks, milestones, timesheets, budgeting
Human Resources Employees, payroll, leave, attendance, recruitment
Asset Management Asset lifecycle, depreciation, maintenance
Support Help desk, issue tracking, SLAs
Website CMS, forms, blogs, landing pages
E-Commerce Product catalog, shopping cart, online orders
Point of Sale Retail sales, barcode scanning, cash drawers
Education Student records, courses, instructors
Healthcare Patients, appointments, clinical workflows
Non-Profit Donor management, memberships, fundraising

Key Features

Complete Accounting

ERPNext includes a comprehensive accounting system with:

  • Double-entry bookkeeping
  • Multi-company support
  • Multi-currency support
  • Tax management
  • Budgeting
  • Fixed assets
  • Profit & Loss
  • Balance Sheet
  • Cash Flow
  • Bank reconciliation
  • Automated journal entries
Customer Relationship Management (CRM)

Track:

  • Leads
  • Opportunities
  • Quotations
  • Sales pipeline
  • Customer communications
  • Follow-up reminders
  • Marketing campaigns
Inventory Management

Features include:

  • Unlimited warehouses
  • Stock transfers
  • Barcode support
  • Batch tracking
  • Serial number tracking
  • Reorder levels
  • Landed costs
  • Stock valuation
  • Inventory forecasting
Manufacturing

ERPNext is especially popular among manufacturers.

It supports:

  • Multi-level Bills of Materials
  • Production planning
  • Capacity planning
  • Workstations
  • Job cards
  • Material Requirements Planning (MRP)
  • Quality inspections
  • Production costing
Human Resources

Manage:

  • Employees
  • Departments
  • Payroll
  • Attendance
  • Leave requests
  • Expense claims
  • Performance reviews
  • Recruitment
Project Management

Includes:

  • Gantt charts
  • Kanban boards
  • Task assignments
  • Time tracking
  • Billing
  • Project budgets
  • Milestones
Website & Portal

ERPNext includes a built-in web framework for:

  • Company websites
  • Blogs
  • Customer portals
  • Supplier portals
  • Product catalogs
  • Web forms
  • Knowledge bases

No external CMS is required, though it can integrate with others if desired.

Reporting & Dashboards

Users can create:

  • Custom reports
  • Interactive dashboards
  • Charts
  • KPIs
  • Scheduled reports
  • Print formats
  • PDF exports
Workflow Automation

ERPNext can automate many business processes, such as:

  • Document approvals
  • Email notifications
  • Role-based permissions
  • Scheduled jobs
  • Server scripts
  • Custom workflows
  • Business rules

Customization

One of ERPNext’s biggest strengths is its flexibility.

You can customize:

  • Forms
  • Fields
  • Workflows
  • Reports
  • Print templates
  • Dashboards
  • Email templates
  • Permissions
  • Web pages
  • Client scripts
  • Server-side Python code

Most changes can be made through the web interface without modifying the core application.

Integrations

ERPNext offers APIs and can integrate with:

  • REST API
  • GraphQL (via extensions)
  • Webhooks
  • Zapier (through community connectors)
  • Payment gateways (e.g., Stripe, PayPal, Razorpay, Authorize.net, depending on available integrations)
  • Shipping providers
  • LDAP/Active Directory
  • OAuth providers
  • Email servers
  • SMS gateways
  • QuickBooks migration tools
  • Shopify and WooCommerce (via community apps)

Mobile Access

ERPNext is fully web-based and responsive, allowing access from:

  • Windows
  • macOS
  • Linux
  • iPhone
  • Android
  • Tablets

There are also community-supported mobile apps available.

Typical Users

ERPNext is used by organizations such as:

  • Manufacturers
  • Wholesalers
  • Retailers
  • Distributors
  • Professional service firms
  • Construction companies
  • Healthcare providers
  • Educational institutions
  • Non-profits
  • Technology companies
  • Government organizations

It is particularly well suited for small to medium-sized businesses but can scale to larger deployments with appropriate infrastructure.

Advantages

  • No per-user licensing fees for self-hosted deployments
  • Comprehensive suite of integrated business applications
  • Modern web interface
  • Highly customizable
  • Strong API support
  • Active open-source community
  • Self-hosted or cloud deployment options
  • Frequent feature updates
  • Multi-company and multi-currency capabilities

Considerations

  • Initial implementation requires planning, especially if migrating from another ERP.
  • Customizations may require knowledge of the Frappe Framework and Python.
  • Performance and reliability for larger organizations depend on proper server sizing, database tuning, backups, and high-availability architecture.

ERPNext vs. Odoo

SEE ALSO: 🚀 Deploy Odoo on Rocky Linux VPS

Feature ERPNext Odoo Community
Open Source Yes (GPL v3) Yes (LGPL), but many features are Enterprise-only
Self-hosting Yes Yes
Accounting Included Limited in Community edition
Manufacturing Included Basic in Community
CRM Included Included
HR & Payroll Included (varies by localization) Basic in Community
Website Builder Included Included
Licensing No per-user fees for self-hosting Enterprise edition uses per-user licensing
Customization Extensive via Frappe Framework Extensive via Odoo framework
Is ERPNext a good fit?

ERPNext is an excellent choice if you want a full-featured, customizable ERP without recurring per-user licensing costs. It is especially appealing for organizations with in-house technical expertise or access to a hosting provider that can manage the deployment. For companies already operating Linux infrastructure or providing managed hosting—such as Rad Web Hosting—it can be deployed on a VPS or dedicated server and tailored to specific business processes while retaining full control over the data.

Recommended VPS Requirements

For a small production ERPNext server:

  • OS: Ubuntu 24.04 LTS
  • CPU: 2+ vCPU
  • RAM: 4 GB minimum, 8 GB+ recommended
  • Disk: 40 GB+ SSD/NVMe
  • Domain: erp.example.com pointed to VPS IP
  • Ports: 22, 80, 443 open

Launch 100% ssd ubuntu vps from $3. 19/mo!


Compare Ubuntu VPS Plans

KVM-SSD-1
KVM-SSD-8
KVM-SSD-16
KVM-SSD-32
CPU
1 Core
2 Cores
4 Cores
8 Cores
Memory
1 GB
8 GB
16 GB
32 GB
Storage
16 GB NVMe
128 GB NVMe
256 GB NVMe
512 GB NVMe
Bandwidth
1 TB
4 TB
8 TB
16 TB
Network
1 Gbps
1 Gbps
1 Gbps
1 Gbps
Delivery Time
⏱️ Instant
⏱️ Instant
⏱️ Instant
⏱️ Instant
Location
US/EU/APAC
US/EU/APAC
US/EU/APAC
US/EU/APAC
Price
$7.58*
$39.50*
$79.40*
$151.22*
KVM-SSD-1
$7.58*
CPU 1 Core
Memory 1 GB
Storage 16 GB NVMe
Bandwidth 1 TB
Network 1 Gbps
Delivery Time ⏱️ Instant
Location US/EU/APAC
KVM-SSD-8
$39.50*
CPU 2 Cores
Memory 8 GB
Storage 128 GB NVMe
Bandwidth 4 TB
Network 1 Gbps
Delivery Time ⏱️ Instant
Location US/EU/APAC
KVM-SSD-16
$79.40*
CPU 4 Cores
Memory 16 GB
Storage 256 GB NVMe
Bandwidth 8 TB
Network 1 Gbps
Delivery Time ⏱️ Instant
Location US/EU/APAC
KVM-SSD-32
$151.22*
CPU 8 Cores
Memory 32 GB
Storage 512 GB NVMe
Bandwidth 16 TB
Network 1 Gbps
Delivery Time ⏱️ Instant
Location US/EU/APAC

Deploy ERPNext on Ubuntu VPS

To deploy ERPNext on Ubuntu VPS, follow the steps below:

  1. Update the server

    SSH in as root:

    ssh root@YOUR_SERVER_IP
    

    Update packages:

    apt update && apt upgrade -y
    apt install -y software-properties-common curl git wget unzip build-essential cron
    reboot
    

    Reconnect after reboot.

  2. Create a dedicated ERPNext user

    Do not run ERPNext as root.

    adduser frappe
    usermod -aG sudo frappe
    su - frappe
    
  3. Install system dependencies

    sudo apt install -y \
      python3-dev python3-pip python3-venv \
      redis-server mariadb-server mariadb-client \
      nginx supervisor \
      xvfb libfontconfig wkhtmltopdf \
      libmysqlclient-dev pkg-config
    

    Enable services:

    sudo systemctl enable --now mariadb redis-server nginx supervisor
    
  4. Secure and configure MariaDB

    Run:

    sudo mysql_secure_installation
    

    Recommended answers:

    Switch to unix_socket authentication: Y
    Change root password: Y
    Remove anonymous users: Y
    Disallow root login remotely: Y
    Remove test database: Y
    Reload privilege tables: Y
    

    Edit MariaDB config:

    sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
    

    Under [mysqld], add or confirm:

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

    Restart MariaDB:

    sudo systemctl restart mariadb
    
  5. Install Node.js and Yarn

    ERPNext/Frappe needs Node.js and Yarn for frontend assets.

    curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
    sudo apt install -y nodejs
    sudo npm install -g yarn
    

    Verify:

    node -v
    npm -v
    yarn -v
    
  6. Install Frappe Bench

    sudo pip3 install frappe-bench --break-system-packages
    

    Verify:

    bench --version
    
  7. Initialize a new Bench

    From the frappe user home directory:

    cd ~
    bench init frappe-bench --frappe-branch version-15
    cd frappe-bench
    
  8. Create the ERPNext site

    Replace erp.example.com with your real hostname.

    bench new-site erp.example.com
    

    You will be prompted for:

    MariaDB root password
    New Administrator password
    

    The Administrator password is the ERPNext admin login password.

  9. Download and install ERPNext

    bench get-app erpnext --branch version-15
    bench --site erp.example.com install-app erpnext
    

    Set the site as default:

    bench use erp.example.com
    
  10. Test ERPNext before production mode

    Start the development server:

    bench start
    

    Visit:

    http://YOUR_SERVER_IP:8000
    

    Or, if DNS already points correctly:

    http://erp.example.com:8000
    

    Stop it with:

    CTRL+C
    
  11. Configure production mode

    Run:

    sudo bench setup production frappe
    

    This configures Supervisor and Nginx for the Bench deployment. Frappe’s production docs note that a healthy production setup should show Frappe, Redis, Socket.IO, scheduler, and worker processes running under Supervisor.

    Reload services:

    sudo supervisorctl reread
    sudo supervisorctl update
    sudo supervisorctl restart all
    sudo systemctl reload nginx
    

    Check status:

    sudo supervisorctl status
    

    You should see processes like:

    frappe-bench-web
    frappe-bench-workers
    frappe-bench-redis
    
  12. Configure DNS

    Create an A record:

    erp.example.com  A  YOUR_SERVER_IP
    

    Wait for DNS propagation, then test:

    dig +short erp.example.com
    

    It should return your VPS IP.

  13. Install SSL certificate

    Install Certbot:

    sudo apt install -y certbot python3-certbot-nginx
    

    Issue SSL:

    sudo certbot --nginx -d erp.example.com
    

    Verify renewal:

    sudo certbot renew --dry-run
    
  14. Log in to ERPNext

    Open:

    https://erp.example.com
    

    Login:

    Username: Administrator
    Password: the password you created during bench new-site
    

    Complete the ERPNext setup wizard: company name, country, currency, timezone, chart of accounts, and first user.

  15. Useful management commands

    Switch to the Bench directory:

    su - frappe
    cd ~/frappe-bench
    

    Update ERPNext:

    bench update
    

    Restart services:

    sudo supervisorctl restart all
    sudo systemctl reload nginx
    

    Run database migrations:

    bench --site erp.example.com migrate
    

    Clear cache:

    bench --site erp.example.com clear-cache
    bench --site erp.example.com clear-website-cache
    

    Check installed apps:

    bench --site erp.example.com list-apps
    

    Create manual backup:

    bench --site erp.example.com backup --with-files
    

    Backups are stored under:

    ~/frappe-bench/sites/erp.example.com/private/backups/
    
  16. Add automatic off-server backups

    At minimum, sync backups to remote storage.

    Example using rsync:

    crontab -e
    

    Add:

    0 2 * * * cd /home/frappe/frappe-bench && /usr/local/bin/bench --site erp.example.com backup --with-files >/tmp/erpnext-backup.log 2>&1
    30 2 * * * rsync -az /home/frappe/frappe-bench/sites/erp.example.com/private/backups/ backupuser@backup.example.com:/backups/erpnext/
    
  17. Firewall hardening

    Enable UFW:

    sudo ufw allow OpenSSH
    sudo ufw allow 80/tcp
    sudo ufw allow 443/tcp
    sudo ufw enable
    sudo ufw status
    
  18. Troubleshooting

    Check Nginx:

    sudo nginx -t
    sudo systemctl status nginx
    sudo tail -f /var/log/nginx/error.log
    

    Check Supervisor:

    sudo supervisorctl status
    sudo supervisorctl restart all
    

    Check Frappe logs:

    cd /home/frappe/frappe-bench
    tail -f logs/web.log
    tail -f logs/worker.log
    tail -f logs/scheduler.log
    

    Restart everything:

    sudo supervisorctl restart all
    sudo systemctl restart nginx redis-server mariadb
    
  19. Common issues

    502 Bad Gateway

    Usually caused by stopped Frappe web workers.

    sudo supervisorctl status
    sudo supervisorctl restart all
    

    Site not loading by domain

    Check DNS:

    dig +short erp.example.com
    

    Check Nginx:

    sudo nginx -t
    sudo systemctl reload nginx
    

    CSS or JS broken after update

    cd /home/frappe/frappe-bench
    bench build
    bench --site erp.example.com clear-cache
    sudo supervisorctl restart all
    

    Scheduler not running

    bench --site erp.example.com enable-scheduler
    bench --site erp.example.com doctor
    sudo supervisorctl restart all
    

    ERPNext should now be running at:

    https://erp.example.com
    

Launch 100% ssd ubuntu vps from $3. 19/mo!

Conclusion

You now know how to deploy ERPNext on Ubuntu VPS.

Avatar of editorial staff

Editorial Staff

Rad Web Hosting is a leading provider of web hosting, Cloud VPS, and Dedicated Servers in Dallas, TX.
lg