Add node shell console access from the Hosts page#27
Merged
Conversation
Adds Proxmox's "Datacenter > Node > Shell" equivalent — a terminal on the
node itself, not a guest VM/container. Extends the existing console
plumbing (session store, WebSocket bridge, ticket issuance) to support a
second session kind alongside guest consoles:
- lib/proxmox/endpoints.ts: nodeTermProxy() calls POST /nodes/{node}/termproxy.
- lib/server/consoleStore.ts: ConsoleSession is now a 'guest' | 'node'
discriminated union (node sessions have no vmid/type, always mode:'term').
- lib/server/consoleProxy.ts: upstreamUrl() builds the node-level
vncwebsocket path (no /{type}/{vmid} segment) for 'node' sessions.
- pages/api/console/connect.ts: accepts type:'node' as a third ticket kind
alongside the existing qemu/lxc guest schema.
- pages/console/[hostId]/node/[node].tsx: new page, a trimmed copy of the
guest console (xterm + WS bridge only — no VNC branch, no mobile-keyboard
bridge needed since xterm already handles that itself).
Hosts page: each host row gets a terminal icon that opens the shell
directly for single-node hosts (the common case), or expands an inline
node picker for multi-node clusters.
Verified end-to-end against a mocked backend: single-node host navigates
straight to /console/{hostId}/node/{node}; multi-node host expands a
picker listing both nodes correctly.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pnq8TgxCk7qHhd2PUExmpb
BeardedTech0o
added a commit
that referenced
this pull request
Jul 7, 2026
Adds Proxmox's "Datacenter > Node > Shell" equivalent — a terminal on the
node itself, not a guest VM/container. Extends the existing console
plumbing (session store, WebSocket bridge, ticket issuance) to support a
second session kind alongside guest consoles:
- lib/proxmox/endpoints.ts: nodeTermProxy() calls POST /nodes/{node}/termproxy.
- lib/server/consoleStore.ts: ConsoleSession is now a 'guest' | 'node'
discriminated union (node sessions have no vmid/type, always mode:'term').
- lib/server/consoleProxy.ts: upstreamUrl() builds the node-level
vncwebsocket path (no /{type}/{vmid} segment) for 'node' sessions.
- pages/api/console/connect.ts: accepts type:'node' as a third ticket kind
alongside the existing qemu/lxc guest schema.
- pages/console/[hostId]/node/[node].tsx: new page, a trimmed copy of the
guest console (xterm + WS bridge only — no VNC branch, no mobile-keyboard
bridge needed since xterm already handles that itself).
Hosts page: each host row gets a terminal icon that opens the shell
directly for single-node hosts (the common case), or expands an inline
node picker for multi-node clusters.
Verified end-to-end against a mocked backend: single-node host navigates
straight to /console/{hostId}/node/{node}; multi-node host expands a
picker listing both nodes correctly.
Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lib/proxmox/endpoints.ts:nodeTermProxy()callsPOST /nodes/{node}/termproxy.lib/server/consoleStore.ts:ConsoleSessionis now a'guest' | 'node'discriminated union (node sessions have no vmid/type, alwaysmode: 'term').lib/server/consoleProxy.ts:upstreamUrl()builds the node-levelvncwebsocketpath (no/{type}/{vmid}segment) for'node'sessions.pages/api/console/connect.ts: acceptstype: 'node'as a third ticket kind alongside the existing qemu/lxc guest schema.pages/console/[hostId]/node/[node].tsx: new page, a trimmed copy of the guest console (xterm + WS bridge only — no VNC branch, no mobile-keyboard bridge needed since xterm already handles that itself).Test plan
npm run typechecknpm test(21/21 passing)npm run build/console/{hostId}/node/{node}; multi-node host expands a picker listing both nodes correctly.Sys.Consoleat minimum) — if it fails, check the token's permissions on that host, same as we had to do for the guest console early on.Generated with Claude Code.