[GH-ISSUE #754] [DOCS]: Docker host internal on Linux systems #437

Closed
opened 2026-02-22 18:19:29 -05:00 by yindo · 0 comments
Owner

Originally created by @timothycarambat on GitHub (Feb 18, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/754

Description

I believe that special dns name has some extra steps.
https://medium.com/@TimvanBaarsen/how-to-connect-to-the-docker-host-from-inside-a-docker-container-112b4c71bc66

Unfortunately, this won't work out of the box on Linux because you need to add the extra — add-hostrun flag:

--add-host=host.docker.internal:host-gateway

To test, you can always drop into a shell inside the container and try to curl that address.

Personally, if ollama is running inside a container, I would just add them to a custom network and then access them via their container names.

Originally created by @timothycarambat on GitHub (Feb 18, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/754 ### Description > I believe that special dns name has some extra steps. > https://medium.com/@TimvanBaarsen/how-to-connect-to-the-docker-host-from-inside-a-docker-container-112b4c71bc66 > > Unfortunately, this won't work out of the box on Linux because you need to add the extra — add-hostrun flag: > > --add-host=host.docker.internal:host-gateway > > > To test, you can always drop into a shell inside the container and try to curl that address. > > Personally, if ollama is running inside a container, I would just add them to a custom network and then access them via their container names. >
yindo added the documentation label 2026-02-22 18:19:29 -05:00
yindo closed this issue 2026-02-22 18:19:29 -05:00
yindo changed title from [DOCS]: Docker host internal on Linux systems to [GH-ISSUE #754] [DOCS]: Docker host internal on Linux systems 2026-06-05 14:35:18 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#437