Independent Field Manual — Not affiliated with, endorsed by, or operated by OpenClaw
Navigation

basics

What Is OpenClaw?

A field-manual explanation of OpenClaw's architecture: Gateway, channels, models, tools, remote access, and the security risks beginners must understand before installing.

Read in Hinglish
Difficulty
beginner
Duration
12 minutes
Tested On
Conceptual guide — no commands to run
Access Mode
Read before install
Pre-flight status
Pre-Flight Approved
Risk low
Gateway Private
On this page
Safe guide Conceptual guide. No commands to run. Read this before installing OpenClaw on a VPS.

Short answer

OpenClaw is a self-hosted agent runtime. You install it on a server (usually a VPS), and it connects AI models (like Claude or GPT) to messaging channels (like Telegram or WhatsApp) and tools (like file access or web search). The central process that coordinates everything is called the Gateway.

If you are here because you want to set up OpenClaw, start by understanding the moving parts below, then follow the recommended beginner path.

Who this is for

This guide is for anyone who has heard about OpenClaw but is not yet clear on:

  • What the Gateway actually does
  • How channels, models, and tools connect
  • What “self-hosted” means in practice
  • Why security is not optional
  • What risks come with running an agent that has real tool access

The four main components

1. Gateway

The Gateway is the core server process. It is a Node.js application that runs on your VPS and listens on port 18789 by default.

The Gateway:

  • Receives incoming messages from connected channels
  • Routes messages to the configured AI model
  • Executes tool calls requested by the model
  • Serves the web dashboard for monitoring and configuration
  • Manages authentication, channel state, and session persistence

If the Gateway stops, everything stops — no messages are processed, no tools execute, and the dashboard becomes unreachable.

2. Channels

A channel is a messaging platform that connects to the Gateway. OpenClaw supports multiple channels:

  • Telegram — the most common for Indian builders. Uses BotFather tokens and supports allowlist-based access control.
  • WhatsApp — requires a phone number and QR-code session. Carries additional privacy risks because of personal contact access.
  • Web dashboard — a browser-based interface served by the Gateway itself.
  • Other channels — Discord, Slack, Matrix, and more depending on your configuration.

Each channel uses a token or session to authenticate with the Gateway. If these tokens are leaked, someone else can impersonate your bot or read your messages.

3. Models

Models are the AI providers that power the agent’s reasoning. OpenClaw connects to providers like:

  • Anthropic (Claude)
  • OpenAI (GPT)
  • Local models via Ollama or similar

Each provider requires an API key stored in your server’s environment file (.env). These keys are billed — if someone gains access to your Gateway and your API key, they can consume your credits.

4. Tools

Tools are capabilities that the agent can use. Examples include:

  • File system access (read, write, delete files on your server)
  • Shell command execution
  • Web search
  • API calls to external services
  • Database queries

Tools are the highest-risk component. A misconfigured tool permission can allow the agent (or anyone who can send it messages) to execute arbitrary commands on your server.

How the pieces connect

┌─────────────┐     ┌─────────────┐     ┌──────────────┐
│  Telegram    │────▶│             │────▶│  AI Model    │
│  WhatsApp    │     │   Gateway   │     │  (Claude,    │
│  Dashboard   │◀────│  :18789     │◀────│   GPT, etc.) │
└─────────────┘     │             │     └──────────────┘
                    │             │
                    │             │────▶ Tools (files,
                    │             │◀──── shell, APIs)
                    └─────────────┘
  1. A message arrives from a channel (e.g., Telegram).
  2. The Gateway receives it and sends it to the configured AI model.
  3. The model responds, possibly requesting tool calls.
  4. The Gateway executes the tools and returns results to the model.
  5. The final response is sent back through the channel.

What “self-hosted” means

OpenClaw runs on your server. Unlike a SaaS product:

  • You manage the VPS, its operating system, its firewall, and its updates.
  • You store the API keys, bot tokens, and session data.
  • You decide who can access the Gateway and what tools the agent can use.
  • You are responsible for security — there is no hosted backend protecting you.

This gives you full control and full responsibility.

Security posture summary

ComponentRisk if compromisedKey protection
Gateway processFull system accessBind to localhost, use SSH tunnel or Tailscale
Channel tokensBot impersonation, message interceptionStore in .env with chmod 600, never commit to Git
API keysFinancial loss (credit consumption)Same as tokens — .env with strict permissions
Tool permissionsArbitrary command execution on serverReview and restrict before connecting public channels
DashboardConfig and log exposureAccess via SSH tunnel only — never expose publicly

Common misconceptions

“OpenClaw is just a chatbot.” — No. It is an agent with tool access. A chatbot replies to messages. An agent can read files, execute commands, make API calls, and modify your server.

“I need to open port 18789 to use the dashboard.” — No. Use an SSH tunnel or Tailscale for private access. Opening the port exposes your Gateway to the internet.

“Running ufw allow 18789 is a quick fix.” — It is a quick way to expose your entire AI infrastructure to public internet scanners. See the port 18789 guide for safe alternatives.

“I can use my personal WhatsApp number safely.” — Using a personal number means the agent may process your private contacts’ messages. Use a dedicated WhatsApp number instead.

What not to do

  • Do not install or run OpenClaw as the root user.
  • Do not bind the Gateway to 0.0.0.0 unless you understand TLS, auth, and reverse proxy hardening.
  • Do not share bot tokens, API keys, or session data in public forums, screenshots, or GitHub issues.
  • Do not enable shell execution tools on a bot with open DM access.
  • Do not skip the VPS security checklist before connecting channels.

Next steps

  1. Read the Start Here page for the recommended beginner path.
  2. If you already have a VPS, go to Fresh Ubuntu VPS Setup.
  3. If you want to understand port 18789, read the Gateway port guide.
  4. If you want to check terms, browse the Glossary.

When to ask for setup help

If you are not sure whether your setup is safe, or if you are seeing errors you do not understand, use the Setup Help service. We can review your architecture using only redacted logs and high-level descriptions — we will never ask for raw API keys, bot tokens, WhatsApp session data, or root passwords.

Sources

ClawReady.in is an independent educational resource and setup service. It is not affiliated with, endorsed by, or operated by OpenClaw.