smolvm sandbox port lets your host reach a service running inside a sandbox. Use it for dev servers, local APIs, databases, and preview apps.
Synopsis
Shared options
string
Path to an SSH private key when SmolVM needs SSH for the forward.
string
default:"root"
SSH user when SmolVM needs SSH for the forward.
string
Control channel for setup calls. Use
ssh, vsock, or omit it for auto-selection.flag
Print a JSON envelope instead of formatted text.
expose
Share a sandbox port on localhost:list
Show active forwards:close
Close a forward:Common workflow
http://127.0.0.1:3000 from your host browser.
Transports
SmolVM chooses the best forwarding transport for your host:nftableswhen the host can route directly to the guest.ssh_tunnelwhen a background SSH tunnel is the safest path, such as on macOS.
Related commands
- Port forwarding - Use
vm.expose_local(...)from Python smolvm sandbox shell- Start the service inside the sandboxsmolvm sandbox stop- Stop the sandbox and release forwards
