Skip to main content
The gateway is the control plane for OpenShell. All control-plane traffic between the CLI and running sandboxes flows through it. The gateway is responsible for:
  • Provisioning and managing sandboxes, including creation, deletion, and status monitoring.
  • Storing provider credentials and delivering them to sandboxes at startup.
  • Delivering network and filesystem policies to sandboxes. Enforcement happens inside each sandbox through the proxy, OPA, Landlock, and seccomp.
  • Managing inference configuration and serving inference bundles.
  • Providing the SSH tunnel endpoint so you can connect to sandboxes without exposing them directly.
The gateway runs inside a Docker container (no separate Kubernetes installation required) and exposes a single port with gRPC and HTTP multiplexed, secured by mTLS by default. It can be deployed locally, on a remote host via SSH, or behind a cloud reverse proxy.
You do not need to deploy a gateway manually. Running openshell sandbox create without a gateway auto-bootstraps a local one for you.

Deploy a local gateway

1

Start the gateway

Deploy a gateway on your workstation. The only prerequisite is a running Docker daemon.
The gateway becomes reachable at https://127.0.0.1:8080.
2

Verify gateway health

To use a different port or name:

Deploy a remote gateway

Deploy a gateway on a remote machine accessible via SSH. The only dependency on the remote host is Docker.
1

Start the remote gateway

The gateway is reachable at https://<hostname>:8080.
2

Specify an SSH key (optional)

For DGX Spark, use your Spark’s mDNS hostname:

Register an existing gateway

Use openshell gateway add to register a gateway that is already running.
Register a gateway behind a reverse proxy such as Cloudflare Access:
This opens your browser for the proxy’s login flow. After authentication, the CLI stores a bearer token and sets the gateway as active.To give the gateway a specific name:
If the token expires later, re-authenticate with:

Authentication

For cloud gateways, use --plaintext and --disable-gateway-auth when deploying behind a TLS-terminating reverse proxy that cannot forward client certificates.

Manage multiple gateways

One gateway is always the active gateway. All CLI commands target it by default. Both gateway start and gateway add automatically set the new gateway as active. List all registered gateways and select the active one interactively:
Switch to a specific gateway:
Override the active gateway for a single command with -g:
Show deployment details for a gateway, including endpoint, auth mode, and port:

Advanced start options

Stop and destroy

For cloud gateways, gateway destroy removes only the local registration. It does not affect the remote deployment.

Troubleshoot

Check gateway health:
View gateway logs:
Run a command inside the gateway container for deeper inspection:
If the gateway is in a bad state, recreate it:

Next steps

Manage sandboxes

Create sandboxes, connect to them, and manage their lifecycle.

Quickstart

Install the CLI and run your first sandbox end to end.