Custom Deploy Path
By default, npm run deploy (see the
CLI reference) targets Minecraft for
Windows (Bedrock retail) and auto-detects the install location across
six known layouts. If the auto-detect can't find your install (macOS,
Linux, non-standard location, or a Bedrock variant the search list
misses), you need a custom deploy path.
This guide covers when you need one, how to configure it, and the common paths per platform.
When to use a custom path
Pick deploy.target: "custom" if any of these apply:
- You're on macOS or Linux. The retail auto-detect only works on Windows in 2.0.
- You use Bedrock Preview (the beta channel) rather than retail.
- You target Bedrock Dedicated Server for testing.
- You use Education Edition.
- Your retail install is in a non-standard location (custom user profile, sideloaded install, etc.) where the auto-detect glob can't find it.
If none of those apply, leave deploy.target as "retail" and you're
done.
Configure it
"deploy": {
"target": "custom",
"customPath": "/absolute/path/to/com.mojang"
}The customPath must point at the com.mojang directory itself, the
one that contains development_behavior_packs/ and
development_resource_packs/. Not the parent, not the
development_behavior_packs/ directly.
Validate it
The compiler validates the path on every deploy and throws with exit code 3 if it doesn't exist:
[bedrock-build] Deploy target not found: /path/to/com.mojangIf you see this, double-check that the directory exists and is the
com.mojang directory you expect. See the
CLI reference for exit codes.
Where com.mojang lives on each platform
These are starting points, not guarantees. Bedrock installs vary by launcher, package format, and platform version. If yours differs, trust your filesystem over this table.
Windows (retail Bedrock)
C:\Users\<you>\AppData\Local\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojangYou only need a custom path here if the auto-detect glob fails. For
normal retail installs, leave target as "retail".
Windows (Bedrock Preview)
C:\Users\<you>\AppData\Local\Packages\Microsoft.MinecraftWindowsBeta_8wekyb3d8bbwe\LocalState\games\com.mojangNote the MinecraftWindowsBeta package name. The retail auto-detect
won't find this, so you need a custom path.
macOS (community launcher)
Bedrock isn't officially on macOS. Community launchers (e.g.
mcpelauncher) put files somewhere under ~/Library/Application Support/. A common path:
~/Library/Application Support/mcpelauncher/games/com.mojangSubstitute the actual launcher you're using. Check the launcher's docs for the exact path.
Linux
Similar story to macOS: depends on the launcher. A common path for
the community mcpelauncher:
~/.local/share/mcpelauncher/games/com.mojangOr, if you're using a Flatpak:
~/.var/app/<flatpak-id>/data/mcpelauncher/games/com.mojangBedrock Dedicated Server
The server ships with its own worlds/ and pack directories under the
server install root. Point customPath at the directory that contains
development_behavior_packs/ and development_resource_packs/,
typically the server install root itself.
Education Edition
Education Edition uses a different package identifier on Windows.
Locate the com.mojang directory under the Education Edition install
and point customPath at it.
The compiler doesn't care which Bedrock fork. As long as the
target directory contains development_behavior_packs/ and
development_resource_packs/, the deploy step will write into them
and Minecraft will pick them up. The "retail vs custom" split is just
about whether to auto-detect or use an explicit path.
Tip: keep the path out of git
If you and a teammate use different machines or paths, commit the
config with "target": "retail" and have anyone who needs a custom
path keep a local-only bedrock.config.local.json and pass it via
--config:
npx bedrock-build deploy --config bedrock.config.local.json --watchAdd bedrock.config.local.json to .gitignore. Cleaner than rewriting
the shared config on every clone.
Related
- Config schema:
deploy.targetanddeploy.customPathfor the field reference. - Hot reload setup for the full edit-save-reload loop, which works the same with a custom path.
- CLI reference:
deployfor the command and exit codes.