Skip to content

Add secure remote startup flow#255

Closed
neubig wants to merge 8 commits into
mainfrom
secure-remote-startup
Closed

Add secure remote startup flow#255
neubig wants to merge 8 commits into
mainfrom
secure-remote-startup

Conversation

@neubig
Copy link
Copy Markdown
Member

@neubig neubig commented May 10, 2026

Summary

  • persist an auto-generated SESSION_API_KEY across recommended dev-stack restarts so agent-server auth is enabled by default
  • add OH_REQUIRE_BROWSER_SESSION_KEY=1 for the recommended Docker and non-Docker flows to suppress automatic VITE_SESSION_API_KEY propagation to the browser
  • rely on the existing onboarding backend-check step for browser-entered session keys instead of showing a separate pre-onboarding connection screen
  • remove the separate npm run dev:remote startup path/recommendation; remote/shared use can use the existing dev:docker or dev:dangerously-dockerless workflows with OH_REQUIRE_BROWSER_SESSION_KEY=1
  • update self-hosting/development docs and tests for the session-key startup behavior

Verification

  • node --check scripts/dev-static.mjs
  • npm run test -- __tests__/scripts/dev-static.test.ts __tests__/scripts/dev-with-automation.test.ts __tests__/scripts/dev-docker.test.ts
  • npm run typecheck
  • npm run build

This PR description was updated by an AI agent (OpenHands) on behalf of the user.

@neubig can click here to continue refining the PR

Co-authored-by: openhands <openhands@all-hands.dev>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-canvas Ready Ready Preview, Comment May 11, 2026 10:02pm

Request Review

Comment thread package.json Outdated
"dev:automation": "node --env-file-if-exists=.env scripts/dev-with-automation.mjs",
"dev:docker": "node --env-file-if-exists=.env scripts/dev-docker.mjs",
"dev:static": "node --env-file-if-exists=.env scripts/dev-static.mjs",
"dev:remote": "node --env-file-if-exists=.env scripts/dev-static.mjs --remote",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks like dev:remote just runs dev:static which is a helper I made for myself on slow connections

I don't think we need dev:remote, just dev should work fine.

Comment thread README.md

Access the UI at [http://localhost:8000](http://localhost:8000)

By default, the dev script automatically passes the generated session API key to the browser frontend for local convenience. To require each browser to enter the key instead, start it with `OH_REQUIRE_BROWSER_SESSION_KEY=1 npm run dev:docker`; users can enter the key from `~/.openhands/agent-canvas/session-api-key.txt` (or your `SESSION_API_KEY` / `OH_SESSION_API_KEYS_0` value) in the onboarding backend connection step.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no need to add these blocks

Co-authored-by: openhands <openhands@all-hands.dev>
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