✳️ Replace the highlighted information with your own
[wsl2]
# Enable mirrored networking mode
networkingMode=mirrored
# Allow Windows Firewall to manage WSL ports
firewall=true
# Limit system resources to prevent freezing (Example: 8GB RAM machine)
memory=4GB
processors=4
[experimental]
# Improve IP mapping and loopback stability
hostAddressLoopback=true
# Automatically reclaim unused RAM from Linux
autoMemoryReclaim=gradual
# Automatically shrink virtual disk size (VHDX)
sparseVhd=true
Parameter Explanation
- networkingMode=mirrored → Use mirrored networking so WSL shares the same LAN as Windows (no NAT, no port forwarding).
- firewall=true → Let Windows Firewall control access to WSL ports (must open ports manually if needed).
- memory=4GB → Limit WSL RAM usage to avoid system lag or freezing.
- processors=4 → Limit the number of CPU cores used by WSL.
- hostAddressLoopback=true → Improve localhost and IP communication between Windows and WSL.
- autoMemoryReclaim=gradual → Automatically release unused RAM back to Windows over time.
- sparseVhd=true → Automatically shrink the virtual disk (VHDX) to save storage space.
Read more
- Fix the ‘Device Signature Expired’ Error in OpenClaw
- How to Access the OpenClaw Dashboard from ANYWHERE
- Enable Windows Subsystem for Linux (WSL) on Windows
- Banana Pi M2 Zero: A Compact Powerhouse for Your Projects
- Installing OpenClaw on Ubuntu Linux
- Top 10 Linux Server Management Tools for Efficient Administration
- How to Create Your OpenAI API Key: A Step-by-Step Guide
- Guide to Installing n8n Server on Ubuntu Using Docker
- Understanding n8n: The Automation Tool You Need
- Install Docker and Portainer on Raspberry Pi