windows-local-ai-services
Skill13 starsChanged 7 months agoMITView on GitHub
Run local AI services on Windows — port binding, firewall, WSL2 networking, and common pitfalls.
In this repository143 other files it gives its agents.
- api-and-interface-designSkill
- browser-testing-with-devtoolsSkill
- ci-cd-and-automationSkill
- code-review-and-qualitySkill
- code-simplificationSkill
- context-engineeringSkill
- debugging-and-error-recoverySkill
- deprecation-and-migrationSkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- frontend-ui-engineeringSkill
- git-workflow-and-versioningSkill
- idea-refineSkill
- incremental-implementationSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- security-and-hardeningSkill
- shipping-and-launchSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- addyosmani-tddSkill
- using-agent-skillsSkill
- apple-notesSkill
- apple-remindersSkill
- findmySkill
- imessageSkill
- claude-codeSkill
- codexSkill
- hermes-agentSkill
- opencodeSkill
- architecture-diagramSkill
- ascii-artSkill
- ascii-videoSkill
- baoyu-comicSkill
- baoyu-infographicSkill
- claude-designSkill
- comfyuiSkill
- creative-ideationSkill
- design-mdSkill
- drawio-headlessSkill
- excalidrawSkill
- humanizerSkill
- manim-videoSkill
- p5jsSkill
- pixel-artSkill
- popular-web-designsSkill
- pretextSkill
- sketchSkill
- social-media-slideshow-videoSkill
- songwriting-and-ai-musicSkill
- touchdesigner-mcpSkill
- visual-assets-generationSkill
- jupyter-live-kernelSkill
- api-monitoring-botsSkill
- cloud-browser-automationSkill
- docker-composeSkill
- kanban-orchestratorSkill
- kanban-workerSkill
- tinyfish-integrationSkill
- vps-cleanupSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 102
If it's your service from a previous run: kill it and restart
- Very specific: line 103
If it's svchost or another system service: change your service's port
- Distinctive: line 121
When setting up a new local AI service on Windows:
- Distinctive: line 136
After setup, verify cross-OS connectivity:
- Distinctive: line 155
Verify firewall rules: before blaming the service
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Windows Local AI Services
Running local AI services (enowxai, Ollama, LM Studio, vLLM, llama.cpp servers) on Windows has specific networking and port binding pitfalls. This skill covers setup, troubleshooting, and WSL2 cross-OS access.
References
references/windows-port-restrictions.md— Windows reserved port ranges and binding errorsreferences/headless-gui-apps.md— Running GUI apps in headless WSL2 with Xvfb
Common Pitfalls
1. Port Binding Failures
Symptom: Service crashes immediately with:
ERROR failed to start error="listen tcp4 127.0.0.1:1430: bind: An attempt was made to access a socket in a way forbidden by its access permissions."Root Cause: Windows reserves certain port ranges for system services (Hyper-V, WinNAT, dynamic port allocation). Ports in these ranges cannot be bound by user applications.
Fix:
- Change the port (easiest):
# Use a port outside reserved ranges (8000-9000 is usually safe) service start --port 8430 - Check reserved ranges:
netsh int ipv4 show dynamicport tcp netsh int ipv4 show excludedportrange protocol=tcp - Exclude a specific port (risky, can conflict with system services):
netsh int ipv4 add excludedportrange protocol=tcp startport=1430 numberofports=1
Never kill svchost.exe — it's a Windows system service host. If netstat shows svchost using your target port, the port is reserved by Windows.
2. WSL2 Cross-OS Networking
Symptom: Service runs on Windows but WSL2 cannot connect via localhost.
Root Cause: WSL2 uses a virtualized network. localhost in WSL2 points to the WSL2 VM, not the Windows host.
Fix:
- Use Windows host gateway IP from WSL2:
# Get Windows host IP (usually 172.17.16.1, but can change on reboot) ip route show default | awk '{print $3}' # Test connection curl http://172.17.16.1:8430/v1/models - Ensure Windows service listens on 0.0.0.0 (not 127.0.0.1):
# Check listening address netstat -ano | findstr :8430 # Should show 0.0.0.0:8430, not 127.0.0.1:8430 - Configure Windows Firewall:
# Allow inbound on the service port New-NetFirewallRule -DisplayName "AI Service Port 8430" -Direction Inbound -LocalPort 8430 -Protocol TCP -Action Allow
3. Process Already Running
Symptom: Service says "port already in use" but Get-Process shows nothing.
Diagnosis:
# Find what's using the port
netstat -ano | findstr :8430
# Get process details (replace 1234 with PID from netstat)
Get-Process -Id 1234 | Select-Object Name, Id, PathFix:
- If it's your service from a previous run: kill it and restart
- If it's
svchostor another system service: change your service's port
4. Service Crashes Silently
Always check logs first:
# Common log locations
Get-Content ~\.service-name\service.log -Tail 50
Get-Content $env:APPDATA\service-name\logs\latest.log -Tail 50Common causes:
- Missing dependencies (Python, CUDA/ROCm, Visual C++ Redistributable)
- Config file syntax errors
- Permission issues (try running PowerShell as Administrator)
Setup Checklist
When setting up a new local AI service on Windows:
- Choose a safe port (8000-9000 range recommended)
- Configure to listen on 0.0.0.0 (not 127.0.0.1) if WSL2 access needed
- Add Windows Firewall rule for the port
- Test from Windows first:
curl http://localhost:PORT/health - Test from WSL2:
curl http://$(ip route show default | awk '{print $3}'):PORT/health - Save the gateway IP or add to WSL2
~/.bashrc:export WINDOWS_HOST=$(ip route show default | awk '{print $3}') export AI_SERVICE_URL="http://$WINDOWS_HOST:8430/v1"
Verification
After setup, verify cross-OS connectivity:
# From WSL2
GATEWAY_IP=$(ip route show default | awk '{print $3}')
echo "Windows host IP: $GATEWAY_IP"
# Test connection
curl -s http://$GATEWAY_IP:8430/v1/models | jq .
# If it works, save to config
echo "export AI_SERVICE_URL=http://$GATEWAY_IP:8430/v1" >> ~/.bashrcRules
- Always check logs before guessing — most errors are explicit
- Never kill system processes (svchost, System, services.exe)
- Use gateway IP for WSL2 → Windows — never
localhost - Verify firewall rules before blaming the service
- Document the port — save it in config files, not just command-line flags
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

