[PR #21382] fix: resolve Docker file URL networking issue for plugins (#21334) #29643

Closed
opened 2026-02-21 20:45:57 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/21382

State: closed
Merged: Yes


Fixes #21334

Problem

Using STORAGE_TYPE=local and FILES_URL=http://localhost no longer works in Docker environments. Plugin daemon cannot access files uploaded by users.

Solution

  • Added INTERNAL_FILES_URL config for Docker network communication
  • Plugin file access now uses internal Docker service URLs (e.g., http://api:5001)
  • User downloads continue using external URLs (e.g., http://localhost:5001)
  • Simple fallback: uses FILES_URL if INTERNAL_FILES_URL not set

Configuration

Add to Docker environment:

INTERNAL_FILES_URL=http://api:5001

Testing

  • Plugin file access works in Docker
  • User file downloads work from browser
  • Backward compatible with existing setups
**Original Pull Request:** https://github.com/langgenius/dify/pull/21382 **State:** closed **Merged:** Yes --- Fixes #21334 ### Problem Using `STORAGE_TYPE=local` and `FILES_URL=http://localhost` no longer works in Docker environments. Plugin daemon cannot access files uploaded by users. ### Solution - Added `INTERNAL_FILES_URL` config for Docker network communication - Plugin file access now uses internal Docker service URLs (e.g., `http://api:5001`) - User downloads continue using external URLs (e.g., `http://localhost:5001`) - Simple fallback: uses `FILES_URL` if `INTERNAL_FILES_URL` not set ### Configuration Add to Docker environment: ```bash INTERNAL_FILES_URL=http://api:5001 ``` ### Testing - ✅ Plugin file access works in Docker - ✅ User file downloads work from browser - ✅ Backward compatible with existing setups
yindo added the pull-request label 2026-02-21 20:45:57 -05:00
yindo closed this issue 2026-02-21 20:45:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#29643