---
title: "Run OpenClaw with a Local LLM — Instructions"
canonical: "https://build.nvidia.com/rtx/openclaw/instructions.md"
---

> [!CAUTION]
> **Before proceeding, review the security risks in the Overview tab.** OpenClaw is an AI agent that can access your files, execute commands, and connect to external services. Data exposure and malicious code execution are real risks. **Strongly recommended:** Run OpenClaw on an isolated system or VM, use dedicated accounts (not your main accounts), and never expose the dashboard to the public internet without authentication.

# Step 1. Prepare your environment (Windows / WSL only)

> [!NOTE]
> Skip this step on Linux hardware platforms.

If you are on Windows, you can install OpenClaw on native Windows or in Windows Subsystem for Linux (WSL). WSL provides a Linux-style environment if your skills need it; native Windows is often simpler and can connect more easily to Windows apps.

If you choose WSL and it is not already installed:

1. Open **PowerShell as Administrator**.
2. Install WSL:

```powershell
wsl --install
```

3. Verify:

```powershell
wsl --version
```

4. Start WSL:

```powershell
wsl
```

# Step 2. Install OpenClaw

On your hardware platform, open a terminal and run the official install script:

```bash
curl -fsSL https://openclaw.ai/install.sh | bash
```

On native Windows, follow the install options documented at [openclaw.ai](https://openclaw.ai) if the curl install path does not apply.

After dependencies are downloaded, OpenClaw will show a **security warning**. Read the risks; if you accept them, use the arrow keys to select **Yes** and press Enter.

# Step 3. Complete the OpenClaw onboarding

Work through the prompts as follows.

1. **Quickstart vs Manual**: Choose **Quickstart**.

2. **Model provider**:
- **Recommended for a local model:** If your backend is not listed yet (or you will configure it after the server is up), go to the bottom of the list and select **Skip for now**—you’ll configure the model in a later step.
- If your inference backend appears in the list (for example Ollama, LM Studio, or vLLM), you can select it now and fill in API key (leave blank or use a dummy value), Base URL (default is usually fine), and Model ID (must match the exact handle served by the backend).

3. **Filtering models by provider**: If prompted, select **All Providers**. On the next prompt for the default model, choose **Keep Current** unless you already selected a provider.

4. **Communication channel**: You can connect a channel (for example messaging) to use the bot when away from the machine, or select **Skip for Now** and configure it later.

5. **Skills**: We recommend selecting **No** for now. You can add skills later from the web UI or Clawhub after you’ve tested the basics.

6. **Homebrew**: If you are prompted to install Homebrew, select **No**—Homebrew is for macOS only and is not needed on Linux or Windows for this playbook.

7. **Hooks**: We recommend selecting all three for a better experience. Note that this may log data locally; enable only if you’re comfortable with that.

8. **Dashboard URL**: The terminal will print a URL for the OpenClaw dashboard. **Save this URL** (and any access token shown)—you’ll need it to open the web UI.

9. **Finish**: Select **Yes** on the final prompt to complete installation.

You can now open the OpenClaw dashboard in a browser using the URL and token from the installer.

# Step 4. Serve a local model

OpenClaw connects to a local, OpenAI-compatible endpoint. Pick a backend that fits your hardware platform, then use the matching subsection. Model recommendations are in the **Agent-ready Models** tab.

## Option A — vLLM (recommended on large-memory Linux hardware platforms)

Use when you want an OpenAI-compatible HTTP server and validated agent-ready recipes.

1. In a **separate terminal**, launch the recommended model for your hardware platform from the **Agent-ready Models** tab (or follow [Serve LLMs with vLLM](https://build.nvidia.com/playbooks/vllm) for container setup).
2. Wait until the server reports startup complete, then verify:

```bash
curl http://localhost:8000/v1/models
```

You should see your model handle in the returned list. The default OpenClaw `baseUrl` for this path is `http://localhost:8000/v1`.

## Option B — LM Studio (simple path on discrete-GPU hardware platforms)

Install LM Studio, download a model that fits your VRAM (see the **Agent-ready Models** table — the 27B example below is for 24GB+ only), and serve it with a large context window (32K minimum; 64K+ recommended when VRAM allows):

```bash
curl -fsSL https://lmstudio.ai/install.sh | bash
lms get qwen/qwen3.6-27b
lms load qwen/qwen3.6-27b --context-length 65536
lms server start
```

Use the Model ID that matches what LM Studio serves. Prefer this path when you want a GUI-oriented, llama.cpp-backed workflow.

## Option C — Ollama

```bash
curl -fsSL https://ollama.com/install.sh | sh
ollama pull qwen3.6:27b
ollama run qwen3.6:27b
```

Inside the Ollama session (or via your usual Ollama config), set context high enough for agent use—for example `/set parameter num_ctx 65536`. Use the exact Ollama model tag as the OpenClaw Model ID.

> [!NOTE]
> Free as much VRAM as possible before loading the model (close other GPU workloads; enable only the skills you need). Smaller GPUs should use smaller models—see **Agent-ready Models**.

# Step 5. Configure OpenClaw to use the local server

If you already selected a provider during onboarding and chat works, you can skip to **Step 6**.

Otherwise, open the OpenClaw config file:

```bash
~/.openclaw/openclaw.json
```

Example with nano:

```bash
nano ~/.openclaw/openclaw.json
```

Add or update the `models` section so it includes your provider. Example for a vLLM server (no API key required—any non-empty placeholder works):

```json
"models": {
"mode": "merge",
"providers": {
"vllm": {
"baseUrl": "http://localhost:8000/v1",
"apiKey": "vllm",
"api": "openai-responses",
"models": [
{
"id": "nvidia/Qwen3.6-35B-A3B-NVFP4",
"name": "nvidia/Qwen3.6-35B-A3B-NVFP4",
"reasoning": true,
"input": ["text"],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 262144,
"maxTokens": 8192
}
]
}
}
}
```

Replace `id`, `name`, `baseUrl`, and `contextWindow` to match the model and backend you launched. The `id` and `name` must match the handle served by the backend.

> [!NOTE]
> If OpenClaw reports an unsupported-endpoint error against the Responses API, change `"api": "openai-responses"` to the OpenAI chat-completions variant for your OpenClaw version — vLLM always exposes `/v1/chat/completions`.
>
> If OpenClaw runs in WSL and cannot reach a server on the Windows host, replace `127.0.0.1` / `localhost` with the Windows host IP as seen from WSL.

If the OpenClaw gateway is already running, restart it so it reloads `~/.openclaw/openclaw.json`.

# Step 6. Verify the setup

1. In a browser, open the **OpenClaw dashboard URL** (and use the access token if required).
2. Start a **new** conversation and send a short message.
3. If you get a reply from the agent, the setup is working.

You can also ask OpenClaw which model it’s using. In the gateway chat UI you can switch models by typing: **`/model MODEL_NAME`**.

# Step 7. Optional: add skills and learn more

- **Skills** add capabilities but also risk; only enable skills you trust (for example, community-vetted ones). To add a skill:
- Ask OpenClaw to configure a skill, or
- Use the sidebar in the web UI to enable skills, or
- Browse [Clawhub](https://docs.openclaw.ai/tools/clawhub) for community skills.

- For more usage and configuration details, see the [OpenClaw documentation](https://docs.openclaw.ai).