Replies: 1 comment
-
|
The "FATAL: no pg_hba.conf entry" error happens because PostgreSQL isn't allowing connections from the Docker network IPs used by your containers. To fix this, edit the This allows all containers on the Docker bridge network to connect using MD5 authentication. After editing, restart the Postgres container and any dependent containers to apply the change. There’s no automated way to do this in Dify’s compose setup, so you’ll need to repeat if you reset volumes or migrate again [discussion]. Make sure your For local frontend development with pnpm, set these in This avoids If you see CORS issues, add After any environment or config changes, always run: If you’re accessing the API or files from your browser, use your actual host IP address (not To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
Content
Hi Dify Team,
I'm trying to set up the latest version of Dify for local development on Windows (Docker Desktop + pnpm). I've followed the contribution guide, but I'm stuck with a database connection issue.
Environment:
OS: Windows 11
Docker Version: Latest (Docker Desktop)
Dify Version: 1.11.2 (Latest main branch)
Setup Mode: Development (Docker for middleware/api, local pnpm for web)
Steps Taken:
git clone from main branch.
cp .env.example .env and cp middleware.env.example middleware.env in /docker.
Running middleware via docker compose -f docker-compose.middleware.yaml up -d.
Running API via docker compose up -d api worker.
The Problem: The api and plugin_daemon containers fail to connect to db_postgres. The logs show: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: no pg_hba.conf entry for host "172.18.0.x", user "postgres", database "dify", no encryption
Even after running docker compose down -v to clear volumes, the issue persists.
Questions:
Is there a specific configuration needed in .env or docker-compose.yaml for the latest version to allow these internal connections?
For local web development (running pnpm run dev locally), what are the recommended NEXT_PUBLIC_API_PREFIX values in .env.local to avoid [object Response] errors at /install?
Beta Was this translation helpful? Give feedback.
All reactions