[DOCS]: Why can't files be downloaded after the update? #245

Closed
opened 2026-02-16 05:19:33 -05:00 by yindo · 9 comments
Owner

Originally created by @zzzhhhlll on GitHub (Sep 28, 2025).

Type of Documentation Change

Error/Typo fix

Documentation Page URL or Path

No response

Current Content

ImageAfter the update, when using the markdown to Word plugin to output a file, clicking download does not respond. Upon tracking, the file URL starts with http://api:5001/files/tools/xxxxxxxxxxxxxxxxxxxxxxxxx, and clicking it has no effect.

Suggested Changes

no

Reason for Change

No response

Code of Conduct

  • I agree to follow Dify's documentation contribution guidelines
  • 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.
Originally created by @zzzhhhlll on GitHub (Sep 28, 2025). ### Type of Documentation Change Error/Typo fix ### Documentation Page URL or Path _No response_ ### Current Content <img width="253" height="389" alt="Image" src="https://github.com/user-attachments/assets/310644a5-c1ec-41dd-a705-25fa0a5c263a" />After the update, when using the markdown to Word plugin to output a file, clicking download does not respond. Upon tracking, the file URL starts with http://api:5001/files/tools/xxxxxxxxxxxxxxxxxxxxxxxxx, and clicking it has no effect. ### Suggested Changes no ### Reason for Change _No response_ ### Code of Conduct - [x] I agree to follow Dify's documentation [contribution guidelines](https://github.com/langgenius/dify/blob/0277a37fcad5ad86aeb239485c27fffd5cd90043/CONTRIBUTING.md) - [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.
yindo added the documentationbug labels 2026-02-16 05:19:33 -05:00
yindo closed this issue 2026-02-16 05:19:33 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 28, 2025):

Hi @zzzhhhlll! I'm Dosu and I’m helping the dify-docs team.

The reason files can't be downloaded after the update is that the file URLs generated by the markdown to Word plugin (and similar tools) use the FILES_URL environment variable from your Dify .env file. If FILES_URL is set to http://api:5001, this only works inside the Docker network—not from your browser—so you get a DNS resolution error like DNS_PROBE_FINISHED_NXDOMAIN when clicking the link.

To fix this, set FILES_URL to a fully-qualified URL that your browser can access, such as http://localhost:5001 or your server's IP address (e.g., http://192.168.x.x:5001), then restart your Docker containers. This will ensure download links work correctly outside Docker. More details and examples are in this issue and the plugin documentation.

This is a configuration issue, not a bug in the plugin or a breaking code change.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Sep 28, 2025): <!-- Greeting --> Hi @zzzhhhlll! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify-docs team. <!-- Answer --> The reason files can't be downloaded after the update is that the file URLs generated by the markdown to Word plugin (and similar tools) use the FILES_URL environment variable from your Dify `.env` file. If FILES_URL is set to `http://api:5001`, this only works inside the Docker network—not from your browser—so you get a DNS resolution error like DNS_PROBE_FINISHED_NXDOMAIN when clicking the link. To fix this, set FILES_URL to a fully-qualified URL that your browser can access, such as `http://localhost:5001` or your server's IP address (e.g., `http://192.168.x.x:5001`), then restart your Docker containers. This will ensure download links work correctly outside Docker. More details and examples are in [this issue](https://github.com/langgenius/dify/issues/25456) and the [plugin documentation](https://github.com/langgenius/dify-official-plugins/blob/ddd09a94068d9e615649cfc8551e2c56d04c9536/tools/llama_parse/README.md). This is a configuration issue, not a bug in the plugin or a breaking code change. <!-- 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/8e3cfb61-755f-4139-a1b6-a423758fddc4?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/8e3cfb61-755f-4139-a1b6-a423758fddc4?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/8e3cfb61-755f-4139-a1b6-a423758fddc4?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/8e3cfb61-755f-4139-a1b6-a423758fddc4?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8e3cfb61-755f-4139-a1b6-a423758fddc4?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/8e3cfb61-755f-4139-a1b6-a423758fddc4?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8e3cfb61-755f-4139-a1b6-a423758fddc4?feedback_type=other)</sup>&nbsp;&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-docs/issues/471)
Author
Owner

@zzzhhhlll commented on GitHub (Sep 28, 2025):

Hi @zzzhhhlll! I'm Dosu and I’m helping the dify-docs team.

The reason files can't be downloaded after the update is that the file URLs generated by the markdown to Word plugin (and similar tools) use the FILES_URL environment variable from your Dify .env file. If FILES_URL is set to http://api:5001, this only works inside the Docker network—not from your browser—so you get a DNS resolution error like DNS_PROBE_FINISHED_NXDOMAIN when clicking the link.

To fix this, set FILES_URL to a fully-qualified URL that your browser can access, such as http://localhost:5001 or your server's IP address (e.g., http://192.168.x.x:5001), then restart your Docker containers. This will ensure download links work correctly outside Docker. More details and examples are in this issue and the plugin documentation.

This is a configuration issue, not a bug in the plugin or a breaking code change.

To reply, just mention @dosu.

How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

I have changed the URLs in the .env file and the yaml file to http://localhost:5001/, but the file still cannot be downloaded after running. Upon tracking, I noticed that the URL still starts with http://api:5001/files/tools. I have also restarted Docker, but the issue persists. How should I configure this?

@zzzhhhlll commented on GitHub (Sep 28, 2025): > Hi [@zzzhhhlll](https://github.com/zzzhhhlll)! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify-docs team. > > The reason files can't be downloaded after the update is that the file URLs generated by the markdown to Word plugin (and similar tools) use the FILES_URL environment variable from your Dify `.env` file. If FILES_URL is set to `http://api:5001`, this only works inside the Docker network—not from your browser—so you get a DNS resolution error like DNS_PROBE_FINISHED_NXDOMAIN when clicking the link. > > To fix this, set FILES_URL to a fully-qualified URL that your browser can access, such as `http://localhost:5001` or your server's IP address (e.g., `http://192.168.x.x:5001`), then restart your Docker containers. This will ensure download links work correctly outside Docker. More details and examples are in [this issue](https://github.com/langgenius/dify/issues/25456) and the [plugin documentation](https://github.com/langgenius/dify-official-plugins/blob/ddd09a94068d9e615649cfc8551e2c56d04c9536/tools/llama_parse/README.md). > > This is a configuration issue, not a bug in the plugin or a breaking code change. > > _To reply, just mention [@dosu](https://go.dosu.dev/dosubot)._ > > How did I do? [Good](https://app.dosu.dev/response-feedback/8e3cfb61-755f-4139-a1b6-a423758fddc4?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/8e3cfb61-755f-4139-a1b6-a423758fddc4?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/8e3cfb61-755f-4139-a1b6-a423758fddc4?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/8e3cfb61-755f-4139-a1b6-a423758fddc4?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8e3cfb61-755f-4139-a1b6-a423758fddc4?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/8e3cfb61-755f-4139-a1b6-a423758fddc4?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8e3cfb61-755f-4139-a1b6-a423758fddc4?feedback_type=other)  [![Join Discord](https://camo.githubusercontent.com/d562c2df5e4567ea41d37f1d91a4da0839d8341037045b103b2da268998de17f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a6f696e2d3538363546323f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465266c6162656c3d)](https://go.dosu.dev/discord-bot) [![Share on X](https://camo.githubusercontent.com/4649f705e2396d6f328dbc8e800a0509c9c17b3b20253b36706c393df124b93d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f582d73686172652d626c61636b)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-docs/issues/471) I have changed the URLs in the .env file and the yaml file to http://localhost:5001/, but the file still cannot be downloaded after running. Upon tracking, I noticed that the URL still starts with http://api:5001/files/tools. I have also restarted Docker, but the issue persists. How should I configure this?
Author
Owner

@dosubot[bot] commented on GitHub (Sep 28, 2025):

Your issue is caused by the INTERNAL_FILES_URL environment variable, which takes precedence over FILES_URL for file URLs in Dify (since v1.7.1). If INTERNAL_FILES_URL is set (often to http://api:5001), Dify will generate internal Docker URLs that aren't accessible from your browser, even if you change FILES_URL and restart Docker.

To fix this, open your docker/.env (or wherever your environment variables are set), and make sure INTERNAL_FILES_URL is unset or left blank. Set FILES_URL to your actual host IP and port (not localhost or api), for example: FILES_URL=http://192.168.x.x:5001. Then run a full restart: docker-compose down && docker-compose up -d to reload the config.

If you still see internal URLs, double-check which .env file Docker Compose is using, and inspect your running containers with docker exec <container> env to confirm the correct values are loaded. More details are in this issue and here.

Let me know if you need help with a specific config or want troubleshooting steps for your setup.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Sep 28, 2025): <!-- Answer --> Your issue is caused by the INTERNAL_FILES_URL environment variable, which takes precedence over FILES_URL for file URLs in Dify (since v1.7.1). If INTERNAL_FILES_URL is set (often to http://api:5001), Dify will generate internal Docker URLs that aren't accessible from your browser, even if you change FILES_URL and restart Docker. To fix this, open your docker/.env (or wherever your environment variables are set), and make sure INTERNAL_FILES_URL is unset or left blank. Set FILES_URL to your actual host IP and port (not localhost or api), for example: `FILES_URL=http://192.168.x.x:5001`. Then run a full restart: `docker-compose down && docker-compose up -d` to reload the config. If you still see internal URLs, double-check which .env file Docker Compose is using, and inspect your running containers with `docker exec <container> env` to confirm the correct values are loaded. More details are in [this issue](https://github.com/langgenius/dify/issues/23118) and [here](https://github.com/langgenius/dify/issues/25490). Let me know if you need help with a specific config or want troubleshooting steps for your setup. <!-- 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/a5213326-a1af-4a33-b1e5-9bff6747d77e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/a5213326-a1af-4a33-b1e5-9bff6747d77e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/a5213326-a1af-4a33-b1e5-9bff6747d77e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/a5213326-a1af-4a33-b1e5-9bff6747d77e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a5213326-a1af-4a33-b1e5-9bff6747d77e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/a5213326-a1af-4a33-b1e5-9bff6747d77e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a5213326-a1af-4a33-b1e5-9bff6747d77e?feedback_type=other)</sup>&nbsp;&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-docs/issues/471)
Author
Owner

@zzzhhhlll commented on GitHub (Sep 28, 2025):

Your issue is caused by the INTERNAL_FILES_URL environment variable, which takes precedence over FILES_URL for file URLs in Dify (since v1.7.1). If INTERNAL_FILES_URL is set (often to http://api:5001), Dify will generate internal Docker URLs that aren't accessible from your browser, even if you change FILES_URL and restart Docker.

To fix this, open your docker/.env (or wherever your environment variables are set), and make sure INTERNAL_FILES_URL is unset or left blank. Set FILES_URL to your actual host IP and port (not localhost or api), for example: FILES_URL=http://192.168.x.x:5001. Then run a full restart: docker-compose down && docker-compose up -d to reload the config.

If you still see internal URLs, double-check which .env file Docker Compose is using, and inspect your running containers with docker exec <container> env to confirm the correct values are loaded. More details are in this issue and here.

Let me know if you need help with a specific config or want troubleshooting steps for your setup.

To reply, just mention @dosu.

How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

Because I'm doing a local deployment, I want to change it to http://localhost:5001/, but even after changing it to http://localhost:5001/, it still can't be downloaded.

@zzzhhhlll commented on GitHub (Sep 28, 2025): > Your issue is caused by the INTERNAL_FILES_URL environment variable, which takes precedence over FILES_URL for file URLs in Dify (since v1.7.1). If INTERNAL_FILES_URL is set (often to http://api:5001), Dify will generate internal Docker URLs that aren't accessible from your browser, even if you change FILES_URL and restart Docker. > > To fix this, open your docker/.env (or wherever your environment variables are set), and make sure INTERNAL_FILES_URL is unset or left blank. Set FILES_URL to your actual host IP and port (not localhost or api), for example: `FILES_URL=http://192.168.x.x:5001`. Then run a full restart: `docker-compose down && docker-compose up -d` to reload the config. > > If you still see internal URLs, double-check which .env file Docker Compose is using, and inspect your running containers with `docker exec <container> env` to confirm the correct values are loaded. More details are in [this issue](https://github.com/langgenius/dify/issues/23118) and [here](https://github.com/langgenius/dify/issues/25490). > > Let me know if you need help with a specific config or want troubleshooting steps for your setup. > > _To reply, just mention [@dosu](https://go.dosu.dev/dosubot)._ > > How did I do? [Good](https://app.dosu.dev/response-feedback/a5213326-a1af-4a33-b1e5-9bff6747d77e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/a5213326-a1af-4a33-b1e5-9bff6747d77e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/a5213326-a1af-4a33-b1e5-9bff6747d77e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/a5213326-a1af-4a33-b1e5-9bff6747d77e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a5213326-a1af-4a33-b1e5-9bff6747d77e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/a5213326-a1af-4a33-b1e5-9bff6747d77e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a5213326-a1af-4a33-b1e5-9bff6747d77e?feedback_type=other)  [![Join Discord](https://camo.githubusercontent.com/d562c2df5e4567ea41d37f1d91a4da0839d8341037045b103b2da268998de17f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a6f696e2d3538363546323f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465266c6162656c3d)](https://go.dosu.dev/discord-bot) [![Share on X](https://camo.githubusercontent.com/4649f705e2396d6f328dbc8e800a0509c9c17b3b20253b36706c393df124b93d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f582d73686172652d626c61636b)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-docs/issues/471) Because I'm doing a local deployment, I want to change it to http://localhost:5001/, but even after changing it to http://localhost:5001/, it still can't be downloaded.
Author
Owner

@dosubot[bot] commented on GitHub (Sep 28, 2025):

The reason you still see file URLs like http://api:5001/... is because the INTERNAL_FILES_URL environment variable takes precedence over FILES_URL in Dify. If INTERNAL_FILES_URL is set (even if you change FILES_URL and restart Docker), Dify will generate internal Docker URLs that aren't accessible from your browser details.

To fix this for local deployment, open your .env file and make sure INTERNAL_FILES_URL is unset or left blank. Set FILES_URL to your host's LAN IP and port (for example, FILES_URL=http://192.168.x.x:5001), not localhost—because inside Docker, localhost refers to the container itself, not your host machine reference. Then run a full restart: docker-compose down && docker-compose up -d.

After restarting, check that your containers are using the correct environment variables with docker exec <container> env. Try accessing the file URL directly from your browser to confirm it's reachable.

If downloads still fail, double-check your Docker port mapping, firewall settings, and volume permissions. You can use an IP address with a port for FILES_URL—there’s no requirement for a domain name example.

Leaving INTERNAL_FILES_URL empty is the intended way to have Dify generate external URLs for file downloads docs. There’s no frontend or plugin workaround—correct environment variable configuration is required.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Sep 28, 2025): <!-- Answer --> The reason you still see file URLs like `http://api:5001/...` is because the INTERNAL_FILES_URL environment variable takes precedence over FILES_URL in Dify. If INTERNAL_FILES_URL is set (even if you change FILES_URL and restart Docker), Dify will generate internal Docker URLs that aren't accessible from your browser [details](https://github.com/langgenius/dify/issues/23118). To fix this for local deployment, open your `.env` file and make sure INTERNAL_FILES_URL is unset or left blank. Set FILES_URL to your host's LAN IP and port (for example, `FILES_URL=http://192.168.x.x:5001`), not `localhost`—because inside Docker, `localhost` refers to the container itself, not your host machine [reference](https://github.com/langgenius/dify/issues/16309). Then run a full restart: `docker-compose down && docker-compose up -d`. After restarting, check that your containers are using the correct environment variables with `docker exec <container> env`. Try accessing the file URL directly from your browser to confirm it's reachable. If downloads still fail, double-check your Docker port mapping, firewall settings, and volume permissions. You can use an IP address with a port for FILES_URL—there’s no requirement for a domain name [example](https://github.com/langgenius/dify/issues/23631). Leaving INTERNAL_FILES_URL empty is the intended way to have Dify generate external URLs for file downloads [docs](https://github.com/langgenius/dify/pull/21382). There’s no frontend or plugin workaround—correct environment variable configuration is required. <!-- 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/c5b607bb-2efe-4c6d-9232-ffc2d191845b?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/c5b607bb-2efe-4c6d-9232-ffc2d191845b?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/c5b607bb-2efe-4c6d-9232-ffc2d191845b?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/c5b607bb-2efe-4c6d-9232-ffc2d191845b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c5b607bb-2efe-4c6d-9232-ffc2d191845b?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/c5b607bb-2efe-4c6d-9232-ffc2d191845b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c5b607bb-2efe-4c6d-9232-ffc2d191845b?feedback_type=other)</sup>&nbsp;&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-docs/issues/471)
Author
Owner

@zzzhhhlll commented on GitHub (Sep 28, 2025):

The reason you still see file URLs like http://api:5001/... is because the INTERNAL_FILES_URL environment variable takes precedence over FILES_URL in Dify. If INTERNAL_FILES_URL is set (even if you change FILES_URL and restart Docker), Dify will generate internal Docker URLs that aren't accessible from your browser details.

To fix this for local deployment, open your .env file and make sure INTERNAL_FILES_URL is unset or left blank. Set FILES_URL to your host's LAN IP and port (for example, FILES_URL=http://192.168.x.x:5001), not localhost—because inside Docker, localhost refers to the container itself, not your host machine reference. Then run a full restart: docker-compose down && docker-compose up -d.

After restarting, check that your containers are using the correct environment variables with docker exec <container> env. Try accessing the file URL directly from your browser to confirm it's reachable.

If downloads still fail, double-check your Docker port mapping, firewall settings, and volume permissions. You can use an IP address with a port for FILES_URL—there’s no requirement for a domain name example.

Leaving INTERNAL_FILES_URL empty is the intended way to have Dify generate external URLs for file downloads docs. There’s no frontend or plugin workaround—correct environment variable configuration is required.

To reply, just mention @dosu.

How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

I checked the ports and only found 5001/tcp, but didn't see anything like 0.0.0.0:5001->5001/tcp. Does this mean the port isn't mapped?

@zzzhhhlll commented on GitHub (Sep 28, 2025): > The reason you still see file URLs like `http://api:5001/...` is because the INTERNAL_FILES_URL environment variable takes precedence over FILES_URL in Dify. If INTERNAL_FILES_URL is set (even if you change FILES_URL and restart Docker), Dify will generate internal Docker URLs that aren't accessible from your browser [details](https://github.com/langgenius/dify/issues/23118). > > To fix this for local deployment, open your `.env` file and make sure INTERNAL_FILES_URL is unset or left blank. Set FILES_URL to your host's LAN IP and port (for example, `FILES_URL=http://192.168.x.x:5001`), not `localhost`—because inside Docker, `localhost` refers to the container itself, not your host machine [reference](https://github.com/langgenius/dify/issues/16309). Then run a full restart: `docker-compose down && docker-compose up -d`. > > After restarting, check that your containers are using the correct environment variables with `docker exec <container> env`. Try accessing the file URL directly from your browser to confirm it's reachable. > > If downloads still fail, double-check your Docker port mapping, firewall settings, and volume permissions. You can use an IP address with a port for FILES_URL—there’s no requirement for a domain name [example](https://github.com/langgenius/dify/issues/23631). > > Leaving INTERNAL_FILES_URL empty is the intended way to have Dify generate external URLs for file downloads [docs](https://github.com/langgenius/dify/pull/21382). There’s no frontend or plugin workaround—correct environment variable configuration is required. > > _To reply, just mention [@dosu](https://go.dosu.dev/dosubot)._ > > How did I do? [Good](https://app.dosu.dev/response-feedback/c5b607bb-2efe-4c6d-9232-ffc2d191845b?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/c5b607bb-2efe-4c6d-9232-ffc2d191845b?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/c5b607bb-2efe-4c6d-9232-ffc2d191845b?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/c5b607bb-2efe-4c6d-9232-ffc2d191845b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c5b607bb-2efe-4c6d-9232-ffc2d191845b?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/c5b607bb-2efe-4c6d-9232-ffc2d191845b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c5b607bb-2efe-4c6d-9232-ffc2d191845b?feedback_type=other)  [![Join Discord](https://camo.githubusercontent.com/d562c2df5e4567ea41d37f1d91a4da0839d8341037045b103b2da268998de17f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a6f696e2d3538363546323f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465266c6162656c3d)](https://go.dosu.dev/discord-bot) [![Share on X](https://camo.githubusercontent.com/4649f705e2396d6f328dbc8e800a0509c9c17b3b20253b36706c393df124b93d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f582d73686172652d626c61636b)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-docs/issues/471) I checked the ports and only found 5001/tcp, but didn't see anything like 0.0.0.0:5001->5001/tcp. Does this mean the port isn't mapped?
Author
Owner

@dosubot[bot] commented on GitHub (Sep 28, 2025):

Yes, if you only see 5001/tcp and not 0.0.0.0:5001->5001/tcp in your Docker port mapping, it means port 5001 is exposed inside the container but is not mapped to your host—so it’s not accessible from your browser or other devices on your network. This is why file downloads fail even after fixing your environment variables.

To fix this, edit your docker-compose.yml and under the api service, add:

ports:
  - "5001:5001"

Then restart your containers with:

docker-compose down && docker-compose up -d

After restarting, run docker ps and confirm you see 0.0.0.0:5001->5001/tcp for the api container. Now, with INTERNAL_FILES_URL unset and FILES_URL set to your host’s LAN IP (not localhost), file download links should work from your browser. This setup is required for external access to the file server and for Dify’s generated URLs to be reachable source source source.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Sep 28, 2025): <!-- Answer --> Yes, if you only see 5001/tcp and not 0.0.0.0:5001->5001/tcp in your Docker port mapping, it means port 5001 is exposed inside the container but is not mapped to your host—so it’s not accessible from your browser or other devices on your network. This is why file downloads fail even after fixing your environment variables. To fix this, edit your docker-compose.yml and under the api service, add: ```yaml ports: - "5001:5001" ``` Then restart your containers with: ``` docker-compose down && docker-compose up -d ``` After restarting, run `docker ps` and confirm you see 0.0.0.0:5001->5001/tcp for the api container. Now, with INTERNAL_FILES_URL unset and FILES_URL set to your host’s LAN IP (not localhost), file download links should work from your browser. This setup is required for external access to the file server and for Dify’s generated URLs to be reachable [source](https://github.com/langgenius/dify/issues/24827) [source](https://github.com/langgenius/dify/issues/13568) [source](https://github.com/langgenius/dify/issues/26141). <!-- 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/a383fd3f-bf49-4041-a63e-ad69312794b9?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/a383fd3f-bf49-4041-a63e-ad69312794b9?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/a383fd3f-bf49-4041-a63e-ad69312794b9?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/a383fd3f-bf49-4041-a63e-ad69312794b9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a383fd3f-bf49-4041-a63e-ad69312794b9?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/a383fd3f-bf49-4041-a63e-ad69312794b9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a383fd3f-bf49-4041-a63e-ad69312794b9?feedback_type=other)</sup>&nbsp;&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-docs/issues/471)
Author
Owner

@zzzhhhlll commented on GitHub (Sep 28, 2025):

Yes, if you only see 5001/tcp and not 0.0.0.0:5001->5001/tcp in your Docker port mapping, it means port 5001 is exposed inside the container but is not mapped to your host—so it’s not accessible from your browser or other devices on your network. This is why file downloads fail even after fixing your environment variables.

To fix this, edit your docker-compose.yml and under the api service, add:

ports:

  • "5001:5001"
    Then restart your containers with:
docker-compose down && docker-compose up -d

After restarting, run docker ps and confirm you see 0.0.0.0:5001->5001/tcp for the api container. Now, with INTERNAL_FILES_URL unset and FILES_URL set to your host’s LAN IP (not localhost), file download links should work from your browser. This setup is required for external access to the file server and for Dify’s generated URLs to be reachable source source source.

To reply, just mention @dosu.

How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

OK, it's working now. Thank you very much.

@zzzhhhlll commented on GitHub (Sep 28, 2025): > Yes, if you only see 5001/tcp and not 0.0.0.0:5001->5001/tcp in your Docker port mapping, it means port 5001 is exposed inside the container but is not mapped to your host—so it’s not accessible from your browser or other devices on your network. This is why file downloads fail even after fixing your environment variables. > > To fix this, edit your docker-compose.yml and under the api service, add: > > ports: > - "5001:5001" > Then restart your containers with: > > ``` > docker-compose down && docker-compose up -d > ``` > > After restarting, run `docker ps` and confirm you see 0.0.0.0:5001->5001/tcp for the api container. Now, with INTERNAL_FILES_URL unset and FILES_URL set to your host’s LAN IP (not localhost), file download links should work from your browser. This setup is required for external access to the file server and for Dify’s generated URLs to be reachable [source](https://github.com/langgenius/dify/issues/24827) [source](https://github.com/langgenius/dify/issues/13568) [source](https://github.com/langgenius/dify/issues/26141). > > _To reply, just mention [@dosu](https://go.dosu.dev/dosubot)._ > > How did I do? [Good](https://app.dosu.dev/response-feedback/a383fd3f-bf49-4041-a63e-ad69312794b9?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/a383fd3f-bf49-4041-a63e-ad69312794b9?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/a383fd3f-bf49-4041-a63e-ad69312794b9?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/a383fd3f-bf49-4041-a63e-ad69312794b9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a383fd3f-bf49-4041-a63e-ad69312794b9?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/a383fd3f-bf49-4041-a63e-ad69312794b9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a383fd3f-bf49-4041-a63e-ad69312794b9?feedback_type=other)  [![Join Discord](https://camo.githubusercontent.com/d562c2df5e4567ea41d37f1d91a4da0839d8341037045b103b2da268998de17f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a6f696e2d3538363546323f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465266c6162656c3d)](https://go.dosu.dev/discord-bot) [![Share on X](https://camo.githubusercontent.com/4649f705e2396d6f328dbc8e800a0509c9c17b3b20253b36706c393df124b93d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f582d73686172652d626c61636b)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-docs/issues/471) OK, it's working now. Thank you very much.
Author
Owner

@dosubot[bot] commented on GitHub (Oct 10, 2025):

Hi, @zzzhhhlll. I'm Dosu, and I'm helping the dify-docs team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that after an update, the markdown to Word plugin's download button was unresponsive due to file URLs starting with "http://api:5001", which are inaccessible from the browser.
  • The root cause was identified as the INTERNAL_FILES_URL environment variable taking precedence over FILES_URL.
  • The recommended fix was to unset INTERNAL_FILES_URL, set FILES_URL to the host's LAN IP with port 5001, and ensure Docker port 5001 is properly mapped in docker-compose.yml.
  • After applying these changes and restarting Docker, you confirmed that the downloads worked successfully.

Next Steps:

  • Please confirm if this issue is still relevant with the latest version of the dify-docs repository by commenting here.
  • If no further updates are provided, I will automatically close this issue in 5 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Oct 10, 2025): Hi, @zzzhhhlll. I'm [Dosu](https://dosu.dev), and I'm helping the dify-docs team manage their backlog and am marking this issue as stale. Issue Summary: - You reported that after an update, the markdown to Word plugin's download button was unresponsive due to file URLs starting with "http://api:5001", which are inaccessible from the browser. - The root cause was identified as the INTERNAL_FILES_URL environment variable taking precedence over FILES_URL. - The recommended fix was to unset INTERNAL_FILES_URL, set FILES_URL to the host's LAN IP with port 5001, and ensure Docker port 5001 is properly mapped in docker-compose.yml. - After applying these changes and restarting Docker, you confirmed that the downloads worked successfully. Next Steps: - Please confirm if this issue is still relevant with the latest version of the dify-docs repository by commenting here. - If no further updates are provided, I will automatically close this issue in 5 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-docs#245