Skip to content
Dashboard

Terminal sessions

The SnapVM terminal is a browser UI connected to a PTY exposed by the agent running inside a machine.

  1. The browser asks the SnapVM API for authorized access to a machine.
  2. The console opens a WebSocket connection through the terminal gateway.
  3. The gateway reaches the agent inside the machine.
  4. The agent starts or attaches to a PTY session.
  5. Terminal input and output stream between the browser and the session.

The terminal UI can use renderers such as xterm.js or experimental alternatives when the product exposes a switch.

Browser disconnects should not immediately destroy a session. Reopen the terminal to attach again and continue work. Recent output can be replayed from a buffer so the context is not lost.

This is different from hibernation. If the runtime sleeps, in-memory processes can stop. Use services for processes that need to come back automatically.

Multiple browser tabs can attach to the same session when enabled. Everyone attached to that session sees the same live output and sends input to the same shell.

Use multi-attach for pairing, demos, and support. For independent work, create a separate session so shell history and process state do not collide.

A single machine can have multiple sessions. Use separate sessions for distinct tasks:

  • One shell for development commands
  • One shell for logs
  • One shell for database inspection
  • One shell for temporary experiments

The deployment may enforce a maximum session count.

WorkloadBest fit
Installing toolsTerminal
Editing filesTerminal or Code Server
Inspecting logsTerminal
Running a development server temporarilyTerminal
Keeping a server running after wake-upService
Starting an agent automaticallyService
Restarting on failureService