Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › Bench

How to Install ERPNext on an Ubuntu VPS (Ubuntu 24.04+ and Bench Production Guide)

By Freedom251 Team · · 11 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install ERPNext by first pinning a compatible Frappe/ERPNext release, then preparing an Ubuntu 24.04 or newer VPS with MariaDB, Python, Node.js, Redis or Valkey, Yarn, pip, Git, cron and the release-appropriate PDF tooling. Use Bench to create the deployment, site and ERPNext app; add Supervisor and Nginx before treating the server as production-ready.

The commands below follow Frappe’s documented host-based workflow. Package versions are tied to the release you choose, so do not combine dependency instructions from an older ERPNext tutorial with a newer branch.

As an Amazon Associate I earn from qualifying purchases.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the installation actually creates

ERPNext runs as an application on the Frappe Framework. A working deployment has several coordinated parts:

  • MariaDB stores ERPNext business data and site configuration.
  • Python runs Frappe and ERPNext server code.
  • Node.js and Yarn build and serve browser assets.
  • Redis or Valkey supports queues, caching and realtime services.
  • Bench is the command-line control plane for benches, sites, apps, migrations and operational tasks.
  • Supervisor keeps background processes alive and restarts them after a crash.
  • Nginx serves static files and proxies web requests to Frappe.

A command such as bench init creates a development-ready bench; it does not by itself provide a hardened, monitored production service. Domain DNS, TLS, backups, firewall rules, log review and capacity planning remain deployment responsibilities.

Choose the release before installing anything

Frappe’s current installation guidance supports Debian 13 or newer and Ubuntu 24.04 or newer. Older operating systems may encounter package problems. Select the ERPNext and Frappe major branches together, then use the dependency set for that pair. Framework and ERPNext branches that do not match can fail during installation or later migrations.

Frappe branch covered by the matrix MariaDB Python Node.js Redis/Valkey Yarn pip PDF method
v14 and v15 10.6.6 or newer 3.10 or newer 18 or newer 6 1.12 or newer 20 or newer wkhtmltopdf is required through version 16
v16 and develop 11.8 3.14 24 6 or newer 1.22 or newer 25.3 or newer From version 17, Bench downloads Chromium instead of requiring wkhtmltopdf

The table describes Frappe’s published prerequisite matrix; confirm the exact ERPNext branch’s release notes before production upgrades. A guide written for v14 or v15 may assume older Ubuntu packages and different runtimes than a current v16 installation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Decide whether host-based Bench is appropriate

The procedure in this article installs directly on the VPS. Frappe also documents Docker images as the recommended production approach in its setup-production warning and explicitly says it does not recommend installing on bare-metal servers. A VPS is virtualized, but the warning still signals that containerized production is Frappe’s preferred operational model. Choose host-based Bench when you need direct system access and can own service administration; choose Docker when you want image-based repeatability and isolation; choose managed hosting when you want another party to operate upgrades, backups and monitoring.

Plan the VPS and access

No authoritative source establishes a universal CPU, RAM, disk or installation-time minimum. Size the server for the number of users, concurrent workers, report workloads, database growth, file attachments and backup retention you expect. Reassess capacity after observing queue length, memory pressure, database size and response times instead of relying on a generic “minimum VPS” number.

  • Create the VPS with Ubuntu 24.04 or a newer supported Ubuntu release.
  • Keep SSH access available and create a normal administrative account with sudo; perform routine work as that account rather than logging in as root.
  • Set a stable hostname. If users will access ERPNext by domain, create DNS records pointing that name to the VPS address before the final verification step.
  • Allow SSH and web traffic through the provider firewall and the server firewall you administer. Restrict database and Redis ports from the public internet.
  • Allocate storage for MariaDB, private files, public files, logs and local backup staging. Keep a separate off-server copy of backups.

Prepare Ubuntu and the dependency stack

Update the operating system

Connect over SSH with your administrative account and update package metadata before installing dependencies:

sudo apt update
sudo apt upgrade -y

Reboot if Ubuntu installs a kernel or other component that requires it, then reconnect and confirm the VPS still has the expected hostname, network access and free disk space.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install the system tools

Install Git, cron, MariaDB server and client packages, MariaDB development libraries, Redis (or the Valkey package supported by your release), compiler and Python development tooling. The exact package names can vary between Ubuntu releases and Frappe branches, so use the dependency list for the branch you pinned rather than copying an unrelated tutorial’s list. Git is required to fetch Frappe and ERPNext; cron is used by scheduled tasks.

Install the branch-appropriate Node.js and Yarn versions. Frappe’s current matrix requires Node.js 18+ and Yarn 1.12+ for v14/v15, while v16/develop requires Node.js 24, Yarn 1.22+ and the corresponding Python and pip versions shown above. The official sequence installs Node through nvm, which lets you select the runtime without replacing Ubuntu’s system packages. Verify the selected versions in the same shell that will run Bench.

Configure MariaDB

Start and enable MariaDB using Ubuntu’s service tools. If the package did not run its hardening wizard, execute:

sudo mariadb-secure-installation

Follow the prompts to remove anonymous access, disallow remote root login and remove the test database. ERPNext sites are created by Bench; do not manually create an application database unless a release-specific instruction requires it. Ensure the MariaDB server and client/development libraries match the selected Frappe branch.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Configure Redis or Valkey

Install the supported Redis or Valkey package and make sure its service starts at boot. Keep it bound to the local machine unless your architecture deliberately separates services behind a protected private network. Bench-generated process definitions will use the queue and cache services when production mode is configured.

Install Python, pip and PDF tooling

Use the Python version required by the selected branch and ensure pip meets its minimum: pip 20+ for v14/v15 or 25.3+ for v16/develop. Frappe versions through 16 require wkhtmltopdf for PDF generation. From version 17, Bench downloads Chromium for PDF rendering instead, so installing wkhtmltopdf for a v17 deployment is unnecessary unless another application specifically needs it. Test that the PDF dependency can run under the same user and display environment used by the workers.

Install Bench and initialize a bench

Bench is the CLI tool Frappe documents for managing deployments and sites. Install it with the current Python-tool workflow, verify the executable, create a dedicated working directory and initialize the bench:

uv tool install frappe-bench
bench --version
mkdir ~/frappe
cd ~/frappe
bench init my-bench

Use the release-specific branch or options required by the ERPNext version you selected. If the command resolves a different Frappe branch than intended, stop and correct it before creating sites. A bench can host multiple sites, but each site still has its own database, files and installed applications.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check the initialized directory

After bench init completes, the my-bench directory contains configuration, logs, sites, apps and environment data. Run Bench commands from that directory unless the command explicitly accepts a bench path. Confirm that the command runs as the account that will own the bench; mixing root-owned files with an unprivileged Bench user is a common cause of failed updates and asset builds.

Create a site and install ERPNext

From the bench directory, create the site, fetch the ERPNext app and install it on that site:

cd ~/frappe/my-bench
bench new-site example.com
bench get-app erpnext
bench --site example.com install-app erpnext

Set the site credentials safely

bench new-site prompts for the database root credentials and the initial Administrator password, or accepts the password through the documented Bench options for your release. Use a unique, long Administrator password and store it in your password manager. Do not paste credentials into shell history or commit them to a repository.

Keep the site name and DNS name aligned

The site name in the command is the hostname Frappe uses for routing. If the public name will be erp.example.net, create the site with that name or configure the documented site-routing alternative for your branch. A mismatch can produce the default site, an “Invalid Host” response or a successful login to the wrong tenant.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run migrations when the release requires them

New installations normally apply the schema while installing the app. Release upgrades and some app changes require migrations; run the migration command documented for the selected release before testing business workflows. Never skip migration notes when moving between major branches.

Make the deployment persistent for production

Development-style Bench processes are not a production service. Frappe’s host-based production guide uses Supervisor and Nginx:

  • Supervisor keeps web, Socket.IO, queue, scheduler and related Frappe processes running and restarts them after crashes.
  • Nginx serves static assets directly and proxies dynamic requests to Frappe.

Generate Supervisor configuration

From the bench directory, generate the configuration:

bench setup supervisor

Link the generated config/supervisor.conf into Supervisor’s configuration directory using the path conventions of your Ubuntu installation. Reload Supervisor, update its process group and verify the generated names rather than assuming they match a tutorial written for another bench path. The expected control command is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo supervisorctl status

A healthy result should show the web, socketio, queue, scheduler and Redis-related processes in a running state. If a process repeatedly exits, inspect the corresponding bench log before restarting it; a missing runtime, permission error or failed database connection must be corrected at the source.

Generate Nginx configuration

Generate the reverse-proxy configuration:

bench setup nginx

Link the generated config/nginx.conf into Nginx’s enabled configuration, test the syntax with Ubuntu’s Nginx service command, and reload Nginx only after the test passes. Keep the generated file under the bench’s control and regenerate it when sites or routing settings change.

Use the automated production command when suitable

Frappe also documents an easier path with:

sudo bench setup production

Its installation script accepts a --production flag. This path automates service configuration but does not remove the need to review users, firewall exposure, DNS, TLS, backups and logs. Do not run both a hand-built Supervisor/Nginx setup and the automated setup blindly; choose one method and inspect what it changes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verify the site before handoff

  1. Run sudo supervisorctl status and confirm the web, Socket.IO, queue, scheduler and Redis processes are running.
  2. Point the domain’s DNS record at the VPS public IP. Allow DNS propagation according to your DNS provider’s TTL.
  3. Test the site over HTTP first. The production guide expects the site to be live on the mapped domain once Nginx and Supervisor are working.
  4. Log in, create a test customer or item, run a representative report and generate a PDF. This catches database, queue, asset and PDF problems that a simple login does not.
  5. Review Nginx, Supervisor and Bench logs while performing the test. Confirm that background jobs complete and that no process is restarting continuously.
  6. Only after HTTP works, obtain a TLS certificate, configure HTTPS redirects and test renewal. Keep certificate renewal automated and verify it before the first certificate expiration window.

Backups, updates and routine operations

Back up before every upgrade

Take a database and file backup before changing Frappe, ERPNext or system packages. Store at least one copy outside the VPS and periodically perform a restore to a separate environment. A backup that has never been restored is not a verified recovery plan.

Use Bench’s documented update workflow

For supported updates, bench update pulls app changes, runs patches, builds assets and restarts Supervisor. Read the target release’s migration notes first, schedule downtime when a migration can lock tables, and ensure the backup completed successfully before starting. Do not use bench update as a substitute for a major-version upgrade plan; pin and test the target branches deliberately.

Monitor the parts that fail first

  • Disk usage for database files, attachments, logs and backup archives.
  • MariaDB health, slow queries and available connections.
  • Redis/Valkey memory and queue depth.
  • Supervisor process state and repeated restarts.
  • HTTP error rates, response latency and TLS renewal status.
  • Backup age and the result of the latest restore test.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Host-based Bench, Docker or managed hosting?

The installation method determines who owns operational risk. Compare the choices before committing a production domain.

Decision area Host-based Bench on the VPS Docker images Managed ERPNext hosting
Release control You pin branches and system packages directly. You pin image tags and compose configuration. The provider controls the supported release process, subject to its policy.
Upgrades and rollback You run Bench updates, test migrations and restore backups when needed. Image replacement can be repeatable, but database migrations still require testing. The provider may perform upgrades; confirm rollback and maintenance procedures contractually.
Backups and restores You own schedules, off-server copies and restore tests. You still own persistent-volume backups unless the service adds that responsibility. Verify retention, geographic copies, restore testing and export access.
TLS and DNS You configure Nginx, certificates, DNS and renewal. You configure the ingress or proxy layer and certificate renewal. The provider may handle certificates and DNS assistance; confirm exactly what is included.
Monitoring and support You monitor services, logs, queues and capacity. You monitor containers, hosts and persistent data. Support scope, response times and monitoring depend on the service agreement.
Isolation Processes share the VPS operating system. Containers separate application components while sharing the host kernel. Isolation and tenancy depend on the provider’s architecture.
Responsibility You administer Ubuntu, MariaDB, Redis/Valkey, Bench, Supervisor and Nginx. You administer images, volumes, orchestration and the underlying host unless outsourced. The provider takes on an agreed portion of infrastructure operations.
Monthly cost VPS and administration time are your costs. Compute and storage remain your costs, with possible orchestration overhead. Pricing depends on provider, users, storage, support and service level.

Frappe’s setup-production warning favors Docker images for production, while its production guide still documents the host-based Bench path. Treat that as a trade-off, not a contradiction: both workflows exist, but they assign maintenance work differently.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshooting common failures

Bench or an app installs the wrong version

Check the active Frappe and ERPNext branches and compare every runtime with the selected matrix. Stop using commands copied from a different major release, recreate the bench with the intended branch when necessary, and rerun installation only after the dependency versions are aligned.

Packages cannot be resolved on Ubuntu

Confirm that the VPS runs Ubuntu 24.04 or newer, refresh APT metadata, and check whether the package name changed between Ubuntu releases. An older Ubuntu image may be technically bootable but still outside the current Frappe support guidance.

The site opens locally but not on its domain

Check DNS resolution to the VPS IP, the Nginx configuration generated for the site name, firewall rules for ports 80 and 443, and whether Supervisor’s web process is running. Test HTTP before debugging TLS so certificate configuration is not masking a routing problem.

Workers are stopped or jobs remain queued

Use sudo supervisorctl status, then inspect the queue and worker logs. Common causes include a missing Redis/Valkey service, insufficient permissions on the bench directory, an incompatible Python or Node runtime, and a database connection failure.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

PDF reports fail

Match the renderer to the branch: wkhtmltopdf is needed through version 16; version 17 and later use Chromium downloaded by Bench. Verify that the download completed, that the worker user can execute the renderer and that the server has enough disk space for browser assets.

Updates fail after files were edited as root

Inspect ownership of the bench, apps, sites and logs. Restore ownership to the dedicated Bench account, then rerun the command as that account. Avoid using sudo for ordinary Bench operations because root-owned artifacts can block asset builds and migrations.

Installation checklist

  • Ubuntu 24.04+ selected, with a supported SSH administrative account.
  • Frappe and ERPNext branches pinned before package installation.
  • MariaDB, Python, Node.js, Yarn, Redis/Valkey, pip, Git, cron and the correct PDF renderer installed.
  • MariaDB hardened and services enabled at boot.
  • Bench installed with uv tool install frappe-bench, verified with bench --version and initialized under the intended user.
  • Site created with bench new-site, ERPNext fetched and installed on that site.
  • Supervisor and Nginx generated and enabled, with all expected processes running.
  • DNS mapped, HTTP tested, then HTTPS enabled and renewal checked.
  • Off-server backups, restore tests, update windows, firewall rules and monitoring documented.

The Bottom Line

For a maintainable Ubuntu deployment, pin the ERPNext/Frappe release first, match every dependency to that release, use Bench for the site lifecycle, and add Supervisor, Nginx, backups, TLS and monitoring before calling the VPS production-ready.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

BenchERPNextFrappe FrameworkMariaDBNGINXSupervisorUbuntu VPS

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.