OpenClawをまだインストールしていませんか?ワンラインインストールコマンドはこちら
curl -fsSL https://openclaw.ai/install.sh | bash
iwr -useb https://openclaw.ai/install.ps1 | iex
curl -fsSL https://openclaw.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
パソコンへの影響が心配ですか? ClawTank ならクラウド上で動作し、インストール不要で誤削除のリスクもありません
主要な知見
  • CMDスクリプトは本質的にPowerShellラッパーである——install.cmd(102行)はinstall.ps1%TEMP%にダウンロードし、powershell -ExecutionPolicy Bypassで実行することで、エンタープライズ環境でよく見られるPowerShell実行ポリシーの制限を回避する
  • Onboard 2026.2.25ではQuickStartモードを導入——Gatewayポート18789、Loopbackバインド、Token Authデフォルト有効をワンクリックでセットアップし、旧バージョンで必要だったステップバイステップの手動設定を排除
  • Qwen OAuth無料モデル統合——Device Code Flow(chat.qwen.ai/authorize)を通じて認可を完了し、APIキーの手動ペーストが不要で、トークンの自動更新に対応
  • GatewayサービスのインストールにはAdministrator権限が必要(内部でschtasksに依存)——非管理者環境ではフォアグラウンドモードopenclaw gatewayを代替として使用可能。Gatewayが正常にリッスンしていれば、DashboardとTelegramが接続できる

I. なぜCMDインストールを選ぶのか

OpenClawはWindows上で3つのインストールパスを提供しています。PowerShellワンライナー(iwr | iex)、CMDスクリプト、WSL2配下のShellインストールです。これまでにPowerShellインストールパスWSL2デプロイガイドを記録しました。この記事では2番目のパス——CMDスクリプトインストールに焦点を当てます。

CMDインストールを選択する3つの実践的シナリオ:

  1. PowerShell実行ポリシーの制限:多くのエンタープライズ環境では、グループポリシーによりPowerShellのExecutionPolicyがRestrictedまたはAllSignedに設定され、未署名スクリプトの実行が禁止されています。install.cmd-ExecutionPolicy Bypassパラメータでこの制限を回避します。これが最も直接的な解決策です
  2. 非PowerShellターミナル環境:Git Bash、MSYS2、ConEmuなどのサードパーティターミナルでは、CMDスクリプトの方がPowerShellコマンドより直接実行しやすい
  3. CI/CDパイプラインの要件:一部のWindows CIランナー(JenkinsエージェントなどA)はデフォルトでPowerShellではなくCMDを使用し、install.cmdをビルドスクリプトに直接組み込めます

install.cmdの内部動作

公式のinstall.cmdは102行で、本質的にはスリムなPowerShellラッパーです[1]。そのコアロジックは4つのステージに分解できます。

  1. パラメータ解析:--git--npm(デフォルト)、--tag <ver>--no-onboard--no-git-update--dry-runをサポート
  2. プリフライトチェック:curlpowershellが利用可能かどうかを検証
  3. install.ps1のダウンロード:https://openclaw.ai/install.ps1から%TEMP%\openclaw-install.ps1にダウンロード
  4. 委任実行:powershell -NoProfile -ExecutionPolicy Bypass -File "%TMP%" %PS_ARGS%で実行し、テンポラリファイルを自動削除

重要な設計判断:-ExecutionPolicy Bypassにより、システムのExecutionPolicyがRestrictedに設定されていてもインストールスクリプトが実行できることを保証します。これがCMDインストールパスがPowerShellで直接iwr | iexを実行するのに対して持つ中核的な優位性です——後者は厳格なポリシー下ではブロックされます。

II. インストールプロセス

2.1 ワンラインインストールコマンド

CMDまたはCMDコマンドをサポートする任意のターミナルを開き、以下を実行します[1]

curl -fsSL https://openclaw.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

このコマンドは3つのステップで構成されています。install.cmdのダウンロード -> インストールの実行 -> インストールスクリプトの削除。テストでは、onboardステップを個別に記録するため、まず--no-onboardパラメータで実行しました。

D:\Projects> install.cmd --no-onboard

  OpenClaw Installer

[OK] Windows detected
[OK] Node.js v24.13.1 found
[*] Installing OpenClaw (openclaw@latest)...
[OK] OpenClaw installed

OpenClaw installed successfully (2026.2.25)!

Home sweet home. Don't worry, I won't rearrange the furniture.

Skipping onboard (requested). Run openclaw onboard later.

インストーラーはシステムにNode.js v24.13.1が既にインストールされていることを自動検出し、Node.jsのインストールステップをスキップして、npm install -g openclaw@latestによるグローバルインストールに直接進みました。プロセス全体で約30秒でした。

2.2 install.cmdスクリプトパラメータ一覧

パラメータ説明デフォルト
--npmnpm経由でインストール(デフォルト)はい
--gitgit checkoutからインストールいいえ
--tag <ver>インストールバージョンを指定latest
--no-onboardオンボーディングをスキップいいえ
--no-git-updategit pullをスキップ(gitインストール用)いいえ
--dry-run実際にはインストールせず実行予定のアクションを表示いいえ

2.3 インストール後のDoctor診断レポート

インストール後、openclaw doctorを実行してシステム状態を確認します。

C:\Users\HYC> openclaw doctor

┌  OpenClaw doctor
│
◇  Gateway ─────────────────────────────────────────────
│  gateway.mode is unset; gateway start will be blocked.
│  Fix: run openclaw configure and set Gateway mode.
│  Missing config: run openclaw setup first.
├───────────────────────────────────────────────────────

◇  Gateway auth ────────────────────────────────────────
│  Gateway auth is off or missing a token. Token auth
│  is now the recommended default (including loopback).
├───────────────────────────────────────────────────────

◇  State integrity ────────────────────────────────────────────
│  - OAuth dir not present (~\.openclaw\credentials).
│  - CRITICAL: Session store dir missing
│    (~\.openclaw\agents\main\sessions).
├──────────────────────────────────────────────────────────────

◇  Skills status ──────────
│  Eligible: 9
│  Missing requirements: 43
│  Blocked by allowlist: 0
├──────────────────────────

◇  Plugins ────────
│  Loaded: 4
│  Disabled: 32
│  Errors: 0
├──────────────────

◇  Gateway ─────────────────
│  Gateway not running.
│  Gateway service not installed.
├───────────────────────────

◇  Memory search ──────────────────────────────────────────
│  Memory search is enabled but no embedding provider
│  is configured. Semantic recall will not work.
├──────────────────────────────────────────────────────────

└  Doctor complete.

これはフレッシュインストール後の典型的な状態です。Gatewayは未設定、サービスは未登録、OAuthとSessionディレクトリは未作成です。後続のopenclaw onboardがこれらの各項目に対応します。

III. Onboardインタラクティブセットアップ完全記録

OpenClaw 2026.2.25のonboardウィザードは、以前のバージョンと比較して大幅な変更が加えられています。以下に、完全なインタラクティブフローのステップバイステップ記録を示します。

3.1 セキュリティ免責事項と確認

onboardはセキュリティ警告から始まります[4]

C:\Users\HYC> openclaw onboard

🦞 OpenClaw 2026.2.25 (4b5d4a4)

┌  OpenClaw onboarding
│
◇  Security ──────────────────────────────────────────────
│  Security warning — please read.
│
│  OpenClaw is a hobby project and still in beta.
│  By default, OpenClaw is a personal agent: one trusted
│  operator boundary.
│  This bot can read files and run actions if tools
│  are enabled.
│
│  Recommended baseline:
│  - Pairing/allowlists + mention gating.
│  - Multi-user/shared inbox: split trust boundaries.
│  - Sandbox + least-privilege tools.
│  - Keep secrets out of the agent's reachable filesystem.
│
│  Must read: https://docs.openclaw.ai/gateway/security
├─────────────────────────────────────────────────────────
│
◇  Continue? Yes

このセキュリティ免責事項はバージョン2026.2.25の注目すべき改善点です——OpenClawがデフォルトで「単一信頼オペレーター境界」であることを明示的にユーザーに通知し、具体的なセキュリティ強化推奨事項を提供します。

3.2 QuickStartモード

セキュリティ免責事項を確認した後、ウィザードはオンボーディングモードについて尋ねます。QuickStartはバージョン2026.2.25で導入された新モードで、Gatewayの基本設定をワンクリックで完了します。

◇  Onboarding mode
│  QuickStart
│
◇  QuickStart ─────────────────────────╮
│                                      │
│  Gateway port: 18789                 │
│  Gateway bind: Loopback (127.0.0.1)  │
│  Gateway auth: Token (default)       │
│  Tailscale exposure: Off             │
│  Direct to chat channels.            │
│                                      │
├──────────────────────────────────────╯

QuickStartは4つの主要設定を自動的に構成します。

3.3 Qwen OAuth認可フロー

Qwenをモデルプロバイダーとして選択すると、ウィザードはDevice Code Flow認可を開始します[10]

◇  Model/auth provider
│  Qwen
│
◓  Starting Qwen OAuth…
│
◇  Qwen OAuth ──────────────────────────────────────────────
│  Open https://chat.qwen.ai/authorize?user_code=-DPGH765
│  &client=qwen-code to approve access.
│  If prompted, enter the code -DPGH765.
├───────────────────────────────────────────────────────────

◇  Qwen OAuth complete
│
◇  Model configured ─────────────────────────────╮
│  Default model set to qwen-portal/coder-model  │
├────────────────────────────────────────────────╯
│
◇  Provider notes ─────────────────────────────────────────
│  Qwen OAuth tokens auto-refresh. Re-run login if
│  refresh fails or access is revoked.
│  Base URL defaults to https://portal.qwen.ai/v1.
├──────────────────────────────────────────────────────────

Device Code Flowの仕組み:ウィザードは認可URLと確認コードを表示します。ユーザーはブラウザでそのURLを開き、Qwenアカウントにログインして確認コードを入力すると認可が完了します。APIキーを手動でコピーする必要はまったくありません——トークンは自動的に設定ファイルに書き込まれ、自動更新にも対応しています。これはOpenClawで無料AIモデルを統合する最も手間のかからない方法です。

3.4 Telegram Botトークンの設定

ウィザードは利用可能なすべての通信チャネル(Telegram、WhatsApp、Discord、Slack、Signalなど23以上のチャネル)を表示します。Telegramを選択しました[5]

◇  Select channel (QuickStart)
│  Telegram (Bot API)
│
◇  Telegram bot token ──────────────────────────────────
│  1) Open Telegram and chat with @BotFather
│  2) Run /newbot (or /mybots)
│  3) Copy the token (looks like 123456:ABC...)
│  Docs: https://docs.openclaw.ai/telegram
├───────────────────────────────────────────────────────
│
◇  Enter Telegram bot token
│  <YOUR_BOT_TOKEN>

@BotFather[11]から取得したBot Tokenを入力すると、ウィザードは自動的にそれを%USERPROFILE%\.openclaw\openclaw.jsonに書き込み、Telegramプラグインを有効化します。

Updated ~\.openclaw\openclaw.json
Workspace OK: ~\.openclaw\workspace
Sessions OK: ~\.openclaw\agents\main\sessions

3.5 Skills検出とインストール

ウィザードはインストール可能なSkillsを検出し、不足している依存関係のインストールを試みます[6]

◇  Skills status ─────────────╮
│  Eligible: 9                │
│  Missing requirements: 35   │
│  Unsupported on this OS: 8  │
│  Blocked by allowlist: 0    │
├─────────────────────────────╯
│
◇  Install missing skill dependencies
│  🎮 gog, 🎙️ openai-whisper, 🗣️ sag
│
◇  Install failed: gog — brew not installed
◇  Install failed: sag — brew not installed
◇  Install failed: openai-whisper — brew not installed

3つのSkill(gog、openai-whisper、sag)はパッケージマネージャーの依存関係がHomebrewであり、ネイティブWindows環境ではHomebrewが利用できないため、インストールに失敗しました。これはネイティブWindowsインストールの既知の制限事項です——これらのSkillにはWSL2またはmacOS/Linux環境が必要です。

ウィザードはその後、各Skillが必要とするAPIキー(Gemini、Notion、OpenAI、ElevenLabs)を尋ね、一つずつ設定しました。

3.6 Hooksの設定

HooksはOpenClawの自動化メカニズムで、特定のイベントがトリガーされた時に事前定義されたアクションを実行します[7]

◇  Hooks ──────────────────────────────────────────────────
│  Hooks let you automate actions when agent commands
│  are issued.
│  Example: Save session context to memory when you
│  issue /new or /reset.
│  Learn more: https://docs.openclaw.ai/automation/hooks
├──────────────────────────────────────────────────────────
│
◇  Enable hooks?
│  📝 command-logger, 💾 session-memory
│
◇  Hooks Configured ────────────────────────────────
│  Enabled 2 hooks: session-memory, command-logger  │
├───────────────────────────────────────────────────╯

2つのHooksを有効化しました。

3.7 Gatewayサービスのインストール(非管理者では失敗)

これはonboardフローにおける唯一の失敗ポイントです。ウィザードはGatewayをWindowsサービスとして登録しようと試みます。

◇  Gateway service runtime ────────────────────────────────
│  QuickStart uses Node for the Gateway service
│  (stable + supported).
├──────────────────────────────────────────────────────────
│
◇  Gateway service install failed.
│
◇  Gateway ───────────────────────────────────────────────────
│  Run PowerShell as Administrator or rerun without
│  installing the daemon.
├─────────────────────────────────────────────────────────────
│
◇  Gateway ────────────────────────────────────────────────────
│  Tip: rerun from an elevated PowerShell (Start → type
│  PowerShell → right-click → Run as administrator) or
│  skip service install.
├──────────────────────────────────────────────────────────────

Gatewayサービスのインストールは内部でWindowsのschtasksツールに依存しており[3]schtasks /Createにはシステム管理者権限が必要です。CMDはAdministratorとして実行されていなかったため、インストールが拒否されました。

解決策:サービスのインストールをスキップし、代わりにフォアグラウンドモードを使用します。別のターミナルウィンドウでopenclaw gatewayを実行してGatewayを起動します。

C:\Users\HYC> openclaw gateway

🦞 OpenClaw 2026.2.25 (4b5d4a4)

23:26:11 [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/
23:26:11 [heartbeat] started
23:26:11 [health-monitor] started (interval: 300s, grace: 60s)
23:26:11 [gateway] agent model: qwen-portal/coder-model
23:26:11 [gateway] listening on ws://127.0.0.1:18789, ws://[::1]:18789 (PID 17284)
23:26:11 [gateway] log file: \tmp\openclaw\openclaw-2026-02-27.log
23:26:11 [browser/server] Browser control listening on http://127.0.0.1:18791/ (auth=token)
23:26:12 [hooks:loader] Registered hook: boot-md -> gateway:startup
23:26:12 [hooks:loader] Registered hook: bootstrap-extra-files -> agent:bootstrap
23:26:12 [hooks:loader] Registered hook: command-logger -> command
23:26:12 [hooks:loader] Registered hook: session-memory -> command:new, command:reset
23:26:12 [hooks] loaded 4 internal hook handlers
23:26:14 [telegram] [default] starting provider (@openclaw4_1989_bot)
23:26:16 [gateway] device pairing auto-approved
23:26:16 [ws] webchat connected

Gatewayは正常に起動し、ws://127.0.0.1:18789でリッスンしています。Telegramプロバイダーが開始され、Dashboard WebSocket接続が確立されました。フォアグラウンドモードの唯一の制限は、ターミナルウィンドウを閉じるとサービスが停止することです——テストと機能検証には十分です。永続化については、PowerShellインストール記事の3つのGateway起動パスを参照してください。

3.8 Telegramペアリング

Gateway起動後、TelegramでBotに任意のメッセージを送信すると、Botはペアリング情報を返信します。

OpenClaw: access not configured.

Your Telegram user id: 1186367637

Pairing code: WR8XRQQA

Ask the bot owner to approve with:
openclaw pairing approve telegram WR8XRQQA

別のターミナルウィンドウで承認コマンドを実行します。

C:\Users\HYC> openclaw pairing approve telegram WR8XRQQA

Approved telegram sender 1186367637.

ペアリングが完了すると、TelegramアカウントでOpenClaw Botと正常に通信できるようになります。ペアリングメカニズムはOpenClawのデフォルトセキュリティポリシーです——未承認のTelegramユーザーはBotと対話できず、不正アクセスを防止します[4]

3.9 ヘルスチェックとDashboard

Gatewayが起動する前は、onboardのヘルスチェックは失敗します(Gatewayがまだ実行されていないため)。

Health check failed: gateway closed (1006 abnormal closure
  (no close frame)): no close reason
  Gateway target: ws://127.0.0.1:18789
  Source: local loopback

openclaw gatewayを手動で起動した後、Dashboardは正常に接続できます。

◇  Dashboard ready ──────────────────────────────────────────────
│  Dashboard link (with token):
│  http://127.0.0.1:18789/#token=c64c519ab77de4e0c14584ea...
│  Opened in your browser.
├────────────────────────────────────────────────────────────────

IV. CMD vs PowerShell vs WSL2インストール比較

Windows上の3つのインストールパスには、それぞれ適したシナリオがあります[8]

比較項目CMDスクリプトPowerShellWSL2
インストールコマンドinstall.cmdiwr | iexcurl | bash
基盤メカニズムCMD -> PowerShellラッパー直接PowerShellネイティブShell
ExecutionPolicy制限時動作する(Bypass内蔵)手動Bypassが必要影響なし
Gateway永続化schtasks(管理者権限必要)schtasks(管理者権限必要)systemd(root不要)
Skills互換性一部のUnixツール利用不可一部のUnixツール利用不可完全なLinuxツールチェーン
Homebrew利用不可利用不可インストール可能
適したシナリオ制限付きエンタープライズ環境、CI/CD一般的なWindowsユーザー長期デプロイ、フル機能

結論:CMDとPowerShellのインストールは同一の最終結果を生成します(両方ともnpm install -g openclaw@latest)。唯一の違いは、CMDスクリプトがExecutionPolicyをバイパスする機能を提供することです。環境にPowerShellの制限がなければ、どちらでも同じ結果が得られます。完全なSkillsサポートとHomebrewエコシステムが必要な場合は、WSL2が依然として最良の選択肢です。

V. Onboard後のDoctorレポート分析

onboard完了後にopenclaw doctorを再度実行すると、インストール直後の初期状態からの変化が確認できます。

C:\Users\HYC> openclaw doctor

┌  OpenClaw doctor
│
◇  State integrity ────────────────────────────────────────
│  - CRITICAL: OAuth dir missing
│    (~\.openclaw\credentials).
├──────────────────────────────────────────────────────────

◇  Skills status ──────────
│  Eligible: 13
│  Missing requirements: 39
│  Blocked by allowlist: 0
├──────────────────────────

◇  Plugins ────────
│  Loaded: 6
│  Disabled: 30
│  Errors: 0
├──────────────────

◇  Gateway ─────────────────
│  Gateway not running.
├───────────────────────────

◇  Gateway connection ──────────────────────────
│  Gateway target: ws://127.0.0.1:18789
│  Source: local loopback
│  Config: C:\Users\HYC\.openclaw\openclaw.json
│  Bind: loopback
├───────────────────────────────────────────────

◇  Memory search ──────────────────────────────────────────
│  Memory search is enabled but no embedding provider
│  is configured.
├──────────────────────────────────────────────────────────

◇  Gateway ──────────────────────
│  Gateway service not installed.
├────────────────────────────────

└  Doctor complete.

Onboard前後の比較:

項目Onboard前Onboard後変化
有効なSkills913+4(APIキー設定により有効化)
不足している要件4339-4
読み込まれたPlugins46+2(Telegram + Hooks)
無効なPlugins3230-2
Gatewayモードunsetlocal設定済み
Gateway authoffToken有効化
Session storemissingOK作成済み

残りの項目:

まとめ

CMDインストールパスは、Windows上のOpenClawにおける最後のピースを埋めるものです。PowerShell実行ポリシーが制限されたエンタープライズ環境にとって、install.cmdはゼロフリクションのインストール体験を提供します。さらに、2026.2.25のonboardウィザード——特にQuickStartモードとQwen OAuth統合——は、初回セットアップの複雑さを大幅に軽減しています。

3つのWindowsインストールパスすべてが完全に文書化されました。PowerShell版、この記事のCMD版、そしてWSL2デプロイガイドです。OpenClawを削除する場合は、Windows完全削除実践記録を参照してください。