“I’d like to try OpenClaw, but I’m not sure about signing up for a VPS…” “I don’t want to mess up my Mac’s environment”—for those of you who feel this way, we’ve put together a guide on how to create a virtual machine (VM) using Lume on an Apple Silicon Mac and safely run OpenClaw within it.
Lume is a lightweight, high-speed macOS virtualization tool optimized for Apple Silicon. By confining OpenClaw within the VM, you can test it without affecting your host Mac’s environment at all, and when you’re done, you can simply delete the entire VM.
In this article, I’ll focus exclusively on the quickest way to run OpenClaw within the ChatGPT Plus plan (US$20/month) without incurring additional API charges. I’ll cover other methods for connecting to models like Ollama and OpenRouter, testing on an Ubuntu VM, and troubleshooting procedures in my paid Note.
- Basics of Lume, OpenClaw, and ChatGPT
- Benefits and Considerations of Running on a VM
- Installing Lume
- Creating a macOS VM
- Installing Homebrew in the VM
- Installing and Setting Up OpenClaw
- Functionality Check
- Topics Not Covered in This Article
- Differences from a VPS Running 24/7
- Frequently Asked Questions
- Summary
Basics of Lume, OpenClaw, and ChatGPT
What is Lume?
Lume is an open-source virtualization tool that allows you to create and manage virtual machines on Apple Silicon Macs. It utilizes macOS’s Virtualization Framework and is characterized by its CLI-based, lightweight design compared to tools like UTM or VirtualBuddy. It can create not only macOS VMs but also Linux VMs, both of which can leverage Apple Silicon’s native performance almost entirely.
What is OpenClaw?
OpenClaw is an open-source AI agent that uses LLMs (Large Language Models) and can be controlled via chat channels such as Discord, Slack, and iMessage. It is one of the fastest-growing projects in GitHub history in terms of stars, and its appeal lies in the ability to run your own personal AI assistant continuously on your server or PC. However, since it possesses powerful privileges such as file manipulation and command execution, running it directly on your main PC is not recommended for security reasons.
How ChatGPT Integration Works
When you select OpenAI as your OpenClaw model provider, you can choose between the API Key method and the Codex Device Pairing method. The API Key method is billed on a pay-as-you-go basis, but with the Codex Device Pairing method, you can use it without additional charges within the scope of your ChatGPT Plus subscription. In this article, we’ll use the Device Pairing method to try it out with zero additional API costs.
Benefits and Considerations of Running on a VM
Three Reasons to Run It in a VM
- Keeps the host Mac clean: Node.js, Homebrew, and all configuration files required for OpenClaw installation are confined entirely within the VM. The host environment remains completely unchanged
- You can discard the entire test environment: Even if you mess up the configuration, you can simply delete the VM and recreate it to start over. It doesn’t require the hassle of rebuilding like a VPS
- Ideal for testing before deploying to a VPS: You can take a phased approach—first verify OpenClaw’s functionality and usability on a VM, then migrate to a VPS when you’re ready for full-scale operation
Prerequisites
- Apple Silicon Mac (M1 / M2 / M3 / M4 series)
- macOS Sequoia or later (Virtualization Framework support)
- 80 GB or more of free storage space (macOS VM image is approximately 65 GB; OpenClaw-related files use several GB)
- ChatGPT Plus subscription (US$20/month)
- Basic knowledge of Terminal operations
Does not work on Intel Macs. Lume’s virtualization relies on the Apple Silicon Virtualization Framework.
Installing Lume
Run the following command in the Terminal on your host Mac. Lume’s official installation script will handle the download and setup.
# Lumeをインストール
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/lume/scripts/install.sh)"
# PATHを通す
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.zshrc
source ~/.zshrc
# 確認
lume --version
The installation directory is ~/.local/bin . If you do not add it to your PATH, lume: command not found , so please do not forget the second line.
Creating a macOS VM
Create the latest macOS VM using Lume. A single command automatically handles everything from downloading the IPSW (macOS list image) to creating the VM.
lume create my-vm --os macos --ipsw latest
Downloading the IPSW takes about 10 to 30 minutes. Depending on your network environment, it may take longer, so please be patient.
Once creation is complete, the macOS VM window will open automatically, and the Setup Assistant will begin. Proceed with language selection, user account creation, and network setup just as you would on a regular Mac. You do not need to sign in with an Apple ID.
VM data is ~/.lume/my-vm/ . When you no longer need it, lume delete my-vm , you can delete the entire VM.
The Ubuntu VM Option
While Lume also supports creating Linux VMs, this article focuses exclusively on macOS VMs. For testing with Ubuntu VMs or troubleshooting errors caused by Lume lume pull commands, I’ll explain in detail in the paid version of this note.
Installing Homebrew in the VM
Once the macOS VM has finished booting for the first time, open the terminal inside the VM. The OpenClaw installation script assumes Homebrew is installed, but a new macOS VM does not come with Homebrew.
If you run the OpenClaw installation script without Homebrew, it will stop with an error like the one below.
· Homebrew not found, installing
✗ Installing Homebrew failed — re-run with --verbose for details
Warning: Running in non-interactive mode because `stdin` is not a TTY.
==> Checking for `sudo` access (which may request your password)...
Need sudo access on macOS (e.g. the user lume needs to be an Administrator)!
The OpenClaw installer attempts to automatically install Homebrew internally, but since it runs in non-interactive mode, it fails due to permission issues. Let’s install Homebrew manually first.
# VM内のターミナルで実行
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# パスワードを求められたらVM作成時に設定したパスワードを入力
# PATHを通す
eval "$(/opt/homebrew/bin/brew shellenv)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
Installing and Setting Up OpenClaw
Running the Installation Script
With Homebrew installed, run the official OpenClaw installation script.
curl -fsSL https://openclaw.ai/install.sh | bash
If Node.js is not installed, the installer will automatically set it up. Once complete, the setup wizard (openclaw onboard --install-daemon) will begin.
Configuring ChatGPT Device Pairing
When the wizard prompts you to select a model provider, proceed as follows.
| Configuration Options | Selection | Notes |
|---|---|---|
| Model/Auth Provider | OpenAI | |
| OpenAI Authentication Method | OpenAI Codex Device Pairing | Do not select the API Key method (as it incurs pay-as-you-go charges) |
If you select “OpenAI Codex Device Pairing,” a device authentication code will be displayed.
◇ OpenAI Codex device code ─────────────────────────────────╮
│ │
│ Open this URL in your browser and enter the code below. │
│ URL: https://auth.openai.com/codex/device │
│ Code: XXXX-XXXXX │
│ Code expires in 15 minutes. Never share it. │
│ │
├────────────────────────────────────────────────────────────╯
Open https://auth.openai.com/codex/device and enter the displayed code to authenticate. Please complete this within 15 minutes.
Required preliminary settings on the ChatGPT side
To use Device Pairing, you must enable Codex device code authentication on the ChatGPT side.
- Log in to ChatGPT
- Click the account menu in the bottom-left corner → Open “Settings”
- Select the “Security” tab
- Turn on the toggle for “Enable device code authentication for Codex”
If this toggle remains off, authentication will fail. If you encounter an error on the authentication screen after selecting Device Pairing, please check this setting first.
Important Notes on Model Selection
The models compatible with Codex Device Pairing authentication are:openai-codex/gpt-5.5 models that begin with openai-codex/ .openai/gpt-5.5 If you select a model without the “Codex” prefix, as shown below, the following error will occur.
⚠️ Agent failed before reply: No API key found for provider "openai".
You are authenticated with OpenAI Codex OAuth.
Use openai/gpt-5.5 with the Codex OAuth profile, or set OPENAI_API_KEY
for direct OpenAI API access.
To use models without the Codex prefix (openai/gpt-5.5 etc.) requires an OpenAI API Key and is subject to pay-as-you-go billing. If you wish to use it within the ChatGPT Plus plan, be sure to openai-codex/ select a model with the “Codex” prefix.
Functionality Check
Verifying Gateway Startup
Once setup is complete, check the Gateway status in the terminal within the VM.
openclaw gateway status
If it displays “running,” OpenClaw is operating normally. If it is stopped, openclaw gateway restart , restart it using
Sending a Message via TUI
Launch the terminal UI and try sending a message.
openclaw tui
Once the TUI is running, enter a message and send it. If you receive a response via ChatGPT, the OpenClaw setup is complete.
Checking the Dashboard
There is also a browser-based dashboard (Control UI). You can check the URL and access token using the following command.
openclaw dashboard
Open the URL displayed in the browser within the VM to view your message history and change agent settings.
Topics Not Covered in This Article
The following topics are omitted from this article because the procedures are lengthy. For more details, please refer to the paid version on Note.
- Verification on an Ubuntu VM: Obtaining the Ubuntu Server ARM ISO, mounting the ISO, initial setup, and differences from a macOS VM
- Ollama setup: Installation,
ollama signinmodel selection, troubleshooting memory shortages - OpenRouter Configuration: Creating API keys, choosing free models, and details on rate limits
- Troubleshooting Lume pull errors:
lume pull ubuntu-noble-vanilla:latestFailure and Removing Remnants - Resetting and Restoring Settings:
openclaw onboard --install-daemonDistinguishing between “Config Only” and “Full Reset”
Differences from a VPS Running 24/7
This site also provides instructions for setting up OpenClaw using the free tier of XServer VPS. The Mac VM version and the VPS version serve different purposes. Please choose the one that best suits your needs.
| Comparison Points | Mac VM | VPS |
|---|---|---|
| Main Purpose | Testing and Trial | Always-on / 24/7 operation |
| Impact on Host Environment | None (Isolated within the VM) | None (external server) |
| Initial Cost | 0 yen (requires ownership of a Mac) | 0 yen (free VPS) |
| API fees | Within the $20 monthly ChatGPT Plus fee | 0 yen with the OpenRouter free plan |
| Required Specifications | Apple Silicon Mac / 80 GB or more of storage | VPS with 2GB or more of RAM |
| Always-on | Stops if the Mac is shut down | The VPS must run 24 hours a day |
| Ease of disposal | Simply delete the VM | Delete the VPS |
| Who it’s for | Those who want to try it out first | Those who want to run it 24/7 |
We recommend testing the service on a Mac VM first, and if you decide you want to continue using it, consider migrating to a VPS.
Frequently Asked Questions
- Can Lume be used on an Intel Mac?
No. Lume relies on the Apple Silicon Virtualization Framework, so it does not work on Intel Macs. For Intel Macs, we recommend setting it up on a VPS.
- How much storage is required to create a VM?
The macOS VM image requires about 65 GB, and OpenClaw and related tools use a few GB. Please ensure you have at least 80 GB of free space to be safe.
- Can I use plans other than ChatGPT Plus?
You need a ChatGPT Plus or Pro plan to use Codex Device Pairing. Authentication is not available on the free plan. If you want to use models other than ChatGPT, OpenRouter and Ollama are also options, but they are not covered in this article.
- Is the VM performance sufficient?
The virtualization framework used by Lume is optimized for Apple Silicon, and in practice, it runs at speeds close to native performance. You will rarely experience any lag when running the OpenClaw Gateway or using the TUI.
- Can I use local models with Ollama?
It’s quite challenging. Since memory is limited within the VM, large models may fail due to insufficient memory. Furthermore, because inference runs on the CPU within the VM, my MacBook Air M1 froze and stopped responding.
Summary
By using an Apple Silicon Mac and Lume, you can try out OpenClaw without cluttering your host environment. The steps are summarized below.
- Install Lume on the host Mac and set the PATH
lume create my-vm --os macos --ipsw latestCreate a macOS VM- Install Homebrew inside the VM
- Run the OpenClaw installation script
- Authenticate via ChatGPT Device Pairing (make sure to enable Codex settings on the ChatGPT side beforehand)
- Verify that the Gateway is running and test functionality via the TUI
If you have a ChatGPT Plus subscription, you can verify OpenClaw’s basic functionality without incurring additional API charges. This setup serves as both a testing environment before signing up for a VPS and a safe testing ground that keeps your host Mac clean.
Setting up the free OpenRouter model, testing on an Ubuntu VM,lume pull troubleshooting errors, and resetting settings are covered in greater detail in the paid version of this note.


Comment