ERPNext Docker deployment with frappe_docker

A practical plan for running ERPNext in containers with the official frappe_docker images and Compose files, from production topology and custom app images to verification and handover.

On this page

Why ERPNext Docker deployment with frappe_docker needs more than a single compose up

The frappe_docker repository gives your platform team production Docker images and Compose files for ERPNext, but the quick start is not a production architecture. ERPNext can be installed three ways: on Frappe Cloud, with Docker Compose, or manually with the bench command line tool, according to the frappe/erpnext README. Containers suit a team that must keep ERPNext inside its own cloud accounts, data centers or air-gapped networks, but the work moves from running one command to designing each service: MariaDB, Redis, background workers, the scheduler, Socket.io and Nginx. Each of these needs its own sizing, restart behavior, persistent storage and network path before ERPNext is safe to put in front of users.

The repository also contains a single-file demo setup, and the project marks it for short-lived evaluation only. Treat that file as a way to see the application running, not as a base for a system that holds accounting or stock records. Before you write any Compose file, confirm which ERPNext and Frappe major version you will run against the supported versions page, since version 14 has reached end of life and version 15 and 16 have fixed end dates. Also decide early whether you will build an image with your custom apps, because that choice determines how every later upgrade is tested and rolled out. Ask your team to document which image tag, which Compose file and which environment file each environment uses, so a rebuild in six months produces the same result.

Which containers make up an ERPNext stack

A frappe_docker deployment splits ERPNext into separate containers that share the same bench image and talk to a common database and cache. Knowing which containers hold state and which can be replaced independently tells you what to back up, what to scale and what to restart during an upgrade.

MariaDB holds the business data

MariaDB stores every site's records, including ledgers, stock entries and user accounts, so it is the stateful core of the stack. Its data lives in a named volume that must be backed up with the site files. Before going live, confirm the database version your ERPNext release supports, the character set and collation settings the Frappe documentation requires, and where the volume sits on your host or storage platform. Treat this container as the one you never delete casually.

frappe_docker repository

Redis caches and queues jobs

Redis serves two roles in ERPNext: it caches session and metadata data, and it holds the queues that background workers pick up. Losing Redis does not lose business records, but it interrupts queued jobs and active sessions. Check whether your Compose file persists Redis data and how the cache and queue instances are separated, since both affect restart behavior after a failure.

Workers run long background jobs

Workers execute tasks that should not block a user's browser request, such as report generation, email sending, bulk imports and scheduled document updates. They are stateless, so you can run more replicas when the queue backs up. Watch queue length and failed jobs after go-live, and size worker count against the import and reporting load you expect. Scaling workers does not require touching the database container.

Scheduler runs timed tasks

The scheduler container triggers recurring jobs such as daily cleanup, reminders and periodic recalculations on a timed basis. Run exactly one scheduler per bench, because duplicate schedulers can execute the same job twice and post duplicate entries. Confirm that it restarts automatically and that you can see its last run in the logs after a host reboot.

Socket.io pushes live updates

The Socket.io service keeps browser connections open so users see real-time notifications, document updates and chat messages without refreshing. It is stateless and can be restarted without losing data, but users lose live updates until it recovers. Check that your reverse proxy forwards WebSocket upgrade requests to this service, because a misrouted connection often appears as a silent failure rather than an error page.

Nginx routes traffic and serves assets

Nginx receives browser requests, serves static files and routes API and WebSocket traffic to the web, Socket.io and other services. It holds configuration, not business data, so you can replace or reconfigure it without touching records. Terminate TLS here or at a load balancer in front of it, and confirm which site name it expects so that multi-site hosts route requests to the correct bench.

Choosing between demo, production Compose and custom images

This table compares the single-file demo, the production Compose setup and a custom image that bakes in private apps. Read each column for when the option fits and what it asks of your team after go-live, such as upgrades, secret handling and rebuild discipline. The main takeaway is that the demo is for short-lived evaluation only, so any system that holds real accounting or stock data should start from a production Compose setup.

DecisionSingle-file demoProduction Compose with official imagesCustom image with private apps
Best fitShort-lived evaluation of ERPNext screens and workflowsLong-running company environment on your own infrastructureProduction setups that run private or client-specific Frappe apps
Data persistence expectationTreat as disposable, not a system of recordPersistent volumes for the database and site files, backed up on a scheduleSame as production Compose, plus the app code is versioned in the image
Database and RedisBundled inside the demo setupChoose bundled services or point to an external MariaDB and Redis you operateSame choice as production Compose, configured through the same environment variables
Upgrade effortDiscard and redeploy, with no migration path plannedPull a newer tagged image, then run the migrate step and test before cutoverRebuild the image against the new ERPNext release, then test every custom app before the migrate step
Secret handlingDefault credentials are acceptable only for evaluationDatabase passwords and admin credentials go into an env file or secret store outside version controlAlso keep any private repository tokens out of the image layers and build logs
Rebuild disciplineNot applicableRebuilds are rare, mainly when pulling new imagesEach build must be pinned to versions of ERPNext and each app, with a record of what went into the image
Operational skills neededBasic Docker knowledgeCompose operations, backups, reverse proxy and TLS, log reviewEverything in production Compose, plus a build pipeline and app release process
What to confirm with the vendor or your teamNothing beyond the evaluation scopeSupported image tags for your ERPNext version and the current frappe_docker Compose filesWhich apps are on your supported version list and how custom app compatibility is tested

How to build the frappe_docker stack step by step

This sequence takes a team from choosing a supported ERPNext line to a containerized site that serves web traffic, runs background jobs and pushes realtime updates through a TLS-protected reverse proxy. Each step ends with a check so problems surface before the next layer is added.

  1. Choose a supported ERPNext version line

    Before touching Docker, pick the ERPNext and Frappe major version your organization will run. Version 14 reached end of life on January 31, 2026, so it should not be the starting point. Version 15 is planned for support until the end of 2027 and version 16 until the end of 2029, according to Frappe's supported versions page. Confirm the chosen line on that page and check the current minor release on the ERPNext releases page. Done means you have a written version pin that the image build, the site and the upgrade plan all reference.

  2. Pull or build the frappe_docker images

    Clone the frappe_docker repository and decide whether to use the published ERPNext image for your pinned version or build your own image. Pulling is the fastest route for a standard ERPNext install. Building is required once you add custom apps. Your engineers or a partner run the build on a machine with access to the registry you will deploy from. Done means the image tag is recorded in your configuration and you can list it in your local image store with the expected version label.

  3. Define the Compose environment and secrets

    Create the environment file that Compose reads, setting the image tag, the database root credential, the site name and the Redis settings. Keep database passwords and API secrets out of version control and load them from your secret store or a restricted file on the host. Confirm the exact variable names against the frappe_docker documentation for the version you pinned, because they change between releases. Done means docker compose config renders the full service definition with no missing variables and no secrets printed in plain text in shared logs.

  4. Bring up MariaDB and Redis

    Start the database and cache services first, before the application containers. ERPNext needs MariaDB for all business data and Redis for caching and queues. Your engineers should confirm the MariaDB character set and collation settings required by the ERPNext version they pinned, and keep the data volume on storage that your backup plan covers. Done means both containers report healthy, the database accepts a login with the configured credential, and Redis answers a ping from inside the Compose network.

  5. Create the first site

    Run the site creation command inside the backend container with the site name, the administrator password and the database settings. This step creates the site database, installs the ERPNext app and runs the initial migration. Because it writes the schema, run it once and record the output. Done means the command finishes without errors, the site directory exists in the shared volume, and logging in to the desk at the site name with the administrator account succeeds from a browser on the internal network.

  6. Start workers, scheduler and Socket.io

    Bring up the background worker, the scheduler and the Socket.io service. Workers process queued jobs such as emails, report generation and imports. The scheduler triggers timed tasks. Socket.io delivers realtime notifications to open browser sessions. Start them one at a time if you are troubleshooting. Done means a background job completes: for example, trigger a test email or a scheduled event and confirm it appears in the Email Queue or Error Log without failures. Then open two browser sessions, change a document in one, and confirm the other receives the update without a page refresh.

  7. Place Nginx or a reverse proxy with TLS in front

    Put the Nginx service or your existing reverse proxy in front of the web container. Terminate TLS at this layer with a certificate issued for the site hostname, and forward the Socket.io path so realtime updates keep working. Your security team should confirm certificate issuance, renewal and the cipher policy against their own standard. Done means the site loads over HTTPS with a valid certificate, the HTTP address redirects to HTTPS, and the realtime test from the previous step still passes through the proxy.

  8. Add custom apps to the image and redeploy

    When you need custom Frappe apps, add them to the image build definition with their source and pinned revision, rebuild the image, and install each app on the site. Run the migration after each install and repeat the worker, scheduler and realtime checks. Keep the rebuild and redeploy as a repeatable procedure, because each new ERPNext minor or major release means rebuilding the image against the new base. Done means the custom app appears in the site's installed app list, its DocTypes load in the desk, and the earlier checks still pass on the new image.

How to build an image with custom apps

A custom Frappe app reaches a running ERPNext site only when it is baked into the image at build time. The frappe_docker build process takes the app's source from a repository and places it into the image alongside the Frappe Framework and ERPNext, so the same image carries both the standard code and your extensions. The practical consequence is that a change to your app is not live until you build a new image and deploy it. Confirm the current build arguments and the app list format in the frappe_docker repository before writing your build pipeline, because these details change between releases.

The app version must match the Frappe Framework and ERPNext versions in the image. A custom app that depends on DocTypes, hooks or APIs from one major version can fail or behave unpredictably on another, so pin the app to a branch or tag that is tested against the exact combination you are shipping. Treat each ERPNext release as a trigger for a rebuild, even a minor one, because the frappe/erpnext releases page shows frequent minor versions for both supported majors. A rebuild that pulls the latest app code without a matching pin is the most common way a working image breaks silently.

Keep the app source, the build configuration and the image version definition in version control, and tag each build so you can trace which commit produced which image. Run the new image in a staging environment with a copy of production data, then execute the migration and your own smoke tests for the custom DocTypes, scripts and integrations before promoting the same image to production. Promote the tested image rather than rebuilding it for production, so the artifact that passed testing is the one that runs. Document who approves the promotion and how you would roll back to the previous tagged image if the migration or your checks fail.

What drives effort in a containerized ERPNext deployment

This table lists the factors that move effort and cost in a frappe_docker deployment and how to keep each one contained. Read it as a checklist for scoping: each driver is a question to answer before the work is quoted. The main takeaway is that custom apps, site count and image handling usually decide the ongoing cost more than the initial Compose setup.

DriverWhy it changes effort or costHow to keep it down
Number of sites and environmentsEach site has its own database, schema and scheduler jobs, and every extra environment (staging, test, production) needs its own copy of the stack and its own upgrade run.Agree the environment count in the written scope, keep one standard Compose layout for every environment, and use staging only for upgrades and custom app tests.
Custom apps and their upgrade costCustom apps are built into the image and must be rebuilt, tested and migrated with each ERPNext release, so their upkeep often exceeds the base platform work.Keep custom apps few and small, pin their versions, and document which ERPNext release each app was tested against.
Image build pipelineImages that include custom apps need a build step, a registry and version tags, and every change to an app means a new image.Build one image per release, tag it with the ERPNext and app versions, and record the build inputs in the repository.
Data volume and backup requirementsLarger MariaDB databases and file stores lengthen backups, restore tests and migration runs, and add storage volumes to manage.Confirm the retention period and recovery time with the business owner, size volumes before go-live, and schedule restore tests as a recurring task.
Integrations and SSOEach LDAP, Social Login Key or REST integration adds configuration, credential handling and testing, and some depend on network paths between containers and outside systems.List every integration in the scope, document the endpoints and credentials, and test each one again after every upgrade.
Network and TLS requirementsTLS termination, certificate renewal, internal routing between Nginx and the web and Socket.io services, and firewall rules differ by network and data center policy.Agree the certificate source, ports and reverse proxy design early, and keep the Compose file as the single record of those settings.
Compliance evidence needsAssessors usually ask for documented configuration, access records, change history and restore test results, which take effort to produce after the fact.Keep the Compose files, environment variable lists and image build records under version control, and collect evidence as part of routine operations. DeployOpen prepares evidence but does not issue audit reports.

How the setup changes by environment

A single host is the simplest way to run ERPNext in containers and suits a pilot, a proof of concept or a small internal team that can tolerate planned downtime. The Compose file brings up the application, MariaDB, Redis, workers, the scheduler, Socket.io and Nginx on one machine, so there is one place to look when something fails. The trade-off is that every component shares the same disk, memory and failure domain, and the frappe_docker single-file demo setup is marked for short-lived evaluation only, so it should not become the pilot.

  • Image sourcing: Pull the official frappe_docker images from a public registry, pinned to a specific tag rather than a moving label, and record the tag in your change log.
  • Updates: Plan downtime for each minor release, take a database and file backup first, then pull the new image and run the migrate step on the site.
  • Storage: Put the MariaDB data volume and the sites directory on storage with snapshots, since both hold state that Compose does not protect for you.
  • Monitoring: Watch container health, disk growth on the database volume, and worker queue backlog through the Frappe logs, with basic host alerts for memory and disk.
  • Exit criteria: Decide before go-live when the pilot moves to a multi-host layout, based on user count and the business impact of an outage.

Before relying on this tab, confirm the current image tags and Compose files in the frappe_docker repository and the backup procedure your team will follow.

Securing secrets, network paths and the container runtime

A Compose-based ERPNext stack exposes several services that should never be reachable from outside the host network. The cards below cover where database and Redis traffic goes, where secrets live, how TLS terminates, which container users run the processes, and when Server Scripts should be allowed.

Keep MariaDB and Redis off public networks

The database and Redis services in the frappe_docker Compose files should sit on an internal Docker network with no published host ports. Only the Nginx or proxy container should accept traffic from outside. Check the rendered Compose file for any ports entry on the db or redis services, and confirm from another host that port 3306 and the Redis port do not answer. Any database port published for convenience during setup should be removed before go-live.

Keep secrets out of images

Database root passwords, the admin password and any API keys belong in environment files or Docker secrets on the host, not in Dockerfiles, build arguments or committed Compose files. Build arguments persist in image history, so a password passed at build time can be read from any copy of the image. Confirm that git history and the custom app image contain no credentials, and that the site configuration file holding database and encryption keys is mounted at runtime and backed up separately.

Terminate TLS at Nginx

Frappe's Nginx container should be the only component handling HTTPS, with certificates mounted from the host or issued by your own certificate process. The web, Socket.io and API paths all pass through it, so a misconfigured proxy exposes the entire site. Check that plain HTTP redirects to HTTPS, that the Socket.io path is proxied with the WebSocket upgrade headers, and that certificate renewal has an owner and a test. Ask your security team which TLS policy they require before choosing protocol versions.

Run containers as least-privilege users

Confirm which user each service runs as inside its container and whether the process needs write access to the image filesystem at all. Application code should be read-only where possible, with writes limited to the sites volume and log locations. Avoid privileged: true and extra Linux capabilities in the Compose file, and review any bind mounts from the host, since a writable mount of a sensitive host path gives a container more reach than the application needs.

Keep Server Scripts disabled by default

Since version 15, Frappe Framework disables Server Scripts unless the server_script_enabled setting is deliberately turned on, because they run Python inside the application. Leave the setting off unless a documented business need requires it, and record who approved the change. If you enable it, review each script like code, restrict who can create them, and check that the setting is not changed by a restore from another environment. Frappe Cloud public shared benches do not allow Server Scripts at all, so plan customizations around that limit if you host there.

Disabled by default
Version 15
Server Script docs

How to verify the stack works and fails safely

Verification should prove that each service in the Compose stack does its job before real users depend on it. Start with a login through the Nginx proxy using a test user on a test site, then confirm the page loads with valid TLS and that the session cookie is set as expected. Next, queue a background job from the desk, such as a bulk report or a document submit that triggers a long-running hook, and confirm the worker container logs show the job starting and finishing. Check the scheduler by creating a scheduled job or a short-interval test task and watching it fire, since a scheduler that is down will fail silently. For realtime, open two browser sessions, trigger a notification from one user, and confirm the other receives it through the Socket.io service. Each of these checks should be written down with the container names, the exact steps and the expected result so a second engineer can repeat them.

Restart tests come next. Restart each container on its own (database, Redis, workers, scheduler, Socket.io, web) and confirm the site recovers without manual repair and that records created before the restart are still present. Then restore a recent backup into a second stack built from the same images and environment file, and confirm the restored site opens, the record counts and last transactions match the source, and background jobs run. Treat a restore that has never been done as unproven. For failure behavior, stop a worker while a job is running and confirm the job is retried or marked failed in the error log, and that the site and database remain consistent with no half-written documents. Also confirm that the demo single-file setup is not the production stack: check that it uses its own bundled database and that production uses external persistent volumes, backups and TLS. Confirm the exact behavior of your frappe_docker version with the project's frappe_docker repository and your own environment before signing off.

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

Once the containers are running, the work shifts to keeping them healthy, recoverable and current. The cards below cover what to watch, what to back up, how minor releases move through staging, and which records let a second engineer run the stack without guessing.

Container health and queue backlog

Watch each service separately: the backend, Socket.io, the scheduler, the background workers, MariaDB and Redis. A healthy web container can hide a stalled worker, so track the length of the background job queues and the scheduler's last run time. Confirm which health checks and metrics your Compose file and host tooling expose, and alert on sustained backlog rather than single spikes.

Database and file backups

Back up the MariaDB data and the site files, which live in the bench sites volume and not in the images. Named volumes are not backed up by default, so confirm the backup job covers every volume that holds site data, private files and the database. Copy backups offsite and test a restore on a separate host before you trust the routine.

Pulling and rebuilding minor releases

Pin the image tag you run and record it in version control. When a new minor release ships, rebuild the custom image from the pinned Frappe and ERPNext versions, rerun your app build, and redeploy in a fixed order with a database backup taken first. Keep the previous image tag available so you can roll back the containers if the new build fails to start.

Minor release cadence

ERPNext minor releases arrive frequently, so an ad hoc upgrade routine will fall behind. Set a fixed cadence, for example a monthly review, and assign an owner to read the release notes, rebuild on staging and approve the production window. Confirm the current support window for your major version before setting the cadence.

ERPNext releases

Staging tests before major moves

Major version moves change schema, scripts and custom app behavior, so run them on a staging copy built from a recent production backup. Test your custom apps, scheduled jobs, integrations and print formats, and time the migration so the production window is realistic. Record each failure and its fix so the production run has no surprises.

Version 15 support ends
Dec 2027
Supported versions

Runbook and configuration records

Keep a runbook with the Compose files, environment settings, image tags, custom app commits, secret locations, backup schedules and restore steps. Store configuration in version control with secrets held in a vault. A second engineer should be able to rebuild the stack from these records alone, so review them after every release.

Questions teams ask before running ERPNext in Docker

Can our own team run frappe_docker without outside help?

Yes, a team with Linux, Docker and Compose experience can run the setup, and the official frappe_docker repository provides the images and Compose files to start from. The harder part is operating it: the stack includes MariaDB, Redis, background workers, the scheduler, Socket.io and Nginx, and each needs its own sizing, restart behavior, backups and upgrade steps. Teams usually check three things before deciding: whether they have someone who can own the stack after go-live, whether they need custom apps baked into images, and whether the setup must pass a compliance review. If any of those is unclear, a partner can review the plan first, and the team can still keep operations in-house.

What drives the effort and cost of a Docker setup?

The main drivers are the number of sites and apps, custom apps that must be built into images, the hosting model, and the security and backup requirements. Self-hosting has no ERPNext license fee, so the cost sits in people and infrastructure. Cost components include:

  • Hosting for hosts or cloud instances, load balancing and storage for the database and files, which recur monthly or yearly.
  • Build and configuration work for images, environment files, TLS and identity settings, which is mostly one-time.
  • Testing, backup and restore verification, and upgrade runs against each new minor release, which recur.
  • Internal admin time for monitoring and on-call coverage.

Ask any provider for a quote that lists these items separately, with each one tied to a written scope.

How long does a frappe_docker deployment usually take?

Duration depends on scope, so no single figure applies. A single-site production setup with standard apps is the shortest path. Custom apps, several sites, identity integration, high availability and compliance evidence each add work. The schedule also depends on how quickly the team supplies hosts, DNS records, TLS certificates and app source code, because most delays come from waiting on those inputs. Ask for a timeline that breaks the work into build, staging, data load, testing and go-live, and check that each phase has an agreed exit condition. Treat the demo single-file setup as a short evaluation only, not as a production plan.

What must our team provide before deployment starts?

The team must provide the infrastructure and the inputs that the setup depends on. Typical items to prepare are:

  • Hosts or cloud accounts with the capacity for the database, cache, workers and web services.
  • DNS records for each site and the public hostname.
  • TLS certificates for Nginx, or a plan to issue them, and the private keys stored securely.
  • Source code for custom apps, with access to the repositories and the versions to build.
  • Secrets such as database passwords, and access to the identity provider if SSO is in scope.

Confirm each item with your infrastructure and security teams early, because access approvals often take longer than the build itself.

Does self-hosting ERPNext require a license fee?

No, self-hosting ERPNext has no license fee. ERPNext is licensed under GPL-3.0 and the underlying Frappe Framework under MIT, according to the license metadata of the frappe/erpnext and frappe/frappe repositories. The ERPNext pricing page states that self-hosting is free, while hosting on Frappe Cloud has its own published plans. Your recurring costs therefore come from infrastructure, staff time, implementation and any support or warranty plan you choose. Check with counsel if you plan to modify and distribute the software, since GPL-3.0 has obligations that apply in that case.

Does Frappe warranty coverage need a matching support plan?

Yes, according to Frappe's supported versions policy, customers must run a listed version and subscribe to a matching Frappe Cloud support plan to receive warranty coverage from Frappe. Check the supported versions page for the current list before you choose a release, because version 14 reached end of life on January 31, 2026, while version 15 and version 16 are still listed. Warranty is separate from implementation work: a partner can build and operate the stack without Frappe warranty, and you should confirm with your provider which coverage applies to your deployment.

Which parts of the stack do engineers check first after go-live?

Engineers should check that each service starts, connects and stays healthy, then verify that the application behaves correctly for users. The services to watch are:

  • MariaDB, for connections, storage growth and backup jobs.
  • Redis, for memory use and queue health.
  • Background workers and the scheduler, for stuck or failing jobs.
  • The Socket.io service, for real-time updates in the browser.
  • Nginx, for TLS termination and routing to the web processes.

Also confirm that backups restore to a test environment, that upgrades run in staging first, and that alerts reach an on-call person. Document each check so the next engineer can repeat it.

How the ERPNext containers connect

The diagram starts with users reaching Nginx on the public side of the boundary. Nginx hands web requests to the backend service and realtime traffic to Socket.io, and both read and write MariaDB and Redis on the internal side. Background workers and the scheduler run from the same custom app image as the web service, so a app added at build time appears in every container. Check that only Nginx is exposed, that the database and Redis stay on the internal network, and that every service uses the same image tag.

Request paths and shared image across the public and internal networks.

How DeployOpen scopes, builds and hands over this work

DeployOpen plans, implements, hardens, documents and supports self-hosted ERPNext inside your own infrastructure, whether that is your cloud accounts, your data center or an air-gapped network. The Docker work described on this page is one part of that. Engagements usually start with a scoping step that records which images and Compose files will run, which services sit on which hosts (the MariaDB database, Redis, the background workers, the scheduler, the Socket.io service and the Nginx front end), which custom apps are included, and who owns each decision. Most engagements are fixed-scope, so the deliverables, the environment assumptions and the acceptance checks are agreed in writing before any build work begins.

The build follows the written scope. Work typically covers the environment and secrets setup, the image build pipeline for any custom apps, the production Compose or orchestration configuration, the backup and restore procedure, and verification on a staging environment that mirrors production. Handover is a set of documents your team can run without us: an architecture record, runbooks for upgrades and rollbacks, and a list of open items with owners. Ask any provider to confirm in writing which of these artifacts they deliver and which remain your responsibility. Ongoing support, upgrades and continuous testing are available as a retainer, so you can keep the work in-house, move it to a retainer, or combine the two. A quote follows from the written scope, and the scope should state what happens when an upstream release changes an image or service.

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.