Skip to content

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

@emhamitay

Description

@emhamitay

Is there an existing feature request for this?

  • I have searched existing issues and feature requests, and this is not a duplicate.

Problem or Use Case

openhands serve hardcodes port 3000 for both the host and container (-p 3000:3000), with no way to override it via a flag. Since 3000 is also the default port for many frontend dev servers (Next.js, Vite, CRA, etc.), this creates an unnecessary conflict for developers who want to run OpenHands alongside their projects.

Proposed Solution

Add a --port option to openhands serve that maps to -p :3000 in the underlying docker command, so users can do:
openhands serve --port 4000
Currently the only workaround is constructing and running the full docker run command manually, which defeats the purpose of the CLI launcher's convenience.

Alternatives Considered

No response

Priority / Severity

Medium - Would improve experience

Estimated Scope

Small - UI tweak, config option, or minor change

Feature Area

Configuration / Settings

Technical Implementation Ideas (Optional)

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions