Français
Commencer
← Tous les templates

Déployez OpenClaw sur Pethost en un clic

Un assistant IA qui vit dans vos messageries

Ce qui se passe

  1. Vous vous connectez à Pethost ou créez un compte, avec une clé d’accès, GitHub ou Google.
  2. Pas encore de machine ? Vous choisissez une offre, et nous en préparons une pour vous. Le lien attend dans votre navigateur qu’elle soit prête.
  3. Nouveau projet s’ouvre sur l’application. Vous remplissez ce qu’elle demande et cliquez sur Créer le projet : Clé d’API OpenAI (facultatif), Clé d’API Anthropic (facultatif).
  4. En une minute ou deux, l’application tourne à sa propre adresse en HTTPS. Ses secrets sont créés pour elle au hasard, et ses données sont dans la sauvegarde nocturne.
  5. C’est un projet comme les autres : son compose.yaml, son .env, ses logs et un terminal sont dans le panel, et votre agent peut le modifier, revenir à une version précédente ou le restaurer.

Premiers pas

Ouvrez l’adresse et collez le token de la gateway dans Gateway secret : c’est OPENCLAW_GATEWAY_TOKEN dans le .env du projet. Approuvez ensuite le navigateur, une seule fois, dans le terminal du service openclaw : openclaw devices list, puis openclaw devices approve <requestId>. La clé d’un modèle s’ajoute dans Settings, Models.

Ce qui tourne

Le template, c’est ce compose.yaml et les variables qu’il écrit dans le .env du projet. Pethost exécute le fichier tel qu’il est écrit.

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: