TRIGGER_URL environment variable is ignored and webhook URL always defaults to http://localhost:5001 #20490

Closed
opened 2026-02-21 20:07:41 -05:00 by yindo · 3 comments
Owner

Originally created by @potix2 on GitHub (Nov 22, 2025).

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

1.10.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Set the environment variable TRIGGER_URL to a custom value (e.g., https://example.com) in the Dify API or worker container.
  2. Start the Dify services and create an Automation with a Webhook trigger.
  3. Check the generated Webhook URL displayed in the Automation UI.
  4. The URL still begins with the default value http://localhost:5001 instead of the value provided in TRIGGER_URL.

✔️ Expected Behavior

If TRIGGER_URL is set to https://example.com, the generated Webhook URL should start with this value.

For example:

https://example.com/trigger/webhook/

Actual Behavior

http://localhost:5001/trigger/webhook/

Originally created by @potix2 on GitHub (Nov 22, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.10.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Set the environment variable TRIGGER_URL to a custom value (e.g., https://example.com) in the Dify API or worker container. 2. Start the Dify services and create an Automation with a Webhook trigger. 3. Check the generated Webhook URL displayed in the Automation UI. 4. The URL still begins with the default value http://localhost:5001 instead of the value provided in TRIGGER_URL. ### ✔️ Expected Behavior If TRIGGER_URL is set to https://example.com, the generated Webhook URL should start with this value. For example: https://example.com/trigger/webhook/ ### ❌ Actual Behavior http://localhost:5001/trigger/webhook/
yindo added the 🐞 bug label 2026-02-21 20:07:41 -05:00
yindo closed this issue 2026-02-21 20:07:41 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 22, 2025):

Hi @potix2! I'm Dosu and I’m helping the dify team.

The TRIGGER_URL environment variable is used in Dify to set the base for webhook URLs, but it only takes effect if set before the configuration is initialized. In Docker, you should set TRIGGER_URL in your .env file or as an environment variable in your docker-compose.yaml before starting the containers. After making changes, you must restart the containers with docker-compose down and docker-compose up for the new value to be picked up. If you edit the .env file or environment variables after the containers are already running, the change will not apply until you restart them. Double-check for typos in the variable name and verify the value inside the running container if the issue persists. This setup ensures the webhook URL uses your custom TRIGGER_URL instead of the default http://localhost:5001 docker-compose.yaml discussion.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Nov 22, 2025): <!-- Greeting --> Hi @potix2! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify team. <!-- Answer --> The TRIGGER_URL environment variable is used in Dify to set the base for webhook URLs, but it only takes effect if set before the configuration is initialized. In Docker, you should set TRIGGER_URL in your `.env` file or as an environment variable in your `docker-compose.yaml` before starting the containers. After making changes, you must restart the containers with `docker-compose down` and `docker-compose up` for the new value to be picked up. If you edit the `.env` file or environment variables after the containers are already running, the change will not apply until you restart them. Double-check for typos in the variable name and verify the value inside the running container if the issue persists. This setup ensures the webhook URL uses your custom TRIGGER_URL instead of the default [`http://localhost:5001`](https://github.com/langgenius/dify/blob/1dfde240cbfe5dcf42028d0331431e0afd813351/api/configs/feature/__init__.py#L259-L290) [`docker-compose.yaml`](https://github.com/langgenius/dify/blob/1dfde240cbfe5dcf42028d0331431e0afd813351/docker/docker-compose.yaml#L1-L709) [`discussion`](https://github.com/langgenius/dify/discussions/27656#discussioncomment-15036374). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/3926bcd4-f44c-42f0-85ff-8b9c85af369b?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/3926bcd4-f44c-42f0-85ff-8b9c85af369b?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/3926bcd4-f44c-42f0-85ff-8b9c85af369b?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/3926bcd4-f44c-42f0-85ff-8b9c85af369b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3926bcd4-f44c-42f0-85ff-8b9c85af369b?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/3926bcd4-f44c-42f0-85ff-8b9c85af369b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/3926bcd4-f44c-42f0-85ff-8b9c85af369b?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20TRIGGER_URL%20environment%20variable%20is%20used%20in%20Dify%20to%20set%20the%20base%20for%20webhook%20URLs%2C%20but%20it%20only%20takes%20effect%20if%20set%20before%20the%20configuration%20is%20initialized.%20In%20Docker%2C%20you%20should%20set%20TRIGGER_URL%20in%20your%20%60.env%60%20file%20or%20as%20an%20environment%20variable%20in%20your%20%60docker-compose.yaml%60%20before%20starting%20the%20containers.%20After%20making%20changes%2C%20you%20must%20restart%20the%20containers%20with%20%60docker-compose%20down%60%20and%20%60docker-compose%20up%60%20for%20the%20new%20value%20to%20be%20picked%20up.%20If%20you%20edit%20the%20%60.env%60%20file%20or%20environment%20variables%20after%20the%20containers%20are%20already%20running%2C%20the%20change%20will%20not%20apply%20until%20you%20restart%20them.%20Double-check%20for%20typos%20in%20the%20variable%20name%20and%20verify%20the%20value%20inside%20the%20running%20container%20if%20the%20issue%20persists.%20This%20setup%20ensures%20the%20webhook%20URL%20uses%20your%20custom%20TRIGGER_URL%20instead%20of%20the%20default%20%5B%60http%3A//localhost%3A5001%60%5D%28https%3A//github.com/langgenius/dify/blob/1dfde240cbfe5dcf42028d0331431e0afd813351/api/configs/feature/__init__.py%23L259-L290%29%20%5B%60docker-compose.yaml%60%5D%28https%3A//github.com/langgenius/dify/blob/1dfde240cbfe5dcf42028d0331431e0afd813351/docker/docker-compose.yaml%23L1-L709%29%20%5B%60discussion%60%5D%28https%3A//github.com/langgenius/dify/discussions/27656%23discussioncomment-15036374%29.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/28534)
Author
Owner

@potix2 commented on GitHub (Nov 22, 2025):

@dosu Thanks for the reply. I’m running Dify on AWS EKS, and as you pointed out, when I checked inside the container I realized that the value wasn’t being passed correctly. Thank you very much.

@potix2 commented on GitHub (Nov 22, 2025): @dosu Thanks for the reply. I’m running Dify on AWS EKS, and as you pointed out, when I checked inside the container I realized that the value wasn’t being passed correctly. Thank you very much.
Author
Owner

@dosubot[bot] commented on GitHub (Nov 22, 2025):

You're welcome! Happy to help—let me know if you run into any other issues with your AWS EKS setup or Dify configuration.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Nov 22, 2025): <!-- Answer --> You're welcome! Happy to help—let me know if you run into any other issues with your AWS EKS setup or Dify configuration. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/92750c31-9b3e-4027-a9bc-3c55a7bf56a8?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/92750c31-9b3e-4027-a9bc-3c55a7bf56a8?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/92750c31-9b3e-4027-a9bc-3c55a7bf56a8?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/92750c31-9b3e-4027-a9bc-3c55a7bf56a8?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/92750c31-9b3e-4027-a9bc-3c55a7bf56a8?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/92750c31-9b3e-4027-a9bc-3c55a7bf56a8?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/92750c31-9b3e-4027-a9bc-3c55a7bf56a8?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=You%27re%20welcome%21%20Happy%20to%20help%E2%80%94let%20me%20know%20if%20you%20run%20into%20any%20other%20issues%20with%20your%20AWS%20EKS%20setup%20or%20Dify%20configuration.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/28534)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20490