Deploy OpenClaw WhatsApp

Personal AI assistant on WhatsApp via OpenClaw

Deploy OpenClaw WhatsApp

/data

Deploy and Host OpenClaw WhatsApp (Self-Hosted AI Assistant Gateway) on Railway

OpenClaw WhatsApp turns a phone number into a private AI assistant via the OpenClaw Gateway. Pair WhatsApp Web by scanning a QR from the gateway, approve your number with an E.164 allow list, then chat with Claude, Codex, or a local model. Railway keeps the gateway online, stores pairing state on a volume, and exposes the Control UI.

About Hosting OpenClaw WhatsApp on Railway (self hosted OpenClaw WhatsApp template)

The OpenClaw Gateway is the control plane for sessions, tools, events, and channels. This template deploys one service on port 18789 with a health check at /healthz and a volume at /data. State, including WhatsApp credentials, lives under /data/.openclaw; the workspace also sits under /data so transcripts and tool outputs survive redeploys.

Why Deploy OpenClaw WhatsApp, the ChatGPT alternative on Railway (Railway Free Trial)

A hosted WhatsApp agent gives you a familiar chat surface without a closed SaaS account. OpenClaw is MIT licensed, so the gateway code is auditable and your pairing credentials stay on the Railway volume. You pay only for model API calls and a small container. Railway's free trial covers the initial deploy.

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying OpenClaw WhatsApp on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

Railway vs Other Hosting Providers and VPS for OpenClaw WhatsApp self hosting

ProviderStrengthsTrade-offs for OpenClaw WhatsApp
DigitalOceanPredictable droplet pricing, simple firewall, good Docker and Node docs.You manage TLS, reverse proxy, and persistent volume. WhatsApp pairing needs SSH or a carefully exposed Control UI.
AWSGranular IAM, ECS or EC2 options, Secrets Manager for keys.Higher overhead and cost. The QR flow needs a public HTTPS endpoint, so you configure a load balancer or CloudFront unless you run the TUI locally.
HetznerCheap VPS with generous RAM, ideal for the Chromium browser image.No managed Railway-style pipeline. You install Node or Docker, harden the server, and manage updates. WhatsApp ban risk is unchanged.

Common Use Cases for hosted OpenClaw WhatsApp

  • A personal assistant you can message without installing a new app. Pair once, then ask for summaries, drafts, or research.
  • A shared family or small team channel where only E.164 numbers in allowFrom can trigger the agent. Unknown senders stay unpaired or receive a DM pairing code.

Dependencies for OpenClaw WhatsApp Docker hosted on Railway

This template depends on a public Railway domain for the Control UI and on the gateway token for first-run approval. WhatsApp uses WhatsApp Web pairing, so you do not need a WhatsApp Business API or a Meta developer account.

Deployment Dependencies for Managed OpenClaw WhatsApp Service (AI Assistant)

The Railway service needs a writable volume at /data, port fixed to 18789, and the generated OPENCLAW_GATEWAY_TOKEN. The start command runs as the node user after chowning the volume.

Implementation Details for OpenClaw WhatsApp (Using OpenClaw official docker image)

The deploy uses openclaw/openclaw or ghcr.io/openclaw/openclaw; the -browser tag includes Chromium. The start command chowns /data, parses OPENCLAW_RAILWAY_CONFIG, sets gateway mode to local, publicOrigin and allowedOrigins from RAILWAY_PUBLIC_DOMAIN, and trustedProxies to 100.64.0.0/10, then runs the gateway on 18789 with --allow-unconfigured.

How does OpenClaw WhatsApp compare against other AI assistant platforms

OpenClaw vs Hermes Agent

  • License and focus: OpenClaw is an MIT licensed gateway for channels, tools, and sessions. Hermes Agent from Nous Research is also MIT licensed but is a Python learning loop with skills and can migrate from OpenClaw.

OpenClaw vs Open WebUI

  • Core purpose: OpenClaw is a multi-channel agent gateway. Open WebUI is a chat UI for models, often paired with Ollama.
  • WhatsApp support: OpenClaw pairs WhatsApp directly. Open WebUI has no native WhatsApp channel; you need a separate bridge.

OpenClaw vs n8n AI agents

  • Automation model: n8n is workflow automation with AI nodes. OpenClaw is an agent gateway that executes tools and skills from chat.
  • WhatsApp trigger: n8n can receive webhooks and call AI nodes, but WhatsApp integration usually needs third-party API bridges. OpenClaw pairs WhatsApp Web directly.

OpenClaw vs ChatGPT

  • Ownership: ChatGPT is a closed SaaS assistant. OpenClaw is open source and self-hosted.
  • WhatsApp access: ChatGPT has no self-hosted WhatsApp channel. OpenClaw uses your own number and model keys.
  • Data control: With OpenClaw on Railway, WhatsApp history and tool outputs stay in your volume. ChatGPT stores conversations on OpenAI infrastructure.

How to use OpenClaw WhatsApp (the OSS AI assistant)?

Start with the Railway deploy and wait for the public URL to become healthy. Paste the gateway token into the Control UI and approve your browser device. Add a model key, then connect WhatsApp. In the Railway service shell run openclaw channels login, select WhatsApp, and scan the QR code from your phone under Linked devices.

How to self host OpenClaw WhatsApp on other VPS Services (OpenClaw WhatsApp self hosting guide)

Clone the Repository

You do not need to clone the repository for the Docker image, but for a source install you can clone the OpenClaw repo from GitHub. The MIT license lets you inspect the WhatsApp channel code. On a VPS, the fastest path is often the npm package or the install script.

Install Dependencies

Use Node 24.16 or newer, or Node 26.1 or newer. Run curl -fsSL https://openclaw.ai/install.sh | bash or install globally with npm install -g openclaw@latest. For the browser variant with Chromium, use the Docker image openclaw/openclaw or ghcr.io/openclaw/openclaw and choose the -browser tag.

Configure Environment Variables

Set OPENCLAW_GATEWAY_PORT to 18789, OPENCLAW_GATEWAY_BIND to lan, and point OPENCLAW_STATE_DIR, OPENCLAW_CONFIG_DIR, OPENCLAW_CONFIG_PATH, and OPENCLAW_WORKSPACE_DIR at a writable directory. Set HOME and OPENCLAW_HOME to the same user home. Add OPENAI_API_KEY or ANTHROPIC_API_KEY later.

Start the OpenClaw WhatsApp Application

Run openclaw gateway --bind lan --port 18789 --allow-unconfigured as your service user. Then run openclaw onboard --install-daemon if you want systemd management. Open the Control UI, approve your device, add a model key, and run openclaw channels login for WhatsApp. Scan the QR code and set allowFrom and DM pairing policies from the Control UI or CLI.

Official Pricing of OpenClaw WhatsApp (OpenClaw pricing)

OpenClaw is free and open source under the MIT license. There is no paid plan for the gateway, no per-channel fee, and no seat license. You pay only for the model provider you use, such as OpenAI, Anthropic, or a local model that costs electricity. The WhatsApp channel uses the WhatsApp Web protocol and does not require a WhatsApp Business API subscription.

OpenClaw WhatsApp cloud vs self hosted comparison (Pricing, features, costs, and more)

Monthly cost of self hosting OpenClaw WhatsApp on Railway

Expect about $10 to $25 per month on Railway for a container with 1 to 2 GB of RAM, especially with the browser image. Railway's $5 trial can cover the first deploy. Model API costs are separate and vary by provider. Light usage with short prompts might add a few dollars per month.

System Requirements for Hosting OpenClaw WhatsApp on a VPS

A basic VPS with 1 GB RAM can run the standard image, but the browser variant needs at least 2 GB. Ten GB of disk is enough for the gateway, tools, and a few weeks of session data. One vCPU is fine for text chat; heavier tool use or browser automation benefits from two vCPUs. A public IP and a domain with TLS are required to access the Control UI remotely.

Frequently Asked Questions (FAQs)

Does WhatsApp ban numbers used with OpenClaw?

Yes, WhatsApp may ban numbers that show automated behavior. Use a dedicated number, avoid mass messaging, set a conservative DM pairing policy, and do not send unsolicited messages. Risk is higher for group blasting or rapid tool-triggered replies.

Can I connect an existing personal WhatsApp number?

You can, but it is safer to use a dedicated number. If your main number gets flagged, you lose access to personal chats. The allowFrom list protects who can drive the agent, but WhatsApp's own anti-spam rules still apply.

How do I stop strangers from messaging my OpenClaw agent?

Set allowFrom to your E.164 number and enable the DM pairing policy. Unknown senders will be ignored or asked for a pairing code. In groups, use gating so the agent only responds to mentions or a command prefix.

Do I need the WhatsApp Business API?

No. OpenClaw uses WhatsApp Web pairing, the same linked device mechanism as the browser or desktop app. You scan a QR code from the gateway and the phone treats the gateway as a linked device.

Will a Railway redeploy break WhatsApp pairing?

No. The pairing session is stored on the /data volume under /data/.openclaw. As long as the volume persists, a redeploy or restart does not require re-scanning the QR code.

Can I use OpenClaw WhatsApp with a local model instead of OpenAI?

Yes. OpenClaw treats model providers as plugins. You can add another provider, including a local one, in the gateway's model config. The WhatsApp channel does not care which model you use, as long as the gateway can call it.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
7
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
88