Documentation Index
Fetch the complete documentation index at: https://mintlify.com/NVIDIA/OpenShell/llms.txt
Use this file to discover all available pages before exploring further.
Gateway authentication
This page describes how the CLI resolves a gateway, authenticates with it, and where credentials are stored. For how to deploy or register gateways, see Gateways.Gateway resolution
When any CLI command needs to talk to the gateway, it resolves the target through the following priority chain:| Priority | Source | Format |
|---|---|---|
| 1 | --gateway-endpoint <URL> flag | Direct endpoint URL |
| 2 | -g <NAME> flag | Gateway name |
| 3 | OPENSHELL_GATEWAY environment variable | Gateway name |
| 4 | ~/.config/openshell/active_gateway file | Gateway name (plain text) |
Authentication modes
The CLI uses one of three connection modes depending on the gateway’s authentication configuration.mTLS
The default mode for self-deployed gateways. When you rungateway start or gateway add --local / gateway add --remote, the CLI extracts mTLS certificates from the running container and stores them locally. Every subsequent request presents a client certificate to prove identity.
The CLI loads three PEM files from ~/.config/openshell/gateways/<name>/mtls/:
| File | Purpose |
|---|---|
ca.crt | CA certificate. Verifies the gateway’s server certificate. |
tls.crt | Client certificate. Proves the CLI’s identity to the gateway. |
tls.key | Client private key. |
Edge JWT
For gateways behind a reverse proxy that handles authentication (for example, Cloudflare Access), the CLI uses a browser-based login flow and routes traffic through a WebSocket tunnel. Registration flow (openshell gateway add https://gateway.example.com):
Token relay
After authentication, the browser relays the authorization token back to the CLI via a localhost callback.
WebSocket connection
The proxy opens a WebSocket connection (
wss://) to the gateway, attaching the stored bearer token in the upgrade headers.Gateway bridges connection
The gateway bridges the WebSocket into the same service that handles direct mTLS connections.
This is transparent to the user. All CLI commands work the same regardless of whether the gateway uses mTLS or edge authentication.
openshell gateway login to open the browser flow again and update the stored token.
Plaintext
When a gateway is deployed with--plaintext, TLS is disabled entirely. The CLI connects over plain HTTP/2.
Credential file layout
All gateway credentials and metadata are stored under~/.config/openshell/:
Policy schema
Complete field reference for the sandbox policy YAML.
Support matrix
Supported platforms, prerequisites, and kernel requirements.