diff --git a/core/src/main/java/lucee/runtime/config/ConfigWebFactory.java b/core/src/main/java/lucee/runtime/config/ConfigWebFactory.java index c543ed4963..d2fee8e431 100644 --- a/core/src/main/java/lucee/runtime/config/ConfigWebFactory.java +++ b/core/src/main/java/lucee/runtime/config/ConfigWebFactory.java @@ -1427,10 +1427,12 @@ private static void createContextFiles(Resource configDir, ServletConfig servlet if (!f.exists() || doNew) createFileFromResourceEL("/resource/context/lucee-context.lar", f); else createFileFromResourceCheckSizeDiffEL("/resource/context/lucee-context.lar", f); - // lucee-admin - f = contextDir.getRealResource("lucee-admin.lar"); - if (!f.exists() || doNew) createFileFromResourceEL("/resource/context/lucee-admin.lar", f); - else createFileFromResourceCheckSizeDiffEL("/resource/context/lucee-admin.lar", f); + // lucee-admin (only deploy if enabled) + if (Caster.toBoolean(SystemUtil.getSystemPropOrEnvVar("lucee.admin.enabled", "true"), true)) { + f = contextDir.getRealResource("lucee-admin.lar"); + if (!f.exists() || doNew) createFileFromResourceEL("/resource/context/lucee-admin.lar", f); + else createFileFromResourceCheckSizeDiffEL("/resource/context/lucee-admin.lar", f); + } // lucee-doc f = contextDir.getRealResource("lucee-doc.lar");