OpenClawSkills
GitHub
Gateway / Operaciones • 5 min de lectura

Configuración de Gateway Remoto

Configuración de túnel SSH para conectar OpenClaw.app a un Gateway remoto.

OpenClaw.app usa túneles SSH para conectarse a gateways remotos. Esta guía explica cómo configurarlo.

Tutorial.step

Resumen

Terminal
┌─────────────────────────────────────────────────────────────┐
│                        Máquina Cliente                       │
│                                                              │
│  OpenClaw.app ──► ws://127.0.0.1:18789 (puerto local)        │
│                     │                                        │
│                     ▼                                        │
│  Túnel SSH ─────────────────────────────────────────────────│
│                     │                                        │
└─────────────────────┼──────────────────────────────────────┘
                      │
                      ▼
┌─────────────────────────────────────────────────────────────┐
│                       Máquina Remota                         │
│                                                              │
│  Gateway WebSocket ──► ws://127.0.0.1:18789 ──►              │
│                                                              │
└─────────────────────────────────────────────────────────────┘
Tutorial.step

Configuración Rápida

#

Tutorial.step

Paso 1: Agregar configuración SSH

Edita ''~/.ssh/config'' y agrega:

Ssh
Host remote-gateway
    HostName '<REMOTE_IP>'          # ej., 172.27.187.184
    User '<REMOTE_USER>'            # ej., jefferson
    LocalForward 18789 127.0.0.1:18789
    IdentityFile ~/.ssh/id_rsa

Reemplaza ''<REMOTE_IP>'' y ''<REMOTE_USER>'' con tus valores.

#

Tutorial.step

Paso 2: Copiar clave SSH

Copia tu clave pública a la máquina remota (ingresa contraseña una vez):

Bash
ssh-copy-id -i ~/.ssh/id_rsa '<REMOTE_USER>'@'<REMOTE_IP>'

#

Tutorial.step

Paso 3: Establecer token del Gateway

Bash
launchctl setenv OPENCLAW_GATEWAY_TOKEN "'<tu-token>'"

#

Tutorial.step

Paso 4: Iniciar túnel SSH

Bash
ssh -N remote-gateway &

#

Tutorial.step

Paso 5: Reiniciar OpenClaw.app

Bash
open /ruta/a/OpenClaw.app

La app se conectará al gateway remoto via el túnel SSH.

Tutorial.step

Solución de Problemas

Verificar si el túnel está ejecutándose:

Bash
ps aux | grep "ssh -N remote-gateway" | grep -v grep
lsof -i :18789

Reiniciar el túnel:

Bash
launchctl kickstart -k gui/$UID/bot.molt.ssh-tunnel

Detener el túnel:

Bash
launchctl bootout gui/$UID/bot.molt.ssh-tunnel

--- |

ReferenceGatewayRemoteGatewayReadmePage.step08.item1

ReferenceGatewayRemoteGatewayReadmePage.step08.item2

ReferenceGatewayRemoteGatewayReadmePage.step08.item3

ReferenceGatewayRemoteGatewayReadmePage.step08.item4

OpenClaw.app se conecta a ''ws://127.0.0.1:18789'' en la máquina cliente. El túnel SSH reenvía esa conexión al puerto 18789 en la máquina remota donde se está ejecutando el gateway.