[Tutorial] ERPNext v16 – Local Docker Setup for Development

ERPNext v16 – Local Docker Setup for Development

Note

  • Use Git Bash on Windows (do not use CMD or PowerShell)

  • This setup is for development only, not for production


Prerequisites

  • Docker (latest version)

  • OS: Any

  • RAM: Minimum 8 GB

  • Python: >=3.14 and <3.15

  • Node.js: 24


Step 1: Clone Frappe Docker Repository

Clone the repository:

git clone https://github.com/frappe/frappe_docker

Rename the folder to avoid conflict with other versions:

mv frappe_docker frappe_docker_v16_demo

Go into the directory:

cd frappe_docker_v16_demo

Step 2: Setup Devcontainer and VS Code Config

Copy devcontainer example:

cp -R devcontainer-example .devcontainer

Copy VS Code config for debugging:

cp -R development/vscode-example development/.vscode

Open the project in VS Code:

code .

Step 3: VS Code Extension (Optional)

You can ignore this step if VS Code auto-prompts.

Install Dev Containers extension:

code --install-extension ms-vscode-remote.remote-containers

Ensure you are using Git Bash on Windows.


Step 4: Open Project in Dev Container

From VS Code Command Palette (Ctrl + Shift + P):

Dev Containers: Reopen in Container

Step 5: Install and Use Node.js 24

Install Node 24:

nvm install 24
nvm use 24

Verify Node version:

node -v

Step 6: Install Python 3.14 (Stable)

List available Python versions:

pyenv install --list | grep 3.14

Install stable version (example: 3.14.0):

pyenv uninstall 3.14.0
pyenv install 3.14.0
pyenv global 3.14.0

Step 7: Fix Yarn (Required)

Enable corepack:

corepack enable

Install required Yarn version:

corepack prepare yarn@1.22.22 --activate

Verify Yarn:

which yarn
yarn -v

Step 8: Initialize Bench (Frappe v16)

Run bench init:

PYENV_VERSION=3.14.0 bench init --skip-redis-config-generation --frappe-branch version-16 frappe-bench

Go into bench directory:

cd frappe-bench

Step 9: Configure Docker Hosts

Run inside the container:

bench set-config -g db_host mariadb
bench set-config -g redis_cache redis://redis-cache:6379
bench set-config -g redis_queue redis://redis-queue:6379
bench set-config -g redis_socketio redis://redis-queue:6379

Step 10: Create a New Site

Create site:

bench new-site --db-root-password 123 --admin-password admin --mariadb-user-host-login-scope=% development16.localhost

Step 11: Enable Developer Mode

Enable developer mode:

bench --site development16.localhost set-config developer_mode 1
bench --site development16.localhost clear-cache

Step 12: Install Apps

ERPNext

bench get-app --branch version-16 --resolve-deps erpnext
bench --site development16.localhost install-app erpnext

HRMS

bench get-app --branch version-16 hrms
bench --site development16.localhost install-app hrms

India Compliance (for India only)

bench get-app --branch version-16 https://github.com/resilient-tech/india-compliance.git
bench --site development16.localhost install-app india_compliance

Email Delivery Service

bench get-app --branch main https://github.com/frappe/email_delivery_service.git
bench --site development16.localhost install-app email_delivery_service

Step 13: Migrate and Build

Select site:

bench use development16.localhost

Run migrate:

bench migrate

Run build:

bench build

Step 14: Start Bench

Start development server:

bench start

Final Note

You are now running ERPNext v16 successfully :rocket:
For custom development, reply in this forum thread or message me.

Happy Coding!

9 Likes

FOR Version-15 Setup

Thanks @Antony_Praveenkumar! Works well.

But I seem to not be able to install the CRM. What is the process to get the CRM running in this setup?

Could you please post the error while install the CRM ??

@Antony_Praveenkumar I tried some different approaches. I basically do bench get-app crm and install-app and after bench build, I always get the following error:

rendering chunks (97)…Killed
error Command failed with exit code 137.
info Visit yarn run | Yarn for documentation about this command.
error Command failed with exit code 137.
info Visit yarn run | Yarn for documentation about this command.
Error: Command failed: yarn build
at genericNodeError (node:internal/errors:985:15)
at wrappedFn (node:internal/errors:539:14)
at checkExecSyncError (node:child_process:925:11)
at execSync (node:child_process:997:15)
at run_build_command_for_apps (/workspace/development/frappe-bench/apps/frappe/esbuild/esbuild.js:540:3)
at execute (/workspace/development/frappe-bench/apps/frappe/esbuild/esbuild.js:142:23)
at process.processTicksAndRejections (node:internal/process/task_queues:103:5) {
status: 137,
signal: null,
output: [ null, null, null ],
pid: 19726,
stdout: null,
stderr: null
}
error Command failed with exit code 1.
info Visit yarn run | Yarn for documentation about this command.
Traceback (most recent call last):
File “/workspace/development/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 48, in invoke
return super().invoke(ctx)
~~~~~~~~~~~~~~^^^^^
File “/workspace/development/frappe-bench/env/lib/python3.14/site-packages/click/core.py”, line 1873, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File “/workspace/development/frappe-bench/env/lib/python3.14/site-packages/click/core.py”, line 1269, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/workspace/development/frappe-bench/env/lib/python3.14/site-packages/click/core.py”, line 824, in invoke
return callback(*args, **kwargs)
File “/workspace/development/frappe-bench/apps/frappe/frappe/commands/utils.py”, line 90, in build
bundle(
~~~~~~^
mode,
^^^^^
…<6 lines>…
esbuild_target=esbuild_target,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File “/workspace/development/frappe-bench/apps/frappe/frappe/build.py”, line 262, in bundle
frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/workspace/development/frappe-bench/apps/frappe/frappe/commands/init.py”, line 97, in popen
raise subprocess.CalledProcessError(return
, command)
subprocess.CalledProcessError: Command ‘yarn run production --run-build-command’ returned non-zero exit status 1.

Command ‘yarn run production --run-build-command’ returned non-zero exit status 1.

  1. I think the CRM is not prepared to compatible to version-16 i think, becuase I installed version-16 I tried to create lead but its not showing. there is update going on i think.
  2. If you followed all my steps above please follow the below steps to install the crm

RECOMMENDED TO NOT INSTALL FOR PRODUCTION AS OF NOW (Jan-16-2026)

The update will come on future I hope, use below command to install crm in development environment

nvm use 24
bench get-app --branch main crm
bench --site development16.localhost install-app crm

Exit code 137 = process killed by OS due to OUT-OF-MEMORY (OOM).

if your using any server increase the memory

That actually works. I didn’t do “nvm use 24” and i also didnt do “–branch main”. This time I also installed the CRM before ERPNext and started it and did the “bench build” afterwards.

Well, it works! Thanks @Antony_Praveenkumar!

Edit: maybe it was also the Memory-Issue. But in both cases I did it locally on my Macbook, without changing anything with regards to memory allocation.

1 Like

Antony_Praveenkumar do you have tutorials for a docker setup for production?

Yes I have I will post the tutorial later, if need any urgent setup please DM

1 Like

hello, when do you plan to release the docker production?

2 Likes

Thanks a lot your tutorial. :grinning_face_with_smiling_eyes: :star_struck:

I’m using a MacBook Pro M1 and ran into an error earlier because I was using the Docker VMM. Once I switched to the Apple Virtualization Framework, it worked perfectly. I also had a few memory issues, but I just increased the allocated memory for Docker. Your tutorial helped me understand the process much better!

I want to create an app for ERPNext that allows users to search for products using a file explorer-style interface. My goal is to make it easier for older employees who are used to more traditional systems and struggle to adapt to modern search-based workflows.

Again, thanks a lot.

2 Likes

Hello, I just wanted to say thanks. Your guide worked perfectly for my setup

1 Like