How to Fix OpenClaw Setup issues on Windows
Honestly, setting up OpenClaw on Windows can be a bit of a rollercoaster. Sometimes, the script doesn’t run right away, or the Gateway refuses to start because of security policies or misconfigured environment variables. If the setup feels more like troubleshooting than installation, don’t worry — here are some common pitfalls and how to fix them, based on actual experience. The goal? Get OpenClaw up and running smoothly so you can automate stuff without a headache.
Method 1: Ensuring PowerShell can run scripts without errors
This is a classic snag. Windows‘ default execution policy often blocks running scripts, which throws a wrench in the installation process. When you run iwr -useb https://openclaw.ai/install.ps1 | iex, it might just hang or say „execution policies prevent this.“ That’s because the default policy (Restricted) blocks script execution. To fix that, you need to loosen the policy temporarily.
- Open PowerShell as an administrator — just hit Win + S, type PowerShell, then right-click and choose „Run as administrator.“
- Run this command to set the current user’s execution policy:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Why this helps? Because it allows locally created scripts and those signed by a trusted publisher to run, which is safe enough for most setups. When running, you might see a prompt — just press Y and then Enter. Once done, try running the install command again. Fair warning — on some setups, this has to be done multiple times or after reboots, because of Windows’ weird permissions stuff.
Method 2: Installing Node.js correctly
If Node.js isn’t installed properly, the entire framework can choke. Make sure you’ve installed the right version (recommended is v22.x), and that you’ve set up Node Version Manager (nvm) to switch versions easily. Sometimes, people forget to open PowerShell as admin after installing nvm, which causes permission issues.
- Download from nvmnode.com and follow the steps. Make sure to run the setup as admin, or your system won’t register the environment variables properly.
- After installing, close PowerShell, reopen as admin, and then input:
nvm install 22 nvm use 22.22.1
Check if it actually switches by typing node -v. If the version shows up correctly, great. If not, that’s probably why OpenClaw can’t run scripts or start properly.
Method 3: Confirming the script execution and network settings
Sometimes, the script downloads fine, but a Windows security feature blocks outbound connections or the script temporarily fails to fetch files. On one setup, I had to disable the Windows Defender Firewall for a couple of minutes just to get it to download everything. Not ideal, but it worked.
Also, double-check your network connectivity, especially if you’re behind a proxy or VPN. Sometimes, PowerShell can’t reach the install script because of proxy blocks. To test it, just run:
Invoke-WebRequest -Uri https://openclaw.ai/install.ps1 -UseBasicParsing
If this command throws an error, fixing your network or proxies is your first step.
Method 4: Verifying environment variables and permissions
Failed configurations are often caused by missing environment vars or permission errors. After installation, you need to make sure the App ID and App Secret are correctly set in your config. Also, when editing configurations via PowerShell, run it with admin rights. Otherwise, the commands might silently fail.
openclaw config set channels.feishu.appId "your-app-id-here" openclaw config set channels.feishu.appSecret "your-app-secret-here" openclaw config set channels.feishu.enabled true
And don’t forget permissions — in Feishu, you must allow the bot to send messages and listen to events. Without that, even with the right IDs, it just won’t work. Add permissions like im:message, im:message:send_as_bot, etc., in the Feishu developer console under App permissions.
Method 5: Restart the Gateway service after config changes
If you make a lot of changes to the config, it’s a good idea to restart the Gateway so everything loads properly. Run:
openclaw gateway restart
This command forces the core service to refresh its settings. Sometimes, especially after permission tweaks, this step is key to get everything talking properly.
On some machines, I’ve noticed you need to close all PowerShell windows and reopen them after changing environment variables to get things talking. Windows can be finicky about memory of old settings; a reboot isn’t a bad idea either.
Summary
- Set PowerShell execution policy to RemoteSigned or Bypass
- Make sure Node.js and nvm are properly installed and recognized
- Verify network connectivity and script download permissions
- Check environment variable configs for Feishu or other channels
- Restart the Gateway after any config changes
Wrap-up
Getting OpenClaw up and running on Windows isn’t always straightforward—Windows just loves to block things or mess with permissions. But once those basic hurdles are out of the way, the thing actually works pretty well. If you run into issues, rechecking the environment, scripts, and permissions usually fixes most problems. Fingers crossed this helps someone avoid the same frustrations faced during setup — it’s definitely worth it once it’s working.