---
title: "Despliega OpenClaw en Pethost con un clic"
description: "Un asistente de IA que vive en tus apps de chat. Una plantilla para Pethost: en un par de minutos la app está en marcha en tu máquina, con HTTPS en su propia dirección y backups cada noche."
---

[← Todas las plantillas](https://pethost.dev/es/templates/)

# Despliega OpenClaw en Pethost con un clic

Un asistente de IA que vive en tus apps de chat

[Desplegar en Pethost](https://console.pethost.dev/?template=openclaw)

## Qué pasa

1. Inicias sesión en Pethost o creas una cuenta, con una passkey, GitHub o Google.
2. ¿Aún no tienes máquina? Eliges un plan y te preparamos una. El enlace espera en tu navegador hasta que esté lista.
3. Nuevo proyecto se abre en la app. Rellenas lo que pide y haces clic en Crear proyecto: **Clave de API de OpenAI** (opcional), **Clave de API de Anthropic** (opcional).
4. En un par de minutos la app está en marcha en su propia dirección con HTTPS. Sus secretos se generan al azar para ella, y sus datos entran en el backup de cada noche.
5. Es un proyecto como cualquier otro: su compose.yaml, su .env, sus logs y un terminal están en el panel, y tu agente puede cambiarlo, volver a una versión anterior o restaurarlo.

## Primeros pasos

Abre la dirección y pega el token del gateway en Gateway secret: es OPENCLAW_GATEWAY_TOKEN en el .env del proyecto. Luego aprueba el navegador una sola vez en el shell del servicio openclaw: openclaw devices list y después openclaw devices approve <requestId>. La clave de un modelo se agrega en Settings, Models.

## Qué ejecuta

La plantilla es este compose.yaml y las variables que escribe en el .env del proyecto. Pethost ejecuta el archivo tal como está escrito.

```
services:
  openclaw:
    image: ghcr.io/openclaw/openclaw:2026.10.3
    restart: unless-stopped
    environment:
      OPENCLAW_GATEWAY_TOKEN: ${OPENCLAW_GATEWAY_TOKEN}
      OPENAI_API_KEY: ${OPENAI_API_KEY:-}
      ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
    # The gateway answers 403 until its config names the proxy's network and the
    # origin the Control UI is opened from, and it has no flag or variable for
    # either. So the config is written once, into the state volume, where the app
    # keeps and rewrites it; then the image's own entrypoint starts the gateway.
    command:
      - sh
      - -c
      - |
        set -e
        cfg=/home/node/.openclaw/openclaw.json
        if [ ! -s "$$cfg" ]; then
          cat > "$$cfg" <<'JSON'
        {
          "gateway": {
            "mode": "local",
            "bind": "lan",
            "auth": { "mode": "token" },
            "trustedProxies": ["10.192.0.0/10"],
            "controlUi": { "allowedOrigins": ["${CONTROL_UI_ORIGIN}"] }
          }
        }
        JSON
          chmod 600 "$$cfg"
        fi
        if [ -f /app/docker-entrypoint.mjs ]; then
          exec node /app/docker-entrypoint.mjs node openclaw.mjs gateway --allow-unconfigured --bind lan --port 18789
        fi
        exec node openclaw.mjs gateway --allow-unconfigured --bind lan --port 18789
    volumes:
      - state:/home/node/.openclaw
      - auth-keys:/home/node/.config/openclaw
    # The image's own check runs every 3 minutes, so a deploy would wait that long.
    healthcheck:
      test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:18789/healthz').then(r=>process.exit(r.ok?0:1),()=>process.exit(1))"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 5m
      start_interval: 5s

volumes:
  state:
  auth-keys:
```

[compose.yaml](https://pethost.dev/templates/openclaw/compose.yaml)[Verla en GitHub](https://github.com/pethost-dev/templates/tree/main/openclaw)

Pethost · Stephan Gomer · NIP 1133096755

[Plantillas](https://pethost.dev/es/templates/) [Sobre nosotros](https://pethost.dev/about/) [Blog](https://pethost.dev/blog/) [Términos](https://pethost.dev/terms/) [Privacidad](https://pethost.dev/privacy/) [Reembolsos](https://pethost.dev/refunds/) [API](https://pethost.dev/docs/api/) [CLI](https://pethost.dev/docs/cli/) [Plugin](https://github.com/pethost-dev/plugin) [support@pethost.dev](mailto:support@pethost.dev)
