EspoCRM high availability

EspoCRM high availability depends on where its state lives, not on adding servers. This page covers the decisions, build order, effort drivers and restore tests for a resilient self-hosted setup.

On this page

Why EspoCRM high availability starts with knowing where state lives

High availability for a self-hosted EspoCRM depends on separating the database, file storage and background processing from the application node, and on proving that restores work before you need them. When the sales or service team cannot work without the CRM, the question is not whether one server can run the application but where every piece of state lives and how quickly you can rebuild it elsewhere. The official installation script deploys a single-host Docker stack with Nginx, MariaDB and a command.sh utility for backups, restores and upgrades. That is a sound starting point for a pilot or a small team, but it is a single-host design, not a multi-server one. Its database, uploaded files, configuration and scheduled jobs all sit on the same machine, so losing that host takes the whole CRM down.

The harder parts are the ones that look like application code but are really operations. Cron must run EspoCRM's background jobs, and the WebSocket daemon has to run reliably for real-time updates, so both need a defined owner, a restart policy and monitoring when you move beyond one node. Uploaded attachments live on the application filesystem by default, which means every application server must see the same storage or the files must be replicated and backed up with the database so they stay consistent. Confirm with the EspoCRM server configuration documentation which of these paths and processes you must relocate for your chosen database and web server, and document it before adding a second node.

Upgrades add a third constraint. Your customizations, custom entities, formula scripts and extensions must survive each release, and version 10 turns off UI upgrades by default, so upgrades run from the command line on a schedule your team controls. Ask your team to write down the list of state locations, the recovery time they expect, and the date of the last successful restore test into a runbook. A backup that has never been restored onto a clean host is an assumption, not a recovery plan.

Which EspoCRM components hold state and which can be replaced

Before you add a second server, sort every EspoCRM part into one of three groups: stateful, stateless, or single-instance by design. Stateful parts need a replication or shared-storage plan, stateless parts can usually run in parallel, and single-instance parts need a failover plan. Confirm each placement against the docs for your exact EspoCRM version.

Relational database

The database is the stateful system of record for accounts, records, workflows and configuration data. EspoCRM supports MySQL 8.0 or newer, MariaDB 10.6 or newer, or PostgreSQL 15, according to the server configuration docs. Replication, failover and point-in-time backup are handled by the database platform, so the cluster design belongs to your database team. Before assuming a specific replication pattern, confirm in the docs for your version whether EspoCRM can safely read from a replica or must always write to the primary.

Server configuration docs

Application servers

Web and PHP nodes are the most replaceable part, stateless only if every node reads the same database, file storage and configuration. The server configuration docs list Apache, Nginx or IIS with PHP 8.3 to 8.5. Check how user sessions are stored and whether your load balancer needs sticky sessions. A node that holds local sessions, local uploads or its own copy of the configuration will break when traffic moves between nodes.

File storage for attachments

Attachments, uploaded documents and import files are stateful and must live on storage every application node can reach. Confirm in your version's docs where uploads are written and whether external or object storage is supported. If you use a shared network filesystem, test file locking, permissions and write latency under concurrent users. Back up this storage on the same schedule as the database, because a restored database that references missing files gives users broken attachments.

Cron and scheduled tasks

The server configuration docs require cron or a scheduled task for background jobs, so this component is single-instance by design unless the docs say otherwise for your version. Running it on two nodes can duplicate scheduled work such as email sending, workflow runs or queued imports. Decide which node owns the schedule, document how it moves during failover, and confirm that a standby can take over without replaying jobs that already completed.

Cron requirements

WebSocket daemon

The WebSocket daemon delivers live notifications to logged-in browsers. Treat it as single-instance until the docs for your version confirm it can run as multiple processes behind a load balancer. Check that your reverse proxy passes WebSocket upgrade requests to the correct port, that TLS terminates consistently, and that browsers reconnect cleanly after a restart. Expect users to miss live updates during a daemon restart, and plan how they will refresh.

Configuration and custom directory

The configuration file holds database connection details and instance settings, and the custom directory holds your PHP and front-end extensions. Both must be identical on every application node, so they are stateful in practice even though they are files. Deploy them through one versioned release process rather than editing nodes by hand. Confirm in the upgrade and customization docs which paths are safe to change, and keep secrets out of the custom directory.

How the database, application nodes, file storage and schedulers fit together

The diagram starts at the public edge, where users reach a load balancer that spreads requests across two or more EspoCRM application nodes. Those nodes share one database tier and one file storage location, so any node can serve any user. A single scheduler host runs cron and the WebSocket daemon, which is why it sits apart from the request path. Confirm with the EspoCRM server configuration docs which paths must be shared, how the WebSocket daemon is started and whether session handling needs sticky routing.

Request path, shared tiers and the scheduler host, with the public edge separated from internal tiers.

Single host, active-passive or multi-server: which EspoCRM HA model fits

This table compares four ways to run EspoCRM, from a single host with scheduled backups to a multi-node setup behind a load balancer. Read each row against your recovery expectations, your team's patching capacity and how many people depend on the CRM during business hours. The main takeaway is that every step up in redundancy adds components you must patch, monitor and test, so choose the simplest model your recovery requirements actually allow.

ModelWhen it fitsOperational cost
Single host from the installation scriptSmall teams that can tolerate a restore from the latest backup after a host failure. The script deploys a Docker-based stack with Nginx and MariaDB, plus a command.sh utility for backups and restores.One host carries the web server, database, files and cron. Your team patches the host and Docker stack, and recovery means restoring the last backup onto replacement hardware. Confirm the backup schedule and retention you need.
Separated database, one application node, warm standbyTeams that want the database and files off the application server and can accept a manual failover to a prepared standby.Your team patches the application node, database and standby, and tests failover by hand. Run cron on the active node only, and keep the standby idle until promoted. Sessions and uploaded files stay on the active node unless you move them.
Multiple application nodes behind a load balancer with shared file storageOrganizations with many concurrent users, strict uptime expectations or a need to patch nodes one at a time without stopping the CRM.Each node must run identical PHP, configuration and extensions, so patching and change control cover every node. Shared storage for files, sticky or shared session handling and a single designated cron runner all need design and monitoring. Confirm WebSocket routing through the load balancer with the vendor documentation.
Managed database service with self-hosted application nodesTeams that already run a managed MySQL 8.0+, MariaDB 10.6+ or PostgreSQL 15 service and want the provider to handle database patching, backups and failover.Your team still patches the EspoCRM application, PHP and web server, and checks that the provider's backups restore into a test EspoCRM instance. Confirm which failover, point-in-time recovery and maintenance windows the provider offers, and what they cost.

Build order for a separated EspoCRM deployment

This sequence takes a single EspoCRM instance and splits it into separate database, file storage, application and scheduling tiers, then proves each layer works before anyone relies on it. The end state is a deployment where any application node can serve users, background jobs run once, and a restore and an upgrade have both been rehearsed.

  1. Size and place the database tier

    Choose a database engine and version from the EspoCRM server configuration docs, which list MySQL 8.0 or newer, MariaDB 10.6 or newer, or PostgreSQL 15. Place it on a managed or dedicated host that both application nodes can reach, and confirm sizing, replication and failover options with your database team and the vendor for your chosen engine. Check: the EspoCRM installer completes against the external database from a single node and the admin login works.

  2. Move uploaded files to shared storage

    Identify the directories where EspoCRM writes attachments and other uploaded content, then mount a shared file store, such as an NFS export or a network file service that your platform team supports, at the same path on every application node. Point the install at it, then copy existing files over while the instance is in maintenance mode. Check: a file uploaded through node A is downloadable through node B without any local copy on node B.

  3. Deploy two application nodes from one build

    Install the same EspoCRM version and the same configuration, custom directory and extensions on two application servers running a supported PHP version and web server from the server configuration docs. Keep the configuration file and any custom code identical across both, and deploy from one source so nodes cannot drift. Check: both nodes report the same version and the same extension list, and a change to a layout made on one node appears on the other after a cache refresh.

  4. Front both nodes with a TLS load balancer

    Place a load balancer in front of the two nodes, terminate TLS there or on each node with certificates you manage, and set the site URL to the public hostname. Confirm session handling is compatible with your balancing method, and confirm with your security team how IP restrictions and forwarded client addresses will be applied. Check: repeated logins and page loads are served by both nodes, and taking one node out of rotation leaves users able to keep working without a new login prompt.

  5. Designate one host for cron and the WebSocket daemon

    Choose exactly one node as the scheduler host and enable the cron job that EspoCRM requires for background work on that node only, and run the WebSocket daemon there as well. Disable scheduled execution on the other node so jobs are not picked up twice. Document which host is the scheduler so that a failover plan can move the role deliberately. Check: a background job with a known interval, such as an import or a scheduled action, runs exactly once per interval in the job log, and real-time notifications reach users connected to either node.

  6. Set up consistent backups of all three layers

    Back up the database, the shared file store and the configuration together, using the same schedule and the same retention so that the three sets describe one point in time. Use the backup tooling your team already runs, and check the EspoCRM installation docs for the command.sh utility only if your install was built with the script. Store copies off the primary infrastructure. Check: the backup job completes on schedule, and each run produces a database dump, a file archive and a configuration copy with matching timestamps.

  7. Restore into a separate environment

    Restore the latest backup set into an isolated environment that mirrors the production layout, with its own database, file store and nodes. Start EspoCRM there, then compare record counts for key entities, check that attachments open and that logins and scheduled jobs behave as expected. Record the time the restore took so the recovery estimate is based on observed data. Check: a sample of records and files matches production as of the backup timestamp, and the restored instance starts without errors in the application log.

  8. Rehearse an upgrade on the separated stack

    Run a full upgrade in the restored environment before touching production, following the upgrade path your team chooses. Note that UI-based upgrades are disabled by default in version 10, so plan the command-line procedure and confirm it with the EspoCRM upgrade documentation. Review custom code and extensions for compatibility first, then run the upgrade on both nodes in the order you intend to use in production. Check: the upgraded rehearsal instance serves both nodes at the new version, the scheduler still runs jobs once, and the rollback from backup has been tested.

Running cron and the WebSocket daemon reliably

EspoCRM depends on a scheduler for background work, so a missed or duplicated cron run shows up as stalled imports, delayed workflows and late notifications. The EspoCRM server configuration docs require cron or a scheduled task for background jobs, and the import docs show that idle import of large files also runs through cron. Before go-live, confirm the exact cron entry for your version and PHP binary in the server configuration docs, and confirm that the job runs as the web server user so that it can write to the cache, logs and file storage. A job that runs as root or as a different user can create files the web process cannot later modify, which is a common cause of failures that look like application bugs.

The practical pattern is to designate one scheduler host, or one node in a multi-server setup, to run cron, and to keep every other node out of the scheduler role. Running the same job on several application servers can process queued work twice, which matters for workflows that send email, change records or create related entities. Ask your implementation partner or your own platform team to document which node owns the scheduler, what happens when that node is replaced, and how the WebSocket daemon is started and supervised on your operating system, for example through a systemd unit or a process manager. Confirm in the EspoCRM documentation for your version whether the daemon can run on the scheduler host alone, how it authenticates to the application, and what multi-node caveats apply, because these details change between releases and should not be assumed from this page.

Monitoring should check that jobs are actually executing, not only that the host is up. Set alerts on the age of the most recent cron run, on the size of the queue of pending jobs in the application, and on the daemon process state, and test the alert by stopping the scheduler on a non-production copy. Include the scheduler and daemon in your restore testing as well, because a restored database with a stopped scheduler will look healthy until someone notices that notifications and imports have stopped. Agree in writing which team responds to a scheduler alert and what the runbook says to check first.

How the setup changes for single node, multi-server and air-gapped installs

A single node runs the application, database and file storage on one host, usually from the installation script, which deploys a Docker-based stack with Nginx and MariaDB. This is the simplest model to operate and the simplest to restore, because one host holds everything that needs to come back. It does not protect against host failure, so availability depends on how quickly you can rebuild the host and reload the latest backup.

  • Networking: One public entry point, usually Nginx on the same host, with TLS terminated there. Confirm which ports are exposed and that the firewall matches the intended access.
  • Storage: Database files, uploaded attachments and the data directory sit on the same disks. Confirm where the volumes live and that they are included in the backup scope.
  • Certificates: Let's Encrypt is optional in the script. Confirm renewal runs and that someone is alerted when it fails.
  • Background work: Cron must run on the host. Confirm the job runs after a reboot and that its output is monitored.
  • Updates and restores: The command.sh utility handles backups, restores and upgrades. Rehearse a full restore onto a second host before relying on it.

Confirm that your restore time fits your recovery expectations, since a single host failure means a full rebuild.

What drives the effort of an EspoCRM HA build

This table compares the factors that change how much work a high availability EspoCRM build takes, why each one adds effort, and how to keep it manageable. Read it before scoping, because the first two or three rows usually decide how many nodes, storage paths and test cycles the design needs. Most of the effort comes from environments and custom code, not from the number of servers.

DriverWhy it raises effortHow to keep it down
Users and concurrent sessionsHigher concurrent use means more PHP workers, more database connections and more WebSocket load, so load testing and session behavior need more attention.Confirm peak concurrent sessions with the business early, then size the application tier and WebSocket daemon against that figure and test it before go-live.
Data volume and attachment storageLarge attachment stores must be shared across nodes and included in backups, and restore time grows with database and file size.Move attachments to shared or object storage that all nodes can reach, and agree a restore time target before choosing backup tooling.
Application nodes and environmentsEach extra node, plus staging and a separate restore test environment, multiplies configuration, patching and verification steps.Keep the node count to what the load test requires, make staging a copy of production configuration, and script builds so every node is identical.
Scheduled integrations writing to EspoCRMImports, syncs and API jobs that run on a schedule can collide with cron jobs or fail mid-run during a node failover.Inventory every scheduled writer, set run windows, make them idempotent, and confirm which node runs cron before failover tests.
Custom entities and custom codeCustom PHP and front-end code in the custom directory, and extensions, must still work after each upgrade and on every node, so each change needs regression testing.Keep customizations in the supported extension points, document them, and test them against each release in staging. See the customization and upgrade topics for detail.
Compliance and audit evidenceAssessors often ask for backup records, restore test results, access logs and change history, which means building logging and evidence capture into the design.Agree the evidence list before design, export logs to a central store, and schedule restore tests that produce dated records.
Database engine choiceMySQL, MariaDB and PostgreSQL differ in replication, failover tooling and supported versions, so the chosen engine decides which HA pattern is practical.Pick the engine your team already operates, confirm supported versions in the EspoCRM server configuration docs, and avoid mixing engines across environments.

How to test that the EspoCRM setup recovers and fails safely

Verification has three parts: functional checks after the build, failure tests that stop real components, and restore tests that prove your backups work. Run all three before the system carries live sales or service data, and repeat the failure and restore tests after every major change. A backup that has not been restored is unproven, no matter how often the job reports success. Set your own acceptance criteria in writing before testing starts, such as which record types must match, how long a restore may take and which alerts must fire, so the result is a pass or fail rather than an opinion.

Start with functional checks. Log in through the load balancer and confirm the session survives requests that land on different application nodes. Upload an attachment on one node and confirm it is visible from the others, which exposes shared storage that is mounted locally by mistake. Confirm that each scheduled job runs once, not once per node, by checking the cron entries and the job logs for duplicate runs. Create a record in one browser session and confirm the WebSocket notification arrives in another session connected to a different node. If notifications fail only when the connection is routed to a second node, check the proxy configuration for the WebSocket daemon before anything else.

Run failure tests in a non-production copy. Stop one application node during an active session and confirm that users are routed to a healthy node and that work in progress is either saved or clearly reported as lost. Stop the scheduler and confirm that your monitoring raises an alert within the window you defined, since background jobs such as email processing will stop silently otherwise. Break the database connection and check that the error page shows a generic message with no connection strings, stack traces, file paths or version details, and that the error is logged on the server side only. Finally, restore a backup into a separate environment, check record counts by entity, confirm attachments open, run one sample workflow end to end and record how long the restore took, so you know your recovery time against the figure your business accepts.

What to monitor, back up, upgrade and document after go-live

Go-live is where high availability either holds or quietly decays. The four areas below, monitoring, backups, upgrades and documentation, depend on each other: a backup you have never restored, or a cron job nobody watches, fails the same way a single server does. Confirm each item with your own team before the first production cutover.

Monitor the background services

EspoCRM depends on cron or a scheduled task for background jobs, and the WebSocket daemon handles live updates. Check that cron runs on schedule on every node that should run it, and that the WebSocket daemon is up and restarts after a reboot. Watch database connection counts and disk use for the attachments location, and review PHP error logs on a fixed cadence. A stopped cron job often fails silently, so alert on missed runs, not only on errors.

Server configuration docs

Back up database, files and configuration together

Back up the database, the file storage holding attachments, and the configuration files as one set, taken on a defined schedule and copied off the host. A database restored without matching attachments produces broken records. Confirm the retention period, the off-host location and who can read the backups. Where the installation script was used, the command.sh utility covers backup and restore, but confirm it captures every component in your topology.

Upgrade from the command line

The current release is 10.0.10, released October 14, 2026, according to the EspoCRM releases page. Since version 10.0, upgrading through the UI is disabled by default, so plan upgrades as command-line work with a named operator. Before upgrading, review custom code in the custom directory and every installed extension for compatibility. Rehearse the full upgrade on a staging copy restored from a recent backup, then record the result.

EspoCRM releases

Document nodes, runbooks and restore tests

Keep a node inventory that lists every application server, database host, file store and cron host, with its role and owner. Write runbooks for failover and for restore, and name the person who owns the scheduler. A backup is only proven by a restore test log, so record each test with its date, the backup used, the time taken and the result. Review the documentation after every upgrade, since node roles and paths often change during one.

Questions buyers ask before hiring help with EspoCRM high availability

What does EspoCRM high availability work cost, and what drives the fee?

The fee follows from a written scope, so no figure can be given here. Cost depends on how many environments are involved (production, staging, disaster recovery), how much data must be protected and restored, how many integrations and custom entities or scripts must keep working during failover, and whether the target is a single server with a separate database or a multi-server layout. One-time work includes architecture, build, backup configuration and the first restore test. Recurring costs include hosting, backup storage, monitoring and any retainer you choose. Ask for the quote to list each environment, each server role, the backup and restore tests included, and what is excluded. DeployOpen does not publish a price list.

How long does an EspoCRM high availability project take?

Duration is set by the number of server roles being separated, the state of your current hosting, how much existing infrastructure can be reused, and how quickly your team can provide access, DNS and certificate changes. Change windows for the database cutover and the number of restore rehearsals also affect the timeline. Because no timing figure is supplied for this topic, ask for a schedule in the written scope that shows each milestone, the owner of each dependency and the point at which a restore test must pass before cutover.

Can our in-house team build EspoCRM high availability without a partner?

Yes, a capable team can, provided it has Linux and web server skills, database administration experience and a habit of testing restores. Start with the official server configuration and installation documentation for the PHP, database and web server versions you run, and confirm which requirements apply to your release. The areas that most often go wrong are cron and WebSocket daemon reliability on the second server, shared file storage permissions and backups that have never been restored. If your team lacks one of these skills, a partner can cover that part of the work while you keep ownership.

What do we need to provide before high availability work starts?

Expect to provide access to the infrastructure where EspoCRM runs, including cloud accounts, virtual machines or data center hosts, and network rules between them. You will also need DNS control, TLS certificates or the means to issue them, and a target for backups that is separate from the primary storage. Name one owner on your side who can approve changes and make decisions. Agree in writing on the restore criteria, such as which records, attachments and integrations must work after a restore and how long the team may take to confirm them, before any sign-off.

Does EspoCRM support active-active clustering out of the box?

Do not assume it does. Whether EspoCRM supports an active-active arrangement across several application servers, and what it requires for shared sessions, file storage, cron and the WebSocket service, depends on the version you run. Check the current EspoCRM server configuration documentation for your exact version and confirm the answer in writing with the vendor or your partner before designing around it. Plan the separation of database, application and file storage on the assumption that each tier needs its own failure handling until you have verified otherwise.

What happens after go-live, and do we need ongoing support?

After go-live, the important artifacts are a runbook for failover and restore, a record of the last successful restore test and a schedule for rehearsing upgrades, because version updates can change server requirements. Ask for these as part of the handover. Ongoing support is optional. DeployOpen offers retainers for ongoing support, upgrades and continuous testing, and you can choose whether to include monitoring of backups, periodic restore tests and upgrade rehearsals. The scope and cost of any retainer are set in its own written agreement.

Does the high availability work help us meet compliance requirements?

It helps produce evidence, but it does not provide certification. DeployOpen prepares systems, controls and evidence for compliance assessments, such as documented backup schedules, restore test records and access controls. Independent auditors and certification bodies issue any audit report or attestation. Ask your assessor early which evidence they expect, and agree on the format before the work starts.

How DeployOpen scopes, builds and hands over EspoCRM high availability

DeployOpen plans and builds EspoCRM high availability inside your own infrastructure, whether that is your cloud accounts, data center or air-gapped network. Each step is agreed in writing, tested against your environment, and documented so your own team can run the setup after handover.

How we scope

  • We confirm which EspoCRM components must be separated: database, application servers, file storage, cron and the WebSocket daemon.
  • We agree on the target topology, load balancer and TLS termination, and which hosting environment the setup runs in.
  • We record backup, restore and recovery expectations in the written scope before any build work starts, since engagements are fixed-scope.

How we build

  • We deploy the database, application nodes and shared file storage separately, with EspoCRM configured to use them consistently across servers.
  • We set up cron and the WebSocket daemon so background jobs run reliably on the designated nodes, and we test failover behavior.
  • We configure scheduled backups and run restore tests into a separate environment to confirm the recovery steps actually work.

How we hand over

  • We deliver architecture documentation, configuration records, runbooks for failover, backup and restore, and upgrade steps.
  • We walk your platform and security teams through the setup and the restore test results so they can review the evidence.
  • We provide a checklist of what to monitor, including cron health, WebSocket availability and backup job status, for your own team to own.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, scoped in writing after the build is complete.
  • Retainers can cover periodic restore tests, EspoCRM version upgrades and review of configuration changes across the cluster.
  • Ask any provider to confirm in writing which recovery targets, testing frequency and response arrangements their support includes.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.