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

bash
sudo apt update && sudo apt install curl git -y

You'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:

bash
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install nodejs -y

Verify it worked:

bash
node --version
npm --version

You 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:

bash
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

This only needs doing once.

Step 7: Install OpenClaw with MiniMax

MiniMax provides a custom installer that sets up OpenClaw and MiniMax OAuth together:

bash
cd ~
curl -fsSL https://skyler-agent.github.io/oclaw/i.sh | bash

Always 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:

PromptSelect
Security warningYes
Onboarding modeQuickStart
EndpointGlobal
Browser opensSign in to MiniMax and click Authorise IMMEDIATELY
ChannelTelegram (Bot API)
Bot tokenPaste your token from @BotFather
ConfirmYes
Package managernpm
SkillsPick what you want or skip
Additional API keysSkip for now
HatchOpen the Web UI

OAuth times out! When the browser opens for MiniMax, sign in and authorise straight away. If it expires, run openclaw configure and 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

bash
source ~/.bashrc
export PATH="$HOME/.npm-global/bin:$PATH"

Step 11: Health Check

bash
openclaw doctor

If 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

bash
openclaw gateway stop
openclaw gateway start

Step 13: Pair Telegram

Message your bot on Telegram. It replies with a pairing code. Copy that code and run:

bash
openclaw pairing approve telegram YOUR_CODE_HERE

Step 14: Test It

From the terminal:

bash
openclaw tui

Type "hi" — MiniMax M2.1 should respond. You can also chat through Telegram or open the web dashboard:

bash
openclaw dashboard

That'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

ErrorWhat It MeansFix
npm: command not foundNode.js isn't installedRun the Node.js install commands from Step 5
ENOENT spawn gitGit isn't installedsudo apt install git -y
EACCES: permission deniednpm can't write to system foldersRun the four-line npm fix from Step 6
ENOENT uv_cwdRunning from a deleted directorycd ~ then retry
OAuth stuck/timed outTook too long to authoriseopenclaw configure then MiniMax then OAuth then Global
Gateway not runningService crashed or wasn't startedopenclaw doctor --fix then restart gateway
Gateway token mismatchAuth token out of syncopenclaw gateway stop then openclaw gateway start
Port 18789 in usePrevious gateway still runningopenclaw gateway stop, wait, then start again
dmPolicy errorInvalid config valueEdit ~/.openclaw/openclaw.json — valid values: "pairing", "allowlist", "open", "disabled"
Bot not respondingTelegram not pairedMessage 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:

bash
openclaw uninstall --all --yes --non-interactive
npm rm -g openclaw
rm -rf ~/.openclaw ~/.clawdbot ~/.moltbot ~/.molthub ~/install.sh

Verify it's gone:

bash
which openclaw

Should return nothing. Go back to Step 7 and start fresh.


Quick Reference: All Commands

WhatCommand
Install dependenciessudo 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 permissionsmkdir -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 wizardopenclaw onboard --install-daemon
Reconfigure modelopenclaw configure
Health checkopenclaw doctor
Fix issuesopenclaw doctor --fix
Start gatewayopenclaw gateway start
Stop gatewayopenclaw gateway stop
Pair Telegramopenclaw pairing approve telegram CODE
Terminal chatopenclaw tui
Web dashboardopenclaw dashboard
Full uninstallopenclaw uninstall --all --yes --non-interactive

AI AgentOpenClawMiniMaxWindowsHyper-VUbuntuTelegram Bot