Development Sandbox
The Plato development sandbox creates a complete VM environment where you can test your simulator changes in isolation, with live code sync and interactive development tools.Starting a Sandbox
From any simulator directory with a.plato-hub.json
file:
Command Options
Path to VM configuration file
Dataset to use for the sandbox environment
Keep VM running after sandbox exits (for debugging)
Port for SSH tunneling server
Sandbox Workflow
When you start a sandbox, Plato automatically:1
Create Development Branch
Creates a unique development branch (
dev-abc123
) and pushes your current code2
Start Virtual Machine
Launches a VM with the resources defined in
plato-config.yml
3
Set Up Code Sync
Clones your development branch to
/opt/plato
in the VM4
Configure SSH Access
Sets up secure SSH tunneling for direct VM access
5
Interactive Menu
Presents options for starting services and connecting editors
Interactive Menu
Once your sandbox is ready, you’ll see an interactive menu:Option 1: Start Simulator Services
Starts your simulator with the specified dataset:- Reads
plato-config.yml
to understand your setup - Starts main application services (database, web app, etc.)
- Waits for services to become healthy
- Starts Plato worker for mutation listening
- Runs everything as a systemd service in the background
Option 2 & 3: Connect Editors
Opens VS Code or Cursor connected directly to the VM via SSH:- Passwordless access using SSH keys
- Direct file editing in
/opt/plato
- Terminal access within your editor
- Remote debugging capabilities
Option 4: VM Information
Shows details about your running VM:- VM UUID and status
- SSH connection details
- Resource usage
- Public URL (if applicable)
Option 5: Cleanup
Safely stops and cleans up the VM and all resources.Development Workflow
Code-Test-Debug Cycle
- Make changes in your editor (VS Code/Cursor connected to VM)
- Restart services (option 1) to pick up changes
- Test manually or via automated tests
- Debug issues using SSH access and logs
File Locations in VM
/opt/plato
Your simulator code (synced from development branch)
/opt/internal
Generated configuration files (config.yml, env.py, etc.)
Viewing Logs
Check service status and logs:Configuration Examples
Custom Compute Resources
plato-config.yml
Multiple Datasets
plato-config.yml
Using Different Datasets
Troubleshooting
VM fails to start
VM fails to start
Check your
plato-config.yml
for valid resource limits:- CPUs: 1-8
- Memory: 512-16384 MB
- Disk: 1024-102400 MB
Services won't start
Services won't start
- Check your
docker-compose.yml
syntax - Verify image names and tags are accessible
- Review service dependencies and health checks
SSH connection fails
SSH connection fails
- Wait a moment for chisel tunnel to establish
- Try the SSH command manually:
ssh plato-sandbox-abc123
- Check if SSH key was generated properly
Editor won't connect
Editor won't connect
- Install VS Code Remote-SSH extension
- Use F1 → “Remote-SSH: Connect to Host” → select your sandbox
- Check that the SSH tunnel is active
Remember to stop your sandbox (option 5) when finished to avoid leaving VMs running unnecessarily.