Replies: 1 comment 1 reply
-
The URLs in the .env and .env.local files of Dify are used to configure different services (API, web, file storage, and authentication). If you are deploying Dify on a remote server instead of localhost, you need to update these URLs to reflect your server’s IP or domain name. Below is a detailed breakdown of what each URL does and how to configure them correctly. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
I'm deploying Dify from source (without docker) on my server. In the env file of both api and web service, I found some URLs, which are lacking detailed description either in the file itself or in Dify documentation, inlcuding CONSOLE_API_URL, CONSOLE_WEB_URL, SERVICE_API_URL, APP_WEB_URL, FILES_URL in API's .env file and NEXT_PUBLIC_API_PREFIX, NEXT_PUBLIC_PUBLIC_API_PREFIX in Web's .env.local file.
From the default value I know that some of the URLs should be pointed to API service and other should be pointed to Web service. And from the document of Dify about Environment Variables I know that some of the URLs can be left empty if the same domain is applied. From my practice, it should have something to do with the front end web UI and service. If a wrong URL is provided, the login process and some elements like icons may not work or display properly.
So is there a detailed explaination on these URLs? I imagine that if I host Dify locally and visit it directly from the same machine, the default .env or .env.local file may work properly. Now I'm deploying the components on a server and visit the Web UI from somewhere else, the "localhost" config didn't work for me.
Thank you!
2. Additional context or comments
No response
Beta Was this translation helpful? Give feedback.
All reactions