Skip to main content
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

Port forwards bind to 127.0.0.1. They are reachable from your host, not from other machines on your network.

Shared options

--ssh-key
string
Path to an SSH private key when SmolVM needs SSH for the forward.
--ssh-user
string
default:"root"
SSH user when SmolVM needs SSH for the forward.
--comm-channel
string
Control channel for setup calls. Use ssh, vsock, or omit it for auto-selection.
--json
flag
Print a JSON envelope instead of formatted text.

expose

Share a sandbox port on localhost:
Let SmolVM pick the host port:
The mapping format is:

list

Show active forwards:

close

Close a forward:

Common workflow

Open http://127.0.0.1:3000 from your host browser.

Transports

SmolVM chooses the best forwarding transport for your host:
  • nftables when the host can route directly to the guest.
  • ssh_tunnel when a background SSH tunnel is the safest path, such as on macOS.
You do not need to choose the transport yourself.
Last modified on June 24, 2026