← Back to Blog

How to Deploy OpenClaw on Saturn Cloud

A simple guide to deploy OpenClaw on Saturn Cloud with WhatsApp.

How to Deploy OpenClaw on Saturn Cloud

OpenClaw is an open-source AI agent framework that can connect to channels like WhatsApp. This article shows how to run it on Saturn Cloud.

You will create one Saturn Cloud Deployment, configure OpenClaw in terminal, connect WhatsApp, then keep the gateway running from an active terminal session.

This guide uses a setup-first workflow. The deployment starts with sleep infinity so you can configure OpenClaw over terminal access and run OpenClaw manually in your terminal session.

Prerequisites

  • A Saturn Cloud account
  • An OpenAI-compatible key in Saturn environment variables (for example OPENAI_API_KEY)
  • A WhatsApp account you control
  • SSH or terminal access to the deployment

Step 1: Create a Saturn Cloud Resource

Create a Deployment resource in Saturn Cloud with:

Saturn Cloud create resource Resource type set to New Deployment

  • Name: openclaw
  • Image: saturncloud/saturn-python
  • Size: start with Medium (2 vCPU, 4 GB RAM)
  • External URL: enabled, routed to container port 8000
  • Allow SSH Connections: enabled
  • Custom Subdomain: set a unique value (for example openclaw-yourname)

Saturn Cloud subdomain field

For setup, use a command that keeps the deployment running while you configure OpenClaw from the terminal:

sleep infinity

Deployment name and command set to sleep infinity

Before you click Create, confirm:

  • Name is set
  • Command is sleep infinity
  • Instance Count is 1
  • Image is saturncloud/saturn-python
  • External URL is enabled and points to port 8000
  • Allow SSH Connections is enabled
  • Custom subdomain is set and unique

Save and start the deployment.

Saturn Cloud deployment overview with sleep infinity

Step 2: Set Environment Variables

In the deployment Details tab, add these environment variables:

Before filling the environment variables, generate a gateway token locally:

openssl rand -hex 32

Use the generated value as OPENCLAW_GATEWAY_TOKEN.

OPENAI_API_KEY=YOUR_OPENAI_API_KEY
OPENCLAW_GATEWAY_TOKEN=YOUR_GATEWAY_TOKEN
OPENCLAW_PUBLIC_ORIGIN=https://your-subdomain.community.saturnenterprise.io
WHATSAPP_OWNER_E164=+1234567890

Deployment environment variables for OpenClaw

Keep these values in Saturn env vars, not in scripts.

WHATSAPP_OWNER_E164 is the WhatsApp number allowed to message OpenClaw, not necessarily the number linked as the OpenClaw WhatsApp account.

Set OPENCLAW_PUBLIC_ORIGIN to the browser URL for your deployment, not the SSH hostname. Use the same custom subdomain you created in Step 1. It should look like https://your-subdomain.community.saturnenterprise.io and should not include a trailing slash.

Step 3: SSH Into the Deployment

After the deployment is running:

  1. Open the deployment Overview page.
  2. Copy the SSH connection command.
  3. Run it in your local terminal to open Terminal 1.

Later, open Terminal 2 by running the same SSH command in a second local terminal window.

SSH into Saturn Cloud deployment

Verify runtime tools:

node -v
npm -v

Node and npm version check in deployment terminal

The saturncloud/saturn-python image usually includes Node and npm. If either command is missing, install Node.js before continuing.

Step 4: Install OpenClaw

Install using the official installer:

curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --no-onboard

OpenClaw install success in terminal

Verify:

openclaw --version

Step 5: Run OpenClaw Onboarding (Port 8000)

Run onboarding:

openclaw onboard --non-interactive \
  --mode local \
  --auth-choice openai-api-key \
  --secret-input-mode ref \
  --gateway-port 8000 \
  --gateway-bind lan \
  --gateway-auth token \
  --gateway-token-ref-env OPENCLAW_GATEWAY_TOKEN \
  --accept-risk \
  --skip-health

Then allow your Saturn deployment URL in the control UI config:

openclaw config set gateway.controlUi.allowedOrigins "[\"$OPENCLAW_PUBLIC_ORIGIN\"]" --strict-json

OpenClaw onboarding success in terminal

Step 6: Connect WhatsApp

In Terminal 1, install and configure WhatsApp:

openclaw plugins install @openclaw/whatsapp
openclaw config set channels.whatsapp.dmPolicy pairing
openclaw config set channels.whatsapp.allowFrom "[\"$WHATSAPP_OWNER_E164\"]" --strict-json
openclaw config set channels.whatsapp.groupPolicy disabled
openclaw channels login --channel whatsapp

Scan the QR code when prompted.

When the login succeeds, OpenClaw should report that the WhatsApp web session is ready. If it asks for a gateway restart, continue to the next step and start the gateway manually.

WhatsApp channel linked and configured

Step 7: Start the Gateway in Foreground (Terminal 1)

In this container-based setup, run the gateway in the foreground instead of using openclaw gateway restart.

In Terminal 1, start the gateway:

openclaw gateway

Gateway ready with WhatsApp listener

Checkpoint: Terminal 1 should show gateway ready and Listening for personal WhatsApp inbound messages.

Keep this terminal open.

If your SSH session disconnects, reconnect and rerun:

openclaw gateway

Do not use:

openclaw gateway restart

That command expects OpenClaw to be installed as a system service, which is not how this deployment is configured.

Plugin and channel changes are loaded when the gateway starts. If you make those changes after starting the gateway, stop it with Ctrl+C, then run openclaw gateway again.

Step 8: Open the UI and Approve Browser Device

  1. Open the Saturn deployment URL in your browser.
  2. Paste your gateway token if prompted, then copy the device approval request ID.
  3. Keep Terminal 1 running openclaw gateway.
  4. Open Terminal 2 in the same deployment.

OpenClaw device approval screen

  1. In Terminal 2, run:
openclaw devices list
openclaw devices approve <request-id>

Device approval command in terminal

Do not press Ctrl+C in Terminal 1 before approvals finish.

Step 9: Test WhatsApp

Send a WhatsApp message from the number set in WHATSAPP_OWNER_E164 to the WhatsApp account linked to OpenClaw.

In Terminal 1, watch the gateway logs. If you see an inbound WhatsApp message, the channel is connected.

WhatsApp test message and OpenClaw reply

If the inbound message appears but the assistant does not reply, check the troubleshooting section for API key or provider errors.

Step 10: Keep the Gateway Running

For this setup, keep openclaw gateway running in Terminal 1.

The deployment command remains:

sleep infinity

This keeps the Saturn deployment alive while OpenClaw runs inside your SSH session.

sleep infinity only keeps the deployment alive. It does not start OpenClaw by itself.

If your terminal session closes, start openclaw gateway again when you reconnect.

Do not change the deployment command after setup unless you have configured persistent storage for ~/.openclaw. Restarting or recreating the deployment without persistent storage can remove WhatsApp login state, browser approvals, and OpenClaw configuration.

Step 11: Troubleshooting

Check gateway logs

In the terminal running the gateway, watch the live logs. If you need the saved log file, run:

ls -la /tmp/openclaw
tail -100 /tmp/openclaw/openclaw-*.log

Gateway does not start

  • Re-run openclaw onboard with the exact command above.
  • Make sure the deployment URL routes to port 8000.

Deployment URL is missing

If Saturn does not show a deployment URL, create a route in Networking:

  • Container Port: 8000
  • Visibility: Org

Saturn Cloud networking route for port 8000

Device approval fails

  • Keep Terminal 1 running openclaw gateway.
  • Run approval commands from Terminal 2 only.
  • Do not stop the gateway before openclaw devices approve.

WhatsApp inbound arrives, but no assistant reply

If logs show inbound WhatsApp messages and then a provider 401 error, your channel is connected but your AI API key is invalid.

Check OPENAI_API_KEY and any custom provider URL settings.

openclaw gateway restart fails

Run openclaw gateway in Terminal 1 during setup.

WhatsApp asks for QR login again

This guide does not configure persistent storage.

If the deployment filesystem is reset, WhatsApp login state and browser device approvals may need to be repeated:

  • WhatsApp QR login
  • Browser device approval

Step 12: Security Notes

  • Keep all secrets in Saturn environment variables.
  • Restrict channels.whatsapp.allowFrom to your number.
  • Use token auth for gateway access.
  • Review plugins before installation and keep only required channels enabled.
  • This guide does not configure persistent storage. Treat the deployment filesystem as temporary unless you add persistent storage.
  • Do not share screenshots of the WhatsApp QR code while it is active.

Why Saturn Cloud Over a Raw VPS

Most OpenClaw VPS guides require extra infrastructure work: server hardening, firewall rules, service management, and SSL setup. Saturn Cloud reduces that setup overhead.

You get:

  • Managed container environment
  • Isolated container runtime
  • Built-in environment variable management
  • SSH access and routing controls from one dashboard

Support Resources

Summary

To deploy OpenClaw on Saturn Cloud:

  1. Create a Deployment with saturncloud/saturn-python and sleep infinity
  2. Add env vars for OpenAI, gateway token, public origin, and WhatsApp sender allowlist number
  3. Install OpenClaw in terminal
  4. Run onboarding on port 8000 and set allowedOrigins
  5. Configure WhatsApp and complete QR login
  6. Start gateway in Terminal 1
  7. Approve browser device from Terminal 2
  8. Test WhatsApp from the allowed sender number
  9. Keep openclaw gateway running in Terminal 1 while using OpenClaw

Keep reading

Related articles

How to Deploy OpenClaw on Saturn Cloud
Apr 3, 2026

Saturn Cloud vs AWS SageMaker for LLM Training

How to Deploy OpenClaw on Saturn Cloud
Apr 2, 2026

Run Claude Code on a Cloud GPU in 10 Minutes – No Root Workarounds Required

How to Deploy OpenClaw on Saturn Cloud
Apr 1, 2026

Running NVIDIA NIM on Saturn Cloud