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:
| Action | API Route | Description |
|---|---|---|
| Start | POST /api/instances/{id}/start | Boots the container and binds host ports. |
| Stop | POST /api/instances/{id}/stop | Sends a graceful SIGTERM (10s timeout) followed by SIGKILL. |
| Restart | POST /api/instances/{id}/restart | Restarts the container with zero configuration changes. |
| Pause | POST /api/instances/{id}/pause | Freezes container cgroups, freeing 100% CPU cycles while keeping state in RAM. |
| Unpause | POST /api/instances/{id}/unpause | Resumes 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:
- Click the Settings & Credentials icon (⚙️) on any instance card.
- Under Live Resource Limits, modify:
- CPU Cores: Quota in fractional cores (e.g.
2.0cores,0= Uncapped). - Memory Limit: Allocation in megabytes (e.g.
4096MB,0= Uncapped).
- CPU Cores: Quota in fractional cores (e.g.
- 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:
┌─────────────────────────────────────────────────────────────┐
│ 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 WindowsSystem32are strictly restricted from navigation and mounting.
💾 Storage Architecture & Mounts
webtop-manage uses a two-tier storage layout to separate system configuration from project data:
┌─────────────────────────────────────────────────────────────────┐
│ 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/datasetsor/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>-configandworkstation-<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.