Setting NEXT_PUBLIC_BASE_PATH is not effective #16894

Closed
opened 2026-02-21 19:28:48 -05:00 by yindo · 0 comments
Owner

Originally created by @t00011666 on GitHub (Sep 8, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

Installing dify-1.8.1 based on docker-compose, I found that setting NEXT_PUBLIC_BASE_PATH was ineffective, and when accessing the frontend, the static resource path did not include the basePath prefix. The dify installation steps are as follows:

  1. Modify the dify-1.8.1\docker.env file, add NEXT_PUBLIC_BASE_PATH, as follows:
    NEXT_PUBLIC_BASE_PATH=/dify
  2. Modify the dify-1.8.1\docker\docker-compose.yaml file, add NEXT_PUBLIC_BASE_PATH, as follows:
    web:
    image: langgenius/dify-web:1.8.1
    restart: always
    environment:
    ......
    NEXT_PUBLIC_BASE_PATH: ${NEXT_PUBLIC_BASE_PATH:-}
  3. Start dify
    docker-compose up -d

2. Additional context or comments

Hope to configure domain access to dify. The steps are as follows:

  1. Domain+/dify prefix access to company nginx
  2. Company nginx identifies the /dify prefix and proxies it to dify
  3. After proxying to dify, the static resources accessed on the dify page do not have the /dify prefix added

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @t00011666 on GitHub (Sep 8, 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] 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] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. Installing dify-1.8.1 based on docker-compose, I found that setting NEXT_PUBLIC_BASE_PATH was ineffective, and when accessing the frontend, the static resource path did not include the basePath prefix. The dify installation steps are as follows: 1. Modify the dify-1.8.1\docker\.env file, add NEXT_PUBLIC_BASE_PATH, as follows: NEXT_PUBLIC_BASE_PATH=/dify 2. Modify the dify-1.8.1\docker\docker-compose.yaml file, add NEXT_PUBLIC_BASE_PATH, as follows: web: image: langgenius/dify-web:1.8.1 restart: always environment: ...... NEXT_PUBLIC_BASE_PATH: ${NEXT_PUBLIC_BASE_PATH:-} 3. Start dify docker-compose up -d ### 2. Additional context or comments Hope to configure domain access to dify. The steps are as follows: 1. Domain+/dify prefix access to company nginx 2. Company nginx identifies the /dify prefix and proxies it to dify 3. After proxying to dify, the static resources accessed on the dify page do not have the /dify prefix added ### 3. Can you help us with this feature? - [x] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 19:28:48 -05:00
yindo closed this issue 2026-02-21 19:28:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#16894