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

Port — OpenClaw Glossary

A numbered network endpoint (0–65535) that identifies a specific service on a server. When a program listens on a port, it accepts incoming network connections on that number. OpenClaw Gateway listens on port 18789 by default.

Term
Port
OpenClaw Relevance
OpenClaw Gateway listens on port 18789 by default. This is the port where the da…
On this page
Hinglish Explanation

Port ek number hai jo server par kisi specific service ko identify karta hai. Jaise SSH port 22 par sunta hai, waise hi OpenClaw Gateway port 18789 par sunta hai. Agar aap firewall mein port 18789 allow karte ho, toh wo service internet se accessible ho jaati hai.

What is a port?

A port is a numbered endpoint (ranging from 0 to 65535) that identifies a specific service running on a computer. Think of your server’s IP address as a building address, and ports as apartment numbers inside that building. Each service listens on its own port number.

Common ports:

PortService
22SSH (remote server access)
80HTTP (web traffic)
443HTTPS (encrypted web traffic)
18789OpenClaw Gateway (dashboard + API)

When you run a firewall command like ufw allow 22, you are telling the firewall to let incoming traffic reach port 22 (SSH). When you run ufw allow 18789, you are opening OpenClaw Gateway to the entire internet.

Why it matters for OpenClaw

OpenClaw Gateway listens on port 18789 by default. This port serves the dashboard web interface, the internal API, and the connection layer for channels like Telegram and WhatsApp.

By default, the Gateway binds to 127.0.0.1:18789 (localhost only), which means only processes running on the same server can reach it. This is the safe default.

The danger comes when users change the binding to 0.0.0.0:18789 or open port 18789 in their firewall. This makes the Gateway reachable from any IP address on the internet.

Common mistake

Opening port 18789 in UFW to access the dashboard from a browser.

Many beginners see ERR_CONNECTION_REFUSED and immediately run:

# DO NOT run this — exposes Gateway to the public internet
sudo ufw allow 18789

This “fixes” the connection error but creates a critical security hole. Anyone who discovers your server’s IP can now access your dashboard, read your conversations, and use your API keys.

Fix: Use an SSH tunnel instead:

ssh -L 18789:localhost:18789 clawuser@your_server_ip

Then access http://localhost:18789 in your local browser. The traffic stays encrypted and private.

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