Running the Gateway as a Container
Use this approach when you want to run the OpenShell gateway as a container instead of installing it with the system package manager. This is useful on immutable OS distributions (Fedora CoreOS, bootc-based images, Silverblue) where the standard installer is not appropriate, or anywhere you prefer a container-first workflow.
The gateway image is published at ghcr.io/nvidia/openshell/gateway.
Prerequisites for the Docker Driver
When the gateway runs as a container and creates Docker-backed sandboxes, the gateway container
communicates with the host Docker daemon via the mounted socket. This requires three things beyond
a basic docker run:
-
Docker socket access. The gateway process must be able to read and write the Docker socket. Add the
dockergroup (or the GID of/var/run/docker.sock) so the socket is accessible without running as root. -
gRPC endpoint. Sandbox containers call back to the gateway over the
OPENSHELL_GRPC_ENDPOINTaddress. The Docker driver substituteshost.openshell.internalas the host and the gateway’s own bind port as the port — only the scheme (httporhttps) is preserved. Usehttp://host.openshell.internal:8080when TLS is disabled andhttps://host.openshell.internal:8080when mTLS is enabled. The docker driver automatically binds the gateway to the bridge network interface so sandbox containers can reach it — you do not need to expose the port on0.0.0.0. -
Supervisor binary on the host. The gateway bind-mounts the
openshell-sandboxsupervisor binary into each sandbox container. Because bind-mount paths are resolved by the host Docker daemon (not inside the gateway container), the binary must exist at a path on the host filesystem and be mounted at the same absolute path inside the gateway container. That way the path the gateway records internally matches what Docker can find on the host when it creates sandbox containers.
Quick Start
Extract the supervisor binary to the host once, then start the gateway:
Start the gateway:
The volume mount uses ~/openshell/supervisor/openshell-sandbox for both the host and container
paths. The shell expands ~ in both halves before passing the argument to Docker, so both sides
resolve to the same absolute path (e.g., /home/user/openshell/supervisor/openshell-sandbox).
This satisfies the same-path requirement so the host Docker daemon can find the binary when
creating sandbox containers.
Register the gateway with the CLI. If running on the same machine, use --local:
If registering from a different machine on the same network, use the host IP and --remote:
Confirm the CLI can reach the gateway:
Disabling TLS removes authentication. This example binds to 127.0.0.1 so only local
connections are accepted. To accept remote connections, enable mTLS or restrict access with
a firewall rule.
Full mTLS Setup
To run the gateway with mutual TLS, generate the PKI bundle first, then start the gateway with the cert paths configured.
Bootstrap the PKI into a local state directory:
This writes the server and client certificates under ~/.local/state/openshell/tls/, writes sandbox JWT signing keys under ~/.local/state/openshell/tls/jwt/, and copies the client bundle to ~/.config/openshell/gateways/openshell/mtls/ so the CLI picks it up automatically.
Start the gateway with mTLS enabled:
Register the gateway with mTLS:
Docker Compose
The deploy/docker/ directory in
the repository contains a production-ready Compose setup with full inline documentation:
Clone or copy those files, then start the gateway:
Register the gateway with the CLI. If registering from the same machine:
If registering from a different machine on the same network, replace HOST_IP with the
machine’s LAN address:
Using Podman
Replace docker with podman in the commands above. Mount the Podman socket instead of the Docker socket and set the driver to podman:
Next Steps
- To create your first sandbox, refer to the Quickstart.
- To control what the agent can access, refer to Policies.
- For environment variable reference, refer to Sandbox Compute Drivers.