Skip to content

feat: Add configurable port for openhands serve#785

Open
Chesars wants to merge 2 commits into
OpenHands:mainfrom
Chesars:fix/serve-port
Open

feat: Add configurable port for openhands serve#785
Chesars wants to merge 2 commits into
OpenHands:mainfrom
Chesars:fix/serve-port

Conversation

@Chesars

@Chesars Chesars commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #779

Adds a --port option to openhands serve so users can access the OpenHands GUI container on a custom host port.

The Docker container still listens on port 3000; only made the host-side Docker port configurable.

Example:

openhands serve --port 4000

Docker runs with: -p 4000:3000

Testing

  • uv run pytest tests/test_main.py::test_main_serve_calls_launch_gui_server tests/test_gui_launcher.py::TestLaunchGuiServer::test_launch_gui_server_scenarios
  • Manually verified openhands serve --port 4000 in Docker as 0.0.0.0:4000->3000/tcp

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.

[Feature]: Add --port flag to openhands serve

1 participant