Skip to content

feat(docker): allow overriding the server config path with CRAWL4AI_CONFIG - #2510

Open
vitlav wants to merge 1 commit into
unclecode:developfrom
vitlav:feature/config-path-env
Open

vitlav wants to merge 1 commit into
unclecode:developfrom
vitlav:feature/config-path-env

Conversation

@vitlav

@vitlav vitlav commented Nov 7, 2026

Copy link
Copy Markdown

What

load_config() in deploy/docker/utils.py always reads config.yml from the directory of the code. This adds an optional CRAWL4AI_CONFIG environment variable that points to another config file.

Why

It lets the server code be installed read-only (for example from a system package under /usr) while the configuration lives elsewhere, such as /etc/crawl4ai/config.yml, and can be changed without modifying installed code.

Compatibility

When CRAWL4AI_CONFIG is not set, the behaviour is unchanged.

Testing

Checked manually: with the variable unset the bundled config.yml is loaded; with CRAWL4AI_CONFIG=/path/to/other.yml that file is loaded and merged over the defaults as before.

…ONFIG

load_config() always read config.yml next to the code. Support an optional CRAWL4AI_CONFIG environment variable pointing to another file, so the server code can be installed read-only (for example from a distribution package) while the configuration lives elsewhere, such as /etc. Without the variable the behaviour is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant