Claude Flow uses SQLite for persistent storage, which requires native bindings that can be challenging to install on Windows. This guide provides multiple solutions to get Claude Flow working on Windows systems.
The easiest way to use Claude Flow on Windows is with the automatic fallback mode:
npx -y claude-flow@alpha initThis will automatically use in-memory storage if SQLite fails to load. Your data won't persist between sessions, but all features will work.
Install the necessary build tools to compile native modules:
-
Install Node.js (version 18 or higher)
- Download from: https://nodejs.org/
-
Install Windows Build Tools
Run PowerShell as Administrator:
npm install --global windows-build-tools
Or install manually:
- Visual Studio Build Tools: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022
- Python 3.x: https://www.python.org/downloads/
-
Configure npm for Python
npm config set python python3 -
Install Claude Flow locally
npm install claude-flow@alpha npx claude-flow init
Use pre-built SQLite binaries to avoid compilation:
# Set npm to use pre-built binaries
npm config set build-from-source false
# Install with pre-built binaries
npm install claude-flow@alpha --build-from-source=falseWSL provides a full Linux environment on Windows:
-
Install WSL
In PowerShell as Administrator:
wsl --install -
Install Node.js in WSL
# In WSL terminal curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - sudo apt-get install -y nodejs
-
Use Claude Flow in WSL
npx -y claude-flow@alpha init
Use Claude Flow in a containerized environment:
-
Install Docker Desktop for Windows
- Download from: https://www.docker.com/products/docker-desktop/
-
Run Claude Flow in Docker
docker run -it node:18 npx -y claude-flow@alpha init
This means better-sqlite3 couldn't find or load its native bindings. Solutions:
- Use the automatic fallback (no action needed)
- Install Windows Build Tools (Option 1)
- Use WSL or Docker (Options 3 or 4)
Windows can't load the SQLite DLL. Solutions:
- Install Visual C++ Redistributables: https://aka.ms/vs/17/release/vc_redist.x64.exe
- Use pre-built binaries (Option 2)
If you get EPERM or access denied errors:
- Run your terminal as Administrator
- Use a different directory (avoid system directories)
- Check antivirus software isn't blocking file creation
Check if SQLite is working:
// test-sqlite.js
const Database = require('better-sqlite3');
try {
const db = new Database(':memory:');
console.log('✅ SQLite is working!');
db.close();
} catch (error) {
console.log('❌ SQLite failed:', error.message);
}Run with: node test-sqlite.js
- In-Memory Mode: Fastest performance, no persistence
- SQLite Mode: Slower operations, full persistence
- WSL: Near-native Linux performance
- Docker: Slight overhead, consistent environment
- Works well with WSL Remote extension
- Native Windows terminal may need build tools
- Configure Node.js interpreter correctly
- May need to set npm proxy settings
Set a custom path for the SQLite database:
// .claude/config.json
{
"memory": {
"type": "sqlite",
"path": "C:\\Users\\YourName\\AppData\\Local\\claude-flow\\memory.db"
}
}Always use in-memory storage:
// .claude/config.json
{
"memory": {
"type": "in-memory"
}
}- Windows Defender may scan SQLite operations
- Some antivirus software blocks native modules
- Add exceptions for
.claudeandnode_modulesdirectories
- GitHub Issues: https://github.com/ruvnet/claude-code-flow/issues
- Discord: [Join our community]
- Documentation: https://claude-flow.dev/docs
| Method | Persistence | Setup Difficulty | Performance |
|---|---|---|---|
| Fallback (Default) | ❌ | ⭐ Easy | ⚡ Fast |
| Build Tools | ✅ | ⭐⭐⭐ Hard | ⚡ Fast |
| Pre-built | ✅ | ⭐⭐ Medium | ⚡ Fast |
| WSL | ✅ | ⭐⭐ Medium | ⚡ Fast |
| Docker | ✅ | ⭐⭐ Medium | 🔄 Good |
Choose the method that best fits your needs. For most users, the automatic fallback mode works perfectly for trying out Claude Flow.