/docs/workstations/management
WorkstationsStorage webtop-manage v1.0.0

Lifecycle & Storage Management

Managing workstation states, live resource reallocation, host folder browsing, and safe storage lifecycles.

Lifecycle & Storage Management

webtop-manage provides comprehensive lifecycle management for containerized workstations, allowing developers to dynamically adjust hardware limits, browse host directories, and manage persistent storage.


⚡ Workstation Power Controls

From the main dashboard card, you can perform instant state modifications:

ActionAPI RouteDescription
StartPOST /api/instances/{id}/startBoots the container and binds host ports.
StopPOST /api/instances/{id}/stopSends a graceful SIGTERM (10s timeout) followed by SIGKILL.
RestartPOST /api/instances/{id}/restartRestarts the container with zero configuration changes.
PausePOST /api/instances/{id}/pauseFreezes container cgroups, freeing 100% CPU cycles while keeping state in RAM.
UnpausePOST /api/instances/{id}/unpauseResumes frozen container processes instantly.

⚡ Live Zero-Downtime Resource Allocation

You can live-adjust CPU and Memory limits on a running workstation without restarting or disconnecting active desktop sessions:

  1. Click the Settings & Credentials icon (⚙️) on any instance card.
  2. Under Live Resource Limits, modify:
    • CPU Cores: Quota in fractional cores (e.g. 2.0 cores, 0 = Uncapped).
    • Memory Limit: Allocation in megabytes (e.g. 4096MB, 0 = Uncapped).
  3. Click Apply Live Resource Allocation. The daemon calls Docker's cgroup update API (POST /api/instances/{id}/resources) immediately.

📁 Visual Host Directory Browser

When attaching workspace folders or bind mounts, click Browse to open the interactive filesystem browser:

code
┌─────────────────────────────────────────────────────────────┐
│ Browse Host Directory                                       │
│ [🖥️ Desktop] [📁 Documents] [💻 C: Drive] [👤 User]          │
├─────────────────────────────────────────────────────────────┤
│ [⬆️ Up]  /workspace/projects/fullstack-app                  │
├─────────────────────────────────────────────────────────────┤
│ 📁 .git/                                                    │
│ 📁 src/                                                     │
│ 📁 tests/                                                   │
│ 📄 package.json                                             │
│ 📄 README.md                                                │
├─────────────────────────────────────────────────────────────┤
│ [Cancel]                              [Select This Folder]  │
└─────────────────────────────────────────────────────────────┘

Security & Path Containment

  • The gateway automatically sanitizes input using filepath.Clean.
  • Sensitive operating system structures (IsForbiddenPath) like /etc, /proc, /sys, /root/.ssh, id_rsa, docker.sock, and Windows System32 are strictly restricted from navigation and mounting.

💾 Storage Architecture & Mounts

webtop-manage uses a two-tier storage layout to separate system configuration from project data:

code
┌─────────────────────────────────────────────────────────────────┐
│ Workstation Container                                           │
│                                                                 │
│  /config           ──► Named Volume: workstation-<name>-config   │
│                        (User profile, XFCE/KDE settings, fonts) │
│                                                                 │
│  /config/workspace ──► Named Volume: workstation-<name>-data     │
│                        OR Host Folder: /path/to/host/project    │
└─────────────────────────────────────────────────────────────────┘

Attaching Additional Storage

Open the Settings & Credentials dialog to dynamically mount:

  • Existing Docker Volumes: Pick from auto-detected Docker volumes on the host.
  • Host Directory Binds: Map any host path to custom container mount points (e.g. /mnt/datasets or /config/workspace/repo) with optional Read-Only enforcement.

🗑️ Safe Deletion Lifecycle

When deleting an instance (DELETE /api/instances/{id}):

  • Default Deletion (delete_volume=false): Destroys the container and removes its dedicated bridge network, but preserves all named volumes on the host. If you provision an instance with the same name later, your profile and workspace remain intact.
  • Wipe Data Deletion (delete_volume=true): Permanently deletes the persistent Docker volumes (workstation-<name>-config and workstation-<name>-data).
  • Host Bind Protection: Host directory bind mounts are never deleted from your host hard drive upon container deletion; only the container's mount pointer is removed.
  • Orphan Network Sweeps: Any dedicated bridge network labeled webtop.owner: <name> is destroyed upon deletion, leaving zero orphan Docker networks behind.