> For the complete documentation index, see [llms.txt](https://coldbox.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://coldbox.ortusbooks.com/reference/deployment.md).

# Deployment

Deploying ColdBox to production — best practices, production checklist, and engine guidance.

ColdBox applications deploy on three engines — **BoxLang (recommended)**, Adobe ColdFusion, and Lucee. This page covers the engine-agnostic essentials; per-engine specifics live in [BoxLang Runtimes](/reference/deployment/boxlang-runtimes.md) and [Adobe & Lucee](/reference/deployment/other-engines.md).

## Server Requirements

* A JVM (BoxLang and Lucee 6+ run on modern JDKs; Adobe CF 2023 bundles its own)
* [CommandBox](https://commandbox.com) for server orchestration (recommended for all engines)
* Your application's dependencies installed: `box install`

## Production Configuration

### Turn debug output off

In production, `debugMode` must be `false` in your `ColdBox` class — debug mode exposes framework internals in error output. Environment detection can do this automatically:

```javascript
// config/ColdBox.bx
environments : {
    development : "localhost,^dev\.",
    production  : ".*"
}

function development(){
    coldbox.debugMode = true
}
```

### Protect reinitialization

Never expose `?fwreinit=1` publicly. Set a strong `reinitPassword` and reinit through it:

```javascript
coldbox.reinitPassword = getSystemSetting( "CB_REINIT_PASSWORD" )
```

### Externalize secrets

Keep credentials out of source control with a `.env` file and `getSystemSetting()` — see [System Settings](/getting-started/configuration/system-settings.md).

### Enable caching

* `handlerCaching`, `eventCaching`, and `viewCaching` should be `true` in production
* Configure real [CacheBox](/reference/configuration-directives/cachebox.md) caches — the default in-memory cache doesn't scale across instances

## Health Checks

Give your load balancer / uptime monitor a dedicated route:

```javascript
// config/Router.bx
route( "/health" ).toResponse( () => { "status" : "ok" } )
```

## Scheduled Tasks & Workers

* [Scheduled tasks](/digging-deeper/scheduled-tasks.md) run in-process — use server fixation (`onOneServer()`) on multi-instance deployments so tasks don't duplicate
* [cbq](/ecosystem/queues.md) workers are long-running processes — supervise them (systemd, Docker restart policy, platform process manager) and restart on every deploy

## See Also

* [Engine Support & Differences](/reference/engine-support.md)
* [Configuration Directives](/reference/configuration-directives.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://coldbox.ortusbooks.com/reference/deployment.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
