> For the complete documentation index, see [llms.txt](https://docs.joobq.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.joobq.io/guides/configuration.md). Agents can also search and read this documentation through its [MCP server](https://docs.joobq.io/~gitbook/mcp).

# Configuration

Give producers, workers, and inspection tools one predictable boot configuration.

Start with the [supported dependency graph](https://docs.joobq.io/readme/compatibility.md). Then give every process the same job definitions, Redis endpoint, and queue registrations. Keep process startup separate from configuration.

## Use a shared initializer

A small application can use this layout:

```
src/
  jobs/process_order_job.cr   # Type and perform method
  initializers/joobq.cr       # Requires jobs; configures store and queues
  enqueue_order.cr           # Requires initializer; admits work
  worker.cr                  # Requires initializer; starts workers
```

The [queue guide](https://docs.joobq.io/guides/queues.md) contains both registration variants. On Azu CLI v0.1.59, `azu generate joobq` creates this setup; follow the [Azu walkthrough](https://docs.joobq.io/quick-start/azu-application.md) before modifying its generated YAML.

Do not call `forge`, register recurring callbacks, or start a Pro worker in a shared inspection initializer. Those actions start work. CLI status and dashboard adapters load the initializer too.

## Supply Redis settings before boot

For a disposable local development instance:

```sh
export REDIS_URL=redis://127.0.0.1:6379/0
export REDIS_POOL_SIZE=20
crystal run src/worker.cr
```

`RedisStore.from_env` gives a nonempty `REDIS_URL` precedence over legacy host/port/password variables. Set environment values before configuration creates the store. Replacing a variable after a pool exists does not reconnect that pool to a different endpoint.

Production connections should use verified TLS and secret-managed credentials. See the [Redis options and defaults](https://docs.joobq.io/configuration/redis.md). Pool size is per configured pool, so budget across all processes and replicas.

## Choose one loading path

The framework supports programmatic configuration and YAML discovery/loading. An explicit queue initializer is straightforward; a generated YAML setup is also valid. Avoid loading one configuration and then silently replacing it in another initializer.

Environment-specific discovery and `JOOBQ_CONFIG_PATH`/`JOOBQ_CONFIG_FILE` have ordering rules; those variables are not unconditional overrides of earlier files. Check the [configuration reference](https://docs.joobq.io/configuration.md) and inspect effective queue registrations without printing credentials.

## Enable only what you need

Keep `rest_api_enabled = false` unless you need the management listener. When enabled, provide at least one distinct role token of 32 bytes or more. A reader-only token configuration is supported; see [management access](https://docs.joobq.io/configuration/access.md).

The configured seven-day `dead_letter_ttl` is not enforced by the released Redis DLQ implementation. Plan retention explicitly. Likewise, `config.timeout` does not kill running job fibers. Treat configuration names as API inputs, not guarantees beyond their implementation.

**Next:** [Worker lifecycle](https://docs.joobq.io/guides/workers.md), [clients](https://docs.joobq.io/guides/clients.md), and [production deployment](https://docs.joobq.io/production-deployment.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://docs.joobq.io/guides/configuration.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.
