ローカルPCにOpenClawをデプロイ
Windows/Mac/Linux PCにOpenClawをデプロイ。個人利用や学習に最適
このページはローカルで動かすところまで。空のAgent、無防備なゲートウェイ、請求爆発が初週の3大失敗です。
- 結果パック → First Week Pack $29(強化 + 支出上限 + リサーチSkill)
- 無料で続ける → Skills インストール · Feishu · WeChat
- 詰まったら → ローカルトラブルシュート · FAQ
前提条件
- A computer (Windows/Mac/Linux)
- At least 4GB available memory (8GB recommended)
- Stable internet connection
- Node.js 22+ (if using npm installation)
ステップ
Docker Desktopをインストール
Dockerはパッケージングツールで、OpenClawをどのシステムでも動かせるようにします。
コマンド
Docker Desktopをダウンロードしてインストール:https://www.docker.com/products/docker-desktop curl -fsSL https://get.docker.com | sh ヒント
- Restart computer after installation
- Ensure Docker Desktop is running (whale icon in system tray)
- Windows users strongly recommended to use WSL2
macOSの追加準備
macOSユーザーはXcode Command Line Toolsを先にインストールする必要があります。
コマンド
xcode-select --install ヒント
- If already installed, it will show 'already installed'
- This enables AppleScript capabilities (needed for iMessage, Apple Notes skills)
設定フォルダの準備
OpenClawの設定とデータを保存するフォルダを作成します。
コマンド
mkdir -p ~/openclaw && cd ~/openclaw mkdir C:\openclaw && cd C:\openclaw ヒント
- This folder will store your config and chat history
- Recommended to place in user home directory for easy management
OpenClawイメージをプル
Docker HubからOpenClawイメージをダウンロードします。
コマンド
docker pull openclaw/openclaw:latest ヒント
- Image size is about 1-2GB, first download takes a few minutes
- Ensure stable network, configure Docker mirror accelerator if slow
OpenClawコンテナを実行
DockerでOpenClawサービスを起動し、データディレクトリをマウントします。
コマンド
docker run -d --name openclaw -p 18789:18789 -p 3000:3000 -v ~/openclaw/.openclaw:/root/.openclaw -v ~/openclaw/workspace:/workspace openclaw/openclaw:latest docker run -d --name openclaw -p 18789:18789 -p 3000:3000 -v C:\openclaw\.openclaw:/root/.openclaw -v C:\openclaw\workspace:/workspace openclaw/openclaw:latest ヒント
- Important: Must mount both directories, or config and chat history will be lost on restart
- ~/.openclaw stores runtime state, workspace stores YAML config files
- 18789 is Gateway WebSocket port, 3000 is Web UI port
サービスの起動を待機
OpenClawの初回起動には初期化が必要です。しばらくお待ちください。
コマンド
docker logs -f openclaw ヒント
- Seeing 'Gateway started' or similar log means startup successful
- Press Ctrl+C to exit log view (won't stop the service)
- First startup may take 1-2 minutes
Web UIにアクセス
ブラウザでOpenClaw管理画面を開きます。
コマンド
ブラウザでhttp://localhost:3000にアクセス ヒント
- First access requires setting admin password
- If can't access, wait 30 seconds and retry
- If port is occupied, modify port in run command
初期設定(オンボード)
モデルの選択、API Keyの設定、メッセージチャネルの設定など、初期設定を完了します。
コマンド
管理画面で「設定」→「モデル設定」→「モデルを追加」をクリック ヒント
- Google Gemini is recommended for beginners (has free quota)
- Claude, GPT-4, DeepSeek are also available
- See FAQ below for how to get API Key
デーモンのインストール(任意)
OpenClawをバックグラウンドで継続稼働させ、ターミナルを閉じても中断しないようにします。
コマンド
Dockerコンテナはバックグラウンド実行機能を内蔵しているため、追加設定は不要です ヒント
- Docker's --restart always ensures auto-start: docker update --restart always openclaw
- Mac users: run 'caffeinate -i' to prevent sleep disconnect
- Linux servers: recommend using systemd for management
よくある問題
ポートが使用中の場合は?
Dockerが起動に失敗する?
コンテナ再起動後に設定が消えた?
Macがスリープ後に切断される?
実行ログの確認方法は?
最新バージョンへの更新方法は?
Windowsで直接実行すると問題が?
装好了?第一周先买结果,或继续免费教程
本页不扣款。想买的人会在 24 小时内收到收款链接。免费路径仍在右边。