Skip to content

feat: SSH tunnel + browser auto-open for OpenClaw web dashboard#2429

Closed
la14-1 wants to merge 4 commits intomainfrom
feat/ssh-tunnel-browser-open-rebased
Closed

feat: SSH tunnel + browser auto-open for OpenClaw web dashboard#2429
la14-1 wants to merge 4 commits intomainfrom
feat/ssh-tunnel-browser-open-rebased

Conversation

@la14-1
Copy link
Copy Markdown
Member

@la14-1 la14-1 commented Mar 10, 2026

Summary

Rebased version of #2418 with merge conflicts resolved against current main.

Original PR by @AhmedTMM. Supersedes #2418.

  • Adds SSH tunnel support to automatically forward OpenClaw's web dashboard (port 18791) to localhost and open the browser
  • Captures the gateway auth token in a closure so the browser URL includes the correct ?token= parameter
  • Adds getConnectionInfo() to the CloudOrchestrator interface, implemented by all SSH-based clouds (DigitalOcean, Hetzner, AWS, GCP)
  • Local mode opens the browser directly; Sprite/Daytona gracefully skip tunneling
  • Adds USER.md bootstrap file to guide OpenClaw users to the web dashboard for QR code scanning

Test plan

  • bunx @biomejs/biome check src/ — 0 errors
  • bun test — 1492 tests pass, 0 failures
  • Manual: spawn run digitalocean openclaw — browser should open to web dashboard
  • Manual: spawn run local openclaw — browser opens to localhost:18791 directly

Agent: pr-maintainer
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

-- refactor/pr-maintainer

AhmedTMM and others added 4 commits March 10, 2026 00:06
OpenClaw runs a web dashboard on port 18791 of the remote VM. This
change SSH-tunnels that port to localhost and auto-opens the browser,
giving users a web UI with zero CLI knowledge needed.

- Add TunnelConfig to AgentConfig interface (agents.ts)
- Add startSshTunnel function with port-finding logic (ssh.ts)
- Capture gateway token in closure so the same token is used for both
  the remote config and the browser URL (agent-setup.ts)
- Wire tunnel into orchestration pipeline between preLaunch and
  interactiveSession (orchestrate.ts)
- Add getConnectionInfo to CloudOrchestrator interface and implement
  in all SSH-based clouds (DO, Hetzner, AWS, GCP)
- Local: opens browser directly at localhost:18791
- Sprite/Daytona: gracefully skipped (no standard SSH)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Writes ~/.openclaw/workspace/USER.md during setup with instructions
to use the web dashboard (port 18791) for channel setup tasks that
require QR code scanning (WhatsApp, Telegram) — these don't work
in a terminal TUI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Integrate saveLaunchCmd method removed from CloudOrchestrator interface (moved inline)
- Merge imports from both branches (getModelIdInteractive, startSshTunnel, getErrorMessage, logDebug)
- Keep new getConnectionInfo() interface method from PR branch
- Keep logDebug usage from main's updated orchestrate.ts

Agent: pr-maintainer
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Resolve merge conflicts between main and PR #2418:
- Keep main's version (bumped to 0.15.36)
- Keep main's installChromeBrowser and browser config for openclaw
- Integrate PR's SSH tunnel support (getConnectionInfo on all SSH clouds)
- Add dashboard token closure for openclaw web URL
- Add USER.md bootstrap for openclaw workspace
- Drop saveLaunchCmd from CloudOrchestrator (centralized on main)
- Drop Docker/model references not present on main

Agent: pr-maintainer
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@la14-1
Copy link
Copy Markdown
Member Author

la14-1 commented Mar 10, 2026

Closing in favor of the original #2418 which has been rebased on main with conflicts resolved. -- refactor/pr-maintainer

@la14-1 la14-1 closed this Mar 10, 2026
@la14-1 la14-1 deleted the feat/ssh-tunnel-browser-open-rebased branch March 10, 2026 09:25
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