Repository navigation
Description
Self Checks
- I have read the Contributing Guide and Language Policy.
- This is only for bug report, if you would like to ask a question, please head to Discussions.
- I have searched for existing issues search for existing issues, including closed ones.
- I confirm that I am using English to submit this report, otherwise it will be closed.
- 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- Please do not modify this template :) and fill in all the required fields.
Dify version
main at 5e3edb5f34; the default Compose services use Dify 1.18.0 images.
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
In a clean checkout at the revision above:
- Copy
docker/.env.exampletodocker/.env, leaving optional service overrides absent. - Copy
docker/envs/infrastructure/nginx.env.exampletonginx.envin the same directory and setNGINX_CLIENT_MAX_BODY_SIZE=200M. - Copy
docker/envs/core-services/sandbox.env.exampletosandbox.envin the same directory and setSANDBOX_WORKER_TIMEOUT=120. - Run
docker compose config --format jsonfromdocker/with a recent Compose release and inspect the nginx, sandbox, and plugin daemon environments.
✔️ Expected Behavior
Users can copy the root .env.example to .env, fill in the necessary deployment inputs, and start with plain docker compose up -d.
Categorized service defaults load automatically. Users can customize a service by copying its defaults file to the existing service .env path and editing that copy. Root .env overrides service settings, and its example remains limited to required manual inputs. No extra root configuration template or --env-file option is needed.
The nginx limit becomes 200M, the sandbox's native WORKER_TIMEOUT becomes 120, and the plugin daemon receives the bundled database and Redis connection defaults.
❌ Actual Behavior
- nginx does not load its categorized env file, so its upload limit remains
100M. - The sandbox's explicit Compose
environmentmapping resolvesSANDBOX_WORKER_TIMEOUTbefore service env files are read and overrides their values, leavingWORKER_TIMEOUT=15. - The same pattern affects web, plugin daemon, Agent backend, infrastructure, and vector-store settings, including values translated into different container variable names.
- Database startup commands and some health checks also interpolate project variables before service env files are loaded.
- After refactor(tracing): one trace pipeline behind a minimal provider interface #44673 moved Docker connection defaults out of the minimal root template,
plugin_daemondid not includeshared.defaults. Its clean deployment environment omits the intended database and Redis connection values. - The default local Agent sandbox requires an authentication token, but the minimal startup template does not expose that required input.
This follows the categorized env layout introduced in #31586 and the overlapping configuration-ownership concerns in #43702. The fix should retain the small root template, make copied service files effective, and clearly identify Compose-level settings such as ports, volumes, and profiles that must remain root .env inputs.
Activity
dosubot commentedon Nov 2, 2026
There is another related report worth linking: #40415 describes service-file overrides being ignored by
ssrf_proxy. Its follow-up proposes regression checks for override precedence and preventing unrelated root secrets from entering the proxy container. That is a useful constraint here: loading the whole root.envinto every infrastructure service would address some overrides but broaden secret exposure. [1]Two implementation details matter for this fix:
generate_docker_composecopies the Compose template, but its default mode also creates missing categorized.envfiles.--compose-onlyskips that creation. I would test the clean-checkout path separately from generation with those files present, so generation does not mask missing bundled defaults. [2] [3]NGINX_PORTandNGINX_SSL_PORTare used both inside the container and in Compose port mappings. Unlike the upload limit, moving their configuration entirely into a service env file would leave the host mapping unresolved from that file. These need explicit ownership as Compose-level inputs. [4]Adding
shared.defaultsalone also would not fix renamed settings: the sandbox still mapsSANDBOX_WORKER_TIMEOUTtoWORKER_TIMEOUTthrough Compose interpolation. That translation needs coverage alongside the env-file layering. [5]To reply, just mention @dosu.
Docs are dead. Just use Dosu.