Skip to content

Update docker_runtime.py #8422#8423

Merged
enyst merged 1 commit intoOpenHands:mainfrom
mulyoved:main
May 10, 2025
Merged

Update docker_runtime.py #8422#8423
enyst merged 1 commit intoOpenHands:mainfrom
mulyoved:main

Conversation

@mulyoved
Copy link
Copy Markdown
Contributor

#8422

  • This change is worth documenting at https://docs.all-hands.dev/
  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

End-user friendly description of the problem this fixes or functionality this introduces.


Summarize what the PR does, explaining any non-trivial design decisions.


Link of any specific issues this addresses:

Copy link
Copy Markdown
Collaborator

@enyst enyst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@enyst enyst merged commit da637a0 into OpenHands:main May 10, 2025
18 checks passed
shabbir-shakudo pushed a commit to devsentient/OpenHands that referenced this pull request Jul 15, 2025
shanemort1982 pushed a commit to shanemort1982/OpenHands that referenced this pull request Dec 20, 2025
…ntainers

When accessing OpenHands from a remote browser, WebSocket connections fail
because URLs use 'localhost' instead of the actual server IP address.

Root cause: The DOCKER_HOST_ADDR environment variable is not passed from
the main OpenHands container to spawned runtime containers, causing them
to default to localhost for URL construction.

This fix ensures that DOCKER_HOST_ADDR is inherited by runtime containers,
allowing existing code in sandbox_config.py and docker_runtime.py to
correctly use the server IP for WebSocket and API URLs.

Fixes remote access scenarios where browser and server are on different machines.

Related to OpenHands#8423 (previous fix for old architecture)
shanemort1982 pushed a commit to shanemort1982/OpenHands that referenced this pull request Dec 22, 2025
…ntainers

When accessing OpenHands from a remote browser, WebSocket connections fail
because URLs use 'localhost' instead of the actual server IP address.

Root cause: The DOCKER_HOST_ADDR environment variable is not passed from
the main OpenHands container to spawned runtime containers, causing them
to default to localhost for URL construction.

This fix ensures that DOCKER_HOST_ADDR is inherited by runtime containers,
allowing existing code in sandbox_config.py and docker_runtime.py to
correctly use the server IP for WebSocket and API URLs.

Fixes remote access scenarios where browser and server are on different machines.

Related to OpenHands#8423 (previous fix for old architecture)
@mcmoodoo
Copy link
Copy Markdown

As of march 2026, the localhost issue persists! Just commented at the root issue:
#8422

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants