daytona-medium snapshot, so setup starts immediately after SSH.
Keep the Gateway on loopback and reach the dashboard through Daytona’s signed
preview URLs. Do not expose the Gateway port directly to the public internet.
What you need
- Daytona account (free tier available)
- Daytona API key from the Daytona dashboard
- API key for your model provider (Anthropic, OpenAI, etc.)
Install the Daytona CLI
- macOS / Linux
- Windows
brew upgrade daytonaio/cli/daytona).
Authenticate
Create a sandbox
Connect via SSH
Run onboarding
Inside the sandbox, configure OpenClaw in one command:--skip-daemon matters: Daytona sandboxes do not run a service manager, so
you start the Gateway manually below. Swap the key flag for your provider
(--openai-api-key, --openrouter-api-key, and so on); openclaw onboard --help lists them all. Channels, skills, and hooks are skipped here and
configured later.
Running openclaw onboard without flags starts a conversational setup
assistant instead and requires an interactive terminal;
openclaw onboard --classic runs the older step-by-step wizard.
Onboarding configures a gateway auth token. Print it any time from the
sandbox:
openclaw config get gateway.auth.token returns __OPENCLAW_REDACTED__
rather than the value, because the CLI masks secrets in its output.
Allow the preview URL origin
The Gateway accepts browser connections only from allowed origins, and Daytona’s preview proxy sits in front of it. Configure both before starting the Gateway. From your local terminal (not the sandbox SSH session), generate a signed preview URL for the Gateway port:https://host without a trailing slash, so https://host/ fails to
match and the connection is rejected. Browser address bars often display that
trailing slash, so copy from the terminal instead.
Start the Gateway
OK means you are good to
continue.
To restart the Gateway later (after config changes or updates):
Open the dashboard
Open the preview URL you generated earlier in your browser. The Control UI asks for the gateway token on first connect; paste the value you printed after onboarding.Approve your device
The first browser connection queues a device pairing request. Back in your sandbox SSH session:Security
Access to the Gateway is protected in three layers:
Keep your gateway token and preview URLs private. The Gateway stays bound to
loopback; Daytona’s preview proxy handles external access.
Channel setup
Unknown senders require pairing approval by default; see Pairing.Telegram
Create a bot with @BotFather (/newbot), copy the
token, then configure OpenClaw from the sandbox SSH session:
enable step is required;
otherwise the Gateway reports the channel as configured but untrusted. Running
the login command below without installing first prompts you to download the
plugin from ClawHub or npm instead.
Then link the account by scanning a QR code from the sandbox SSH session:
Updating
The snapshot’s global npm tree is owned by root, so plainopenclaw update
cannot write to it. Update from the sandbox SSH session with:
openclaw doctor migrates any older config after the update. Restart the
Gateway afterwards (see above).
Stop and resume the sandbox
Troubleshooting
Gateway not running after sandbox restart
The Gateway process does not survive a sandbox restart. Reconnect withdaytona ssh openclaw and start it again with the nohup command above.
Preview URL expired
Preview URLs are time-limited (default 3600 seconds). Regenerate from your local terminal, optionally with a longer expiry:gateway.controlUi.allowedOrigins with the new URL and
restart the Gateway, or the Control UI is rejected with origin not allowed.
Sandbox auto-stopped
If the sandbox was created without--auto-stop 0, it stops automatically
when idle. Resume it with daytona sandbox start openclaw.
Gateway port not reachable
Confirm the Gateway is running and listening:daytona preview-url.
Notes
- For programmatic sandbox provisioning, see the Daytona OpenClaw SDK guide