ども@s_hirokiです。
今回はOpenClawを導入してローカルLLMと連携をとれるようにしたのでそこまでのやり方を記事にしようと思います。
はじめに
OpenClawに強力な権限を渡すので色んなことが出来る反面、脆弱性を突かれると色んな情報が流出してしまうリスクあるので、セキュリティには十分気をつけて使用しましょう。
実際に脆弱性が見つかって、そこからAPIキーなどの重要情報が流出したという話もあります。
アップデートの頻度もすごいので、古いバージョンを使い続けるのではなく日々アップデートすることを心がけましょう。
ご利用は自己責任でお願いします。
元々はOpenWebUIを導入して外部からローカルLLMを呼べるようにしようと思っていたけれど、OpenClaw(旧:Clawdbot、Moltbot)に関する情報をSNSで見かけるようになって、こっちのほうがもっと色んなことを出来るのでは?と思い構築してみることにしました。
OpenClawは色んなことが出来る関係上、メインPCとは別のところで稼働させてた方が良いよねって思い、仮想環境の利用なども考えましたが今回はRaspberryPi上に構築することを決めました。
構成はこんな感じにしました。
[ Discord ]
└ BOT
↓ チャットで指示
[ Raspberry Pi 5 ]
└ OpenClaw
↓ HTTP(API)
[ 別PC ]
└ LM Studio
マシンスペック
まずは、今回の構築にあたり使用しているPCスペックは以下の通り。
ローカルLLM用マシン
| パラメータ | 詳細 |
|---|---|
| PC | GMKtec K12 |
| CPUモデル | AMD Ryzen™ 7 H 255 |
| CPU | Ryzen 200 シリーズ、8コア16スレッド、Zen 4 3.8GHz ベース 4.9GHz 最大、8MB L2、16MB L3、TDP 35-54W(最大65W) |
| メモリ(RAM) | 64GB DDR5 SO-DIMM×2 5600 MT/s |
| GPU | AMD Radeon™ 780M、12コア、2600 MHz |
| OS | Windows11 |
OpenClaw用マシン
| パラメータ | 詳細 |
|---|---|
| PC | Raspberry Pi 5 |
| CPU | 2.4GHz quad-core 64-bit Arm Cortex-A76 |
| メモリ(RAM) | LPDDR4X-4267 SDRAM (8GB) |
| GPU | VideoCore VII (OpenGL ES 3.1, Vulkan 1.2に対応) |
| OS | Raspberry Pi OS 64-bit |
24時間つけっぱなしを想定しているので、温度が上がりにくいヒートシンクケースを買いました。
前提
- LM Studioが設定済であること
- 未設定の場合は以下を参考にしていただければと
- https://qiita.com/s_hiroki/items/bba6d407b0f2489d558b
前準備
Raspberry Piの初期設定
LM Studio側の準備
LM Studioを起動して、以下の手順でサーバーを立ち上げます。
左メニューの[Developer]をクリック
↓
[Local Server]をクリック
↓
[+ Load Model]をクリック
↓
Modelを選択(ここは好みでお好きなLLMを選択してください)
[Server Setting]からローカルネットワークで提供にチェックをつけます。
設定が出来たら[Start server]をクリック
URLが表示されたら設定完了です。
疎通確認
# xxxの部分はご自身のIPに置き換えてください。
> curl -s "http://xxx.xxx.xxx.xxx:1234/v1/models" | jq ".data[0:5]"
[
{
"id": "openai/gpt-oss-20b",
"object": "model",
"owned_by": "organization_owner"
},
{
"id": "text-embedding-nomic-embed-text-v1.5",
"object": "model",
"owned_by": "organization_owner"
}
]
無事に疎通完了しました。
いざOpenClawの構築!
Raspberry Pi側のターミナルを起動し以下のコマンドを叩いていきます。
①OpenClawのインストール
OpenClawを動かすにはNodeが必要なので入れていきます。
まずはfnmのインストール
$ curl -fsSL https://fnm.vercel.app/install | bash
Checking dependencies for the installation script...
Checking availability of curl... OK!
Checking availability of unzip... OK!
Downloading https://github.com/Schniz/fnm/releases/latest/download/fnm-arm64.zip...
######################################################################## 100.0%
Installing for Bash. Appending the following to /home/xxxxx/.bashrc:
# fnm
FNM_PATH="/home/xxxxx/.local/share/fnm"
if [ -d "$FNM_PATH" ]; then
export PATH="$FNM_PATH:$PATH"
eval "`fnm env`"
fi
In order to apply the changes, open a new terminal or run the following command:
source /home/xxxxx/.bashrc
$ source ~/.bashrc
$ fnm --version
fnm 1.38.1
Nodeの22を入れていきます。
$ fnm install 22
Installing Node v22.22.0 (arm64)
00:00:02 ████████████████████████████████████████████████████████████████████████████████ 28.59 MiB/28.59 MiB (10.35 MiB/s, 0s)
$ fnm default 22
$ node -v
v22.22.0
pnpmを有効化していきます。
$ corepack enable
xxxxx@raspberrypi:~/Workspace
$ corepack prepare pnpm@latest --activate
Preparing pnpm@latest for immediate activation...
$ pnpm -v
10.30.3
# OpenClawをグローバルにいれるために実行
$ pnpm setup
Appended new lines to /home/xxxxx/.bashrc
Next configuration changes were made:
export PNPM_HOME="/home/xxxxx/.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
To start using pnpm, run:
source /home/xxxxx/.bashrc
# 再読込します
$ source ~/.bashrc
いよいよOpenClawのインストールをしていきます。
※2026-03-01現在の最新であるv2026.2.26を入れるとDiscordと連携がうまく取れませんでした。
pnpm add -g openclaw@latest
で最新を入れたいところですが、今回はv2026.2.23を入れていきます。
次のバージョンから改善されるみたい。
今回はバージョン指定してインストールしていきます。
$ pnpm add -g openclaw@2026.2.23
Downloading openclaw@2026.2.23: 23.02 MB/23.02 MB, done
WARN Request took 17930ms: https://registry.npmjs.org/@types%2Fnode
WARN Request took 10389ms: https://registry.npmjs.org/@smithy%2Fhash-node
WARN Request took 10168ms: https://registry.npmjs.org/@types%2Fws
WARN Request took 13571ms: https://registry.npmjs.org/mime-db
WARN Request took 10838ms: https://registry.npmjs.org/nth-check
WARN 30 other warnings
WARN 12 deprecated subdependencies found: are-we-there-yet@2.0.0, are-we-there-yet@3.0.1, gauge@3.0.2, gauge@4.0.4, glob@10.5.0, glob@7.2.3, inflight@1.0.6, node-domexception@1.0.0, npmlog@5.0.1, npmlog@6.0.2, rimraf@3.0.2, tar@6.2.1
Packages: +649
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 718, reused 643, downloaded 6, added 9, done
/home/xxxxx/.local/share/pnpm/global/5:
+ openclaw 2026.2.23 (2026.2.26 is available)
╭ Warning ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Ignored build scripts: @discordjs/opus@0.10.0, @whiskeysockets/baileys@7.0.0-rc.9, koffi@2.15.1, node-llama-cpp@3.15.1, │
│ protobufjs@6.8.8, protobufjs@7.5.4, sharp@0.34.5. │
│ Run "pnpm approve-builds -g" to pick which dependencies should be allowed to run scripts. │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Done in 2m 2.5s using pnpm v10.30.3
WARNがいくつか出てるけど無事にOpenClawのインストール完了しました。
$ openclaw --version
2026.2.23
OpenClawの起動
以下のコマンドを叩くことで起動します。
$ openclaw onboard --install-daemon
🦞 OpenClaw 2026.2.23 (b817600) — Say "stop" and I'll stop—say "ship" and we'll both learn a lesson.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██░▄▄▄░██░▄▄░██░▄▄▄██░▀██░██░▄▄▀██░████░▄▄▀██░███░██
██░███░██░▀▀░██░▄▄▄██░█░█░██░█████░████░▀▀░██░█░█░██
██░▀▀▀░██░█████░▀▀▀██░██▄░██░▀▀▄██░▀▀░█░██░██▄▀▄▀▄██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
🦞 OPENCLAW 🦞
┌ OpenClaw onboarding
│
◇ Security ──────────────────────────────────────────────────────────────────────────────╮
│ │
│ Security warning — please read. │
│ │
│ OpenClaw is a hobby project and still in beta. Expect sharp edges. │
│ This bot can read files and run actions if tools are enabled. │
│ A bad prompt can trick it into doing unsafe things. │
│ │
│ If you’re not comfortable with basic security and access control, don’t run OpenClaw. │
│ Ask someone experienced to help before enabling tools or exposing it to the internet. │
│ │
│ Recommended baseline: │
│ - Pairing/allowlists + mention gating. │
│ - Sandbox + least-privilege tools. │
│ - Keep secrets out of the agent’s reachable filesystem. │
│ - Use the strongest available model for any bot with tools or untrusted inboxes. │
│ │
│ Run regularly: │
│ openclaw security audit --deep │
│ openclaw security audit --fix │
│ │
│ Must read: https://docs.openclaw.ai/gateway/security │
│ │
├─────────────────────────────────────────────────────────────────────────────────────────╯
│
◆ I understand this is powerful and inherently risky. Continue?
│ ○ Yes / ● No
└
カニちゃんきた。
「強力な権限を持たせて色々やっちゃうけどリスクとかあるけど大丈夫だよね?」
的なことを聞かれるのでYesを選択。
次にOnboarding modeはQuickStartを選択して簡単に設定していきます。
Manualはもっと選択肢が多いみたいだけど後で設定しなおせるみたいなので今回は簡単な方でいきます。
◆ Onboarding mode
│ ● QuickStart (Configure details later via openclaw configure.)
│ ○ Manual
└
次に使用するモデルを選択します。
めっちゃ選択肢ありますねー!
今回はLM StudioのAPIを叩きたいのでCustom Providerを選択しました。
◆ Model/auth provider
│ ○ OpenAI (Codex OAuth + API key)
│ ○ Anthropic
│ ○ Chutes
│ ○ vLLM
│ ○ MiniMax
│ ○ Moonshot AI (Kimi K2.5)
│ ○ Google
│ ○ xAI (Grok)
│ ○ Mistral AI
│ ○ Volcano Engine
│ ○ BytePlus
│ ○ OpenRouter
│ ○ Kilo Gateway
│ ○ Qwen
│ ○ Z.AI
│ ○ Qianfan
│ ○ Copilot
│ ○ Vercel AI Gateway
│ ○ OpenCode Zen
│ ○ Xiaomi
│ ○ Synthetic
│ ○ Together AI
│ ○ Hugging Face
│ ○ Venice AI
│ ○ LiteLLM
│ ○ Cloudflare AI Gateway
│ ● Custom Provider
│ ○ Skip for now
└
LM Studio側で設定したURLを入力します。
デフォルトは以下が表示されていてv1までついていましたが、LM Studioの場合は消してよさげです。
あと私の構成の場合は、ローカルネットワークのIP(192.168.xxx.xxx)を設定しました。
◆ API Base URL
│ http://127.0.0.1:11434/v1
└
APIキーの入力を聞かれるので入れます。
◆ API Key (leave blank if not required)
│ sk-...
└
Endpointの互換性を選んでとでるので、OpenAI-compatibleを選択します。
LM StudioはOpenAIと互換性あるので大丈夫そう。
◆ Endpoint compatibility
│ ● OpenAI-compatible (Uses /chat/completions)
│ ○ Anthropic-compatible
│ ○ Unknown (detect automatically)
└
Model IDを入力せよと出るので、今回はqwen/qwen3.5-35b-a3bを設定してみます。
カンマ区切りで複数設定できるみたい。
◆ Model ID
│ qwen/qwen3.5-35b-a3b
└
正常に認証通ると以下のように表示されました。
うまく疎通できた!
│
◇ Verification successful.
│
次にEndpoint IDを決めます。
デフォルトはcustom-{{LocalIP}}-{{Port}}になっていたのでlmstudioに変えました。
◆ Endpoint ID
│ lmstudio
└
オプションでModel aliasを設定できるみたいなのでqwen3.5-35b-a3b_gpt-oss-20B-localと設定してみました。
◆ Model alias (optional)
│ qwen3.5-35b-a3b-local
└
Configured custom provider: lmstudio/qwen/qwen3.5-35b-a3b
無事に初期設定ができたみたいです。
次にSelect channelを設定します。
OpenClawとやりとりするチャンネルを設定するようなのでDiscordを選択します。
◇ Channel status ────────────────────────────╮
│ │
│ Telegram: not configured │
│ WhatsApp: not configured │
│ Discord: not configured │
│ IRC: not configured │
│ Google Chat: not configured │
│ Slack: not configured │
│ Signal: not configured │
│ iMessage: not configured │
│ Feishu: install plugin to enable │
│ Google Chat: install plugin to enable │
│ Nostr: install plugin to enable │
│ Microsoft Teams: install plugin to enable │
│ Mattermost: install plugin to enable │
│ Nextcloud Talk: install plugin to enable │
│ Matrix: install plugin to enable │
│ BlueBubbles: install plugin to enable │
│ LINE: install plugin to enable │
│ Zalo: install plugin to enable │
│ Zalo Personal: install plugin to enable │
│ Synology Chat: install plugin to enable │
│ Tlon: install plugin to enable │
│ │
├─────────────────────────────────────────────╯
│
◇ How channels work ───────────────────────────────────────────────────────────────────────╮
│ │
│ DM security: default is pairing; unknown DMs get a pairing code. │
│ Approve with: openclaw pairing approve <channel> <code> │
│ Public DMs require dmPolicy="open" + allowFrom=["*"]. │
│ Multi-user DMs: run: openclaw config set session.dmScope "per-channel-peer" (or │
│ "per-account-channel-peer" for multi-account channels) to isolate sessions. │
│ Docs: channels/pairing │
│ │
│ Telegram: simplest way to get started — register a bot with @BotFather and get going. │
│ WhatsApp: works with your own number; recommend a separate phone + eSIM. │
│ Discord: very well supported right now. │
│ IRC: classic IRC networks with DM/channel routing and pairing controls. │
│ Google Chat: Google Workspace Chat app with HTTP webhook. │
│ Slack: supported (Socket Mode). │
│ Signal: signal-cli linked device; more setup (David Reagans: "Hop on Discord."). │
│ iMessage: this is still a work in progress. │
│ Feishu: 飞书/Lark enterprise messaging with doc/wiki/drive tools. │
│ Nostr: Decentralized protocol; encrypted DMs via NIP-04. │
│ Microsoft Teams: Bot Framework; enterprise support. │
│ Mattermost: self-hosted Slack-style chat; install the plugin to enable. │
│ Nextcloud Talk: Self-hosted chat via Nextcloud Talk webhook bots. │
│ Matrix: open protocol; install the plugin to enable. │
│ BlueBubbles: iMessage via the BlueBubbles mac app + REST API. │
│ LINE: LINE Messaging API bot for Japan/Taiwan/Thailand markets. │
│ Zalo: Vietnam-focused messaging platform with Bot API. │
│ Zalo Personal: Zalo personal account via QR code login. │
│ Synology Chat: Connect your Synology NAS Chat to OpenClaw with full agent capabilities. │
│ Tlon: decentralized messaging on Urbit; install the plugin to enable. │
│ │
├───────────────────────────────────────────────────────────────────────────────────────────╯
│
◆ Select channel (QuickStart)
│ ● Telegram (Bot API) (not configured)
│ ○ WhatsApp (QR link)
│ ○ Discord (Bot API)
│ ○ IRC (Server + Nick)
│ ○ Google Chat (Chat API)
│ ○ Slack (Socket Mode)
│ ○ Signal (signal-cli)
│ ○ iMessage (imsg)
│ ○ Feishu/Lark (飞书)
│ ○ Nostr (NIP-04 DMs)
│ ○ Microsoft Teams (Bot Framework)
│ ○ Mattermost (plugin)
│ ○ Nextcloud Talk (self-hosted)
│ ○ Matrix (plugin)
│ ○ BlueBubbles (macOS app)
│ ○ LINE (Messaging API)
│ ○ Zalo (Bot API)
│ ○ Zalo (Personal Account)
│ ○ Synology Chat (Webhook)
│ ○ Tlon (Urbit)
│ ○ Skip for now
└
Discordを選択するとBotのトークンを入力してといわれるので入力します。
Botを作ったことが無い方は作成してトークンを取得してください。
◇ Select channel (QuickStart)
│ Discord (Bot API)
│
◇ Discord bot token ──────────────────────────────────────────────────────────────────────╮
│ │
│ 1) Discord Developer Portal → Applications → New Application │
│ 2) Bot → Add Bot → Reset Token → copy token │
│ 3) OAuth2 → URL Generator → scope 'bot' → invite to your server │
│ Tip: enable Message Content Intent if you need message text. (Bot → Privileged Gateway │
│ Intents → Message Content Intent) │
│ Docs: discord │
│ │
├──────────────────────────────────────────────────────────────────────────────────────────╯
│
◆ Enter Discord bot token
│ _
└
Discordを選択するとBotのトークンを入力してといわれるので入力します。
Botを作ったことが無い方は作成してトークンを取得してください。
入力するとDiscordへのアクセスを設定しますか?と聞かれるのでYesを押します。
◆ Configure Discord channels access?
│ ● Yes / ○ No
└
次はDiscordへのチャンネルアクセスどうしますか?と聞かれるのでAllowlistを選択しました。
これは許可したチャンネルだけでOpenClawが反応してくれるようになります。
◆ Discord channels access
│ ● Allowlist (recommended)
│ ○ Open (allow all channels)
│ ○ Disabled (block all channels)
└
次に許可するサーバーとチャンネルを記載してって言われます。
- サーバー名/チャンネル名(名前ベース)
- guildId/channelId(DiscordのサーバーIDとチャンネルIDのスラッシュ区切り)
- #channelName(チャンネル名だけ)
上記のいずれかで入力するとよしなにやってくれるみたいです。
私はきっちりguildId/channelIdの組み合わせて入力しました。
◆ Discord channels allowlist (comma-separated)
│ My Server/#general, guildId/channelId, #support
└
無事に入力終わったけどDicscord channelsがUnresolvedになってる…。
その他の設定はうまくってるぽいから次へ進んでみます。
Skills statusが使えないの多そうなのでConfigure skills nowをYesにしてみます。
Eligible: すぐ使えるスキル
Missing requirements: 依存関係不足
Unsupported on this OS: OS非対応のスキル
Blocked by allowlist: 安全ポリシーでブロック
ってことみたい。
◇ Discord channels ───────────────────────────────────────────────────╮
│ │
│ Unresolved (kept as typed): XXXXXXXXXXXXXXXXXX/YYYYYYYYYYYYYYYYYYY │
│ │
├──────────────────────────────────────────────────────────────────────╯
│
◇ Selected channels ────────────────────────────────────────────╮
│ │
│ Discord — very well supported right now. Docs: │
│ discord │
│ │
├────────────────────────────────────────────────────────────────╯
Updated ~/.openclaw/openclaw.json
Workspace OK: ~/.openclaw/workspace
Sessions OK: ~/.openclaw/agents/main/sessions
│
◇ Skills status ─────────────╮
│ │
│ Eligible: 4 │
│ Missing requirements: 40 │
│ Unsupported on this OS: 7 │
│ Blocked by allowlist: 0 │
│ │
├─────────────────────────────╯
│
◆ Configure skills now? (recommended)
│ ● Yes / ○ No
└
なるほど。ここらへん入れるか聞いてきてるけど、一旦スキップしちゃおう。
Spaceを押してチェック付けてEnterを押します。
あとで個別に入れることが出来るようです。
◆ Install missing skill dependencies
│ ◻ Skip for now
│ ◻ 🔐 1password
│ ◻ 📰 blogwatcher
│ ◻ 🫐 blucli
│ ◻ 📸 camsnap
│ ◻ 🧩 clawhub
│ ◻ 🎛️ eightctl
│ ◻ ♊️ gemini (Gemini CLI for one-shot Q&A, summaries, and generation. — Install Gemini CLI (brew))
│ ◻ 🧲 gifgrep
│ ◻ 🐙 github
│ ◻ 🎮 gog
│ ◻ 📍 goplaces
│ ◻ 📧 himalaya
│ ◻ 📦 mcporter
│ ◻ 🍌 nano-banana-pro
│ ◻ 📄 nano-pdf
│ ◻ 💎 obsidian
│ ◻ 🎙️ openai-whisper
│ ◻ 💡 openhue
│ ◻ 🧿 oracle
│ ◻ 🛵 ordercli
│ ...
└
ほかにもAPI_KEYを聞かれるけどNoを選択しました。
◇ Install missing skill dependencies
│ Skip for now
│
◇ Set GOOGLE_PLACES_API_KEY for goplaces?
│ No
│
◇ Set GEMINI_API_KEY for nano-banana-pro?
│ No
│
◇ Set NOTION_API_KEY for notion?
│ No
│
◇ Set OPENAI_API_KEY for openai-image-gen?
│ No
│
◇ Set OPENAI_API_KEY for openai-whisper-api?
│ No
│
◇ Set ELEVENLABS_API_KEY for sag?
│ No
│
次にHooksを有効にするか聞かれる。
公式ドキュメントを見るとこんな感じの機能なようです。
- /new発行時にセッションコンテキストをメモリに保存する
- 監査のためにすべてのコマンドをログに記録する
- エージェントのライフサイクルイベントでカスタム自動化をトリガーする
- コアコードを変更せずにOpenClawの動作を拡張する
こちらも後で有効化できるみたいなのでいったんスキップしておきます。
◇ 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?
│ ◻ Skip for now
│ ◻ 🚀 boot-md
│ ◻ 📎 bootstrap-extra-files
│ ◻ 📝 command-logger
│ ◻ 💾 session-memory
└
Skip for now
Discordも疎通できてるみたい。
これで無事に設定は完了みたいです。
最後にOpenClawのAIをどの形で起動するか聞かれるのでOpen the Web UIを選択しました。
◇ Systemd ────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Linux installs use a systemd user service by default. Without lingering, systemd stops │
│ the user session on logout/idle and kills the Gateway. │
│ Enabling lingering now (may require sudo; writes /var/lib/systemd/linger). │
│ │
├──────────────────────────────────────────────────────────────────────────────────────────╯
│
◇ Systemd ────────────────────────────────╮
│ │
│ Enabled systemd lingering for xxxxx. │
│ │
├──────────────────────────────────────────╯
│
◇ Gateway service runtime ────────────────────────────────────────────╮
│ │
│ QuickStart uses Node for the Gateway service (stable + supported). │
│ │
├──────────────────────────────────────────────────────────────────────╯
│
◑ Installing Gateway service…
Installed systemd service: /home/xxxxx/.config/systemd/user/openclaw-gateway.service
◇ Gateway service installed.
│
◇
Discord: ok (@カニ🦀) (770ms)
Agents: main (default)
Heartbeat interval: 30m (main)
Session store (main): /home/xxxxx/.openclaw/agents/main/sessions/sessions.json (0 entries)
│
◇ Optional apps ────────────────────────╮
│ │
│ Add nodes for extra features: │
│ - macOS app (system + notifications) │
│ - iOS app (camera/canvas) │
│ - Android app (camera/canvas) │
│ │
├────────────────────────────────────────╯
│
◇ Control UI ─────────────────────────────────────────────────────────────────────╮
│ │
│ Web UI: http://127.0.0.1:18789/ │
│ Web UI (with token): │
│ http://127.0.0.1:18789/#token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx │
│ Gateway WS: ws://127.0.0.1:18789 │
│ Gateway: reachable │
│ Docs: https://docs.openclaw.ai/web/control-ui │
│ │
├──────────────────────────────────────────────────────────────────────────────────╯
│
◇ Start TUI (best option!) ─────────────────────────────────╮
│ │
│ This is the defining action that makes your agent you. │
│ Please take your time. │
│ The more you tell it, the better the experience will be. │
│ We will send: "Wake up, my friend!" │
│ │
├────────────────────────────────────────────────────────────╯
│
◇ Token ─────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Gateway token: shared auth for the Gateway + Control UI. │
│ Stored in: ~/.openclaw/openclaw.json (gateway.auth.token) or OPENCLAW_GATEWAY_TOKEN. │
│ View token: openclaw config get gateway.auth.token │
│ Generate token: openclaw doctor --generate-gateway-token │
│ Web UI stores a copy in this browser's localStorage (openclaw.control.settings.v1). │
│ Open the dashboard anytime: openclaw dashboard --no-open │
│ If prompted: paste the token into Control UI settings (or use the tokenized dashboard │
│ URL). │
│ │
├─────────────────────────────────────────────────────────────────────────────────────────╯
│
◆ How do you want to hatch your bot?
│ ● Hatch in TUI (recommended)
│ ○ Open the Web UI
│ ○ Do this later
└
そうすると以下メッセージが表示されると同時にブラウザが起動してControl画面が開きました。
◇ How do you want to hatch your bot?
│ Open the Web UI
│
◇ Dashboard ready ────────────────────────────────────────────────────────────────╮
│ │
│ Dashboard link (with token): │
│ http://127.0.0.1:18789/#token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx │
│ Opened in your browser. Keep that tab to control OpenClaw. │
│ │
├──────────────────────────────────────────────────────────────────────────────────╯
│
◇ Workspace backup ────────────────────────────────────────╮
│ │
│ Back up your agent workspace. │
│ Docs: https://docs.openclaw.ai/concepts/agent-workspace │
│ │
├───────────────────────────────────────────────────────────╯
│
◇ Security ──────────────────────────────────────────────────────╮
│ │
│ Running agents on your computer is risky — harden your setup: │
│ https://docs.openclaw.ai/security │
│ │
├─────────────────────────────────────────────────────────────────╯
│
◇ Shell completion ────────────────────────────────────────────────────────╮
│ │
│ Shell completion installed. Restart your shell or run: source ~/.bashrc │
│ │
├───────────────────────────────────────────────────────────────────────────╯
│
◇ Web search (optional) ─────────────────────────────────────────────────────────────────╮
│ │
│ If you want your agent to be able to search the web, you’ll need an API key. │
│ │
│ OpenClaw uses Brave Search for the `web_search` tool. Without a Brave Search API key, │
│ web search won’t work. │
│ │
│ Set it up interactively: │
│ - Run: openclaw configure --section web │
│ - Enable web_search and paste your Brave Search API key │
│ │
│ Alternative: set BRAVE_API_KEY in the Gateway environment (no config changes). │
│ Docs: https://docs.openclaw.ai/tools/web │
│ │
├─────────────────────────────────────────────────────────────────────────────────────────╯
│
◇ What now ─────────────────────────────────────────────────────────────╮
│ │
│ What now: https://openclaw.ai/showcase ("What People Are Building"). │
│ │
├────────────────────────────────────────────────────────────────────────╯
│
└ Onboarding complete. Dashboard opened; keep that tab to control OpenClaw.
試しにDiscordで挨拶したらこんな返答もらった。
ContextWindowのサイズが4096しかなかったらしい。
確かにLM Studio側の設定見ると4096しかなかったのでMAX値を設定して再読込をかけてみる。
OpenClaw側の設定も同じ値にしてみる。
[Config]
↓
[Models]
↓
[Model Providers]
↓
Context Windowは沢山の文脈を扱いたいのでLLMで設定できるMAX値である262144に
出力値であるMax Tokensは16384に設定してSaveを押します。
(ContextWindowは修正前の値でキャプチャしてしまった)
Saveした後はOpenClawを再起動します。
$ openclaw gateway restart
起動後にもう一度メッセージを送ってみると。
返信が返ってきました!
…しかし返信が遅いw
返ってくるまでに1分ちょいかかる…。
これはローカルLLMのマシンのスペックが足りてないせいですね。
LLMをgpt-oss-20bにしてみたら30~40秒くらいで返ってきました。
ここは要調整ですね。
ClaudeCodeやChatGPTがあのクオリティで素早く返してくれるのは素晴らしいなあって改めて思いました。
時間はかかったものの無事に構築できました。
楽しかったです。
ではまた!










