So you want to try OpenClaw — the open-source AI agent that can manage files, send messages, write code, and automate tasks through your favourite messaging apps. Great choice. But here's the thing: you really shouldn't install it directly on your main PC.
OpenClaw gets access to your file system. It can run commands. It can create, edit, and delete files. That's the whole point — but it also means you don't want it anywhere near your personal documents, saved passwords, or work files.
The solution? Run it inside a virtual machine. This guide walks you through the entire process from scratch, including every error I hit along the way and how I fixed them.
What you'll need:
Windows 10 Pro or Windows 11 Pro (for Hyper-V)
A MiniMax account (free — no API key required thanks to OAuth)
A Telegram account (for the bot)
About 15 to 25 minutes
Part 1: Setting Up Hyper-V and Ubuntu
Step 1: Enable Hyper-V on Windows
Hyper-V is a built-in virtualisation feature on Windows Pro editions. If you've got the Home edition, skip to the note below.
Go to Control Panel, then Programs and Features, then Turn Windows features on or off. Tick the Hyper-V checkbox and restart your PC.
After restarting, search for "Hyper-V Manager" in your Start menu. If it appears, you're sorted.
Using Windows Home? You'll need VirtualBox (free) or VMware Workstation Player instead. The Ubuntu installation steps are basically the same.
Step 2: Create an Ubuntu Virtual Machine
In Hyper-V Manager, click Quick Create (top-right). Select Ubuntu 22.04 LTS and click Create Virtual Machine. Hyper-V downloads and configures everything automatically.
Step 3: First Boot and Setup
Click Connect, then Start. Ubuntu walks you through initial setup:
Choose your language and location
Pick a username and password
Tick "Log in automatically" — saves you typing your password every time
If Ubuntu gets stuck on a loading screen, just shut down the VM and start it again. This happens occasionally with Hyper-V and is nothing to worry about.
Part 2: Installing OpenClaw with MiniMax
Open a terminal in Ubuntu by right-clicking the desktop and selecting Open in Terminal.
Step 4: Update the System and Install Dependencies
sudo apt update && sudo apt install curl git -yYou'll be asked for your password. It won't show characters as you type — that's normal. Just type it and press Enter.
Step 5: Install Node.js 22
OpenClaw requires Node.js 22+. Ubuntu doesn't include this by default:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install nodejs -yVerify it worked:
node --version
npm --versionYou should see v22.x.x and 10.x.x. Both need to show a version number before continuing.
Step 6: Fix npm Permissions
Without this step, you'll hit a permission error when installing OpenClaw. Run these four lines:
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcThis only needs doing once.
Step 7: Install OpenClaw with MiniMax
MiniMax provides a custom installer that sets up OpenClaw and MiniMax OAuth together:
cd ~
curl -fsSL https://skyler-agent.github.io/oclaw/i.sh | bashAlways run `cd ~` first. Running the installer from a deleted or moved directory causes an ENOENT uv_cwd error.
Step 8: Follow the Setup Wizard
The installer launches an interactive wizard. Here's exactly what to pick:
| Prompt | Select |
|---|---|
| Security warning | Yes |
| Onboarding mode | QuickStart |
| Endpoint | Global |
| Browser opens | Sign in to MiniMax and click Authorise IMMEDIATELY |
| Channel | Telegram (Bot API) |
| Bot token | Paste your token from @BotFather |
| Confirm | Yes |
| Package manager | npm |
| Skills | Pick what you want or skip |
| Additional API keys | Skip for now |
| Hatch | Open the Web UI |
OAuth times out! When the browser opens for MiniMax, sign in and authorise straight away. If it expires, run
openclaw configureand pick MiniMax, then MiniMax OAuth, then Global to try again.
Part 3: Creating a Telegram Bot
If you've already got a bot token, skip to Step 10.
Step 9: Create a Bot via BotFather
Open Telegram and search for @BotFather. Send /newbot. It asks two questions:
A display name (anything you like, e.g. "My OpenClaw Bot")
A username that must end with `_bot` (e.g. "my_openclaw_bot")
BotFather replies with your bot token. It looks like 7123456789:AAH...xyz. Copy it — you need it for Step 8.
Part 4: Connect Everything
Step 10: Reload Your Shell
source ~/.bashrc
export PATH="$HOME/.npm-global/bin:$PATH"Step 11: Health Check
openclaw doctorIf it asks to generate a gateway token, select Yes. If it asks to install the gateway service, select Yes, then choose Node.
Step 12: Start the Gateway
openclaw gateway stop
openclaw gateway startStep 13: Pair Telegram
Message your bot on Telegram. It replies with a pairing code. Copy that code and run:
openclaw pairing approve telegram YOUR_CODE_HEREStep 14: Test It
From the terminal:
openclaw tuiType "hi" — MiniMax M2.1 should respond. You can also chat through Telegram or open the web dashboard:
openclaw dashboardThat's it. You're done. OpenClaw is running inside your Ubuntu VM, connected to MiniMax, accessible from your phone via Telegram. You can minimise the VM and it keeps working in the background.
What Can You Actually Do With This?
Once connected, you can chat with your AI agent through Telegram from your phone. It has access to the VM's file system, so you can ask it to:
Create files and documents
Write code and scripts
Generate business ideas, research, and content
Set up cron jobs for recurring automated tasks
Build websites and manage projects
In my testing, it created a text file with 50 business ideas in literally a couple of seconds. The speed is impressive for a free model.
Troubleshooting: If This Error Comes, Do This
| Error | What It Means | Fix |
|---|---|---|
npm: command not found | Node.js isn't installed | Run the Node.js install commands from Step 5 |
ENOENT spawn git | Git isn't installed | sudo apt install git -y |
EACCES: permission denied | npm can't write to system folders | Run the four-line npm fix from Step 6 |
ENOENT uv_cwd | Running from a deleted directory | cd ~ then retry |
| OAuth stuck/timed out | Took too long to authorise | openclaw configure then MiniMax then OAuth then Global |
| Gateway not running | Service crashed or wasn't started | openclaw doctor --fix then restart gateway |
| Gateway token mismatch | Auth token out of sync | openclaw gateway stop then openclaw gateway start |
| Port 18789 in use | Previous gateway still running | openclaw gateway stop, wait, then start again |
| dmPolicy error | Invalid config value | Edit ~/.openclaw/openclaw.json — valid values: "pairing", "allowlist", "open", "disabled" |
| Bot not responding | Telegram not paired | Message the bot, copy the code, run pairing approve command |
If All Else Fails: Complete Reset
If nothing works and you want to start completely fresh, run this:
openclaw uninstall --all --yes --non-interactive
npm rm -g openclaw
rm -rf ~/.openclaw ~/.clawdbot ~/.moltbot ~/.molthub ~/install.shVerify it's gone:
which openclawShould return nothing. Go back to Step 7 and start fresh.
Quick Reference: All Commands
| What | Command | |
|---|---|---|
| Install dependencies | sudo apt update && sudo apt install curl git -y | |
| Install Node.js | `curl -fsSL https://deb.nodesource.com/setup_22.x \ | sudo -E bash -` |
| Fix npm permissions | mkdir -p ~/.npm-global && npm config set prefix '~/.npm-global' | |
| Install OpenClaw + MiniMax | `curl -fsSL https://skyler-agent.github.io/oclaw/i.sh \ | bash` |
| Run setup wizard | openclaw onboard --install-daemon | |
| Reconfigure model | openclaw configure | |
| Health check | openclaw doctor | |
| Fix issues | openclaw doctor --fix | |
| Start gateway | openclaw gateway start | |
| Stop gateway | openclaw gateway stop | |
| Pair Telegram | openclaw pairing approve telegram CODE | |
| Terminal chat | openclaw tui | |
| Web dashboard | openclaw dashboard | |
| Full uninstall | openclaw uninstall --all --yes --non-interactive |
