Initial commit: homelab infrastructure wiki
- Full Obsidian vault content - Host configs (ice, grizzley, ubuntu, proxmox, truenas, panda, hyte) - Media stack documentation - Traefik HA setup - Automation scripts - Bachelor party planning
This commit is contained in:
68
homelab/raw/articles/opencode/docs/windows-wsl.md
Normal file
68
homelab/raw/articles/opencode/docs/windows-wsl.md
Normal file
@@ -0,0 +1,68 @@
|
||||
---
|
||||
type: agent-doc
|
||||
agent: OpenCode
|
||||
source: https://opencode.ai/docs/windows-wsl
|
||||
scraped: 2026-04-28T21:02:09.247845+00:00
|
||||
content_hash: f30c83ba
|
||||
---
|
||||
# Windows (WSL)
|
||||
|
||||
Run OpenCode on Windows using WSL for the best experience.
|
||||
|
||||
While OpenCode can run directly on Windows, we recommend using Windows Subsystem for Linux (WSL) for the best experience. WSL provides a Linux environment that works seamlessly with OpenCodeâs features.
|
||||
|
||||
---
|
||||
|
||||
## Setup
|
||||
|
||||
1. Install WSL If you havenât already, install WSL using the official Microsoft guide.
|
||||
2. Install OpenCode in WSL Once WSL is set up, open your WSL terminal and install OpenCode using one of the installation methods. Terminal windowcurl -fsSL https://opencode.ai/install | bash
|
||||
3. Use OpenCode from WSL Navigate to your project directory (access Windows files via /mnt/c/, /mnt/d/, etc.) and run OpenCode. Terminal windowcd /mnt/c/Users/YourName/projectopencode
|
||||
|
||||
---
|
||||
|
||||
## Desktop App + WSL Server
|
||||
|
||||
If you prefer using the OpenCode Desktop app but want to run the server in WSL:
|
||||
|
||||
1. Start the server in WSL with --hostname 0.0.0.0 to allow external connections: Terminal windowopencode serve --hostname 0.0.0.0 --port 4096
|
||||
2. Connect the Desktop app to http://localhost:4096
|
||||
|
||||
```
|
||||
OPENCODE_SERVER_PASSWORD=your-password opencode serve --hostname 0.0.0.0
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Web Client + WSL
|
||||
|
||||
For the best web experience on Windows:
|
||||
|
||||
1. Run opencode web in the WSL terminal rather than PowerShell: Terminal windowopencode web --hostname 0.0.0.0
|
||||
2. Access from your Windows browser at http://localhost:<port> (OpenCode prints the URL)
|
||||
|
||||
Running opencode web from WSL ensures proper file system access and terminal integration while still being accessible from your Windows browser.
|
||||
|
||||
---
|
||||
|
||||
## Accessing Windows Files
|
||||
|
||||
WSL can access all your Windows files through the /mnt/ directory:
|
||||
|
||||
- C: drive â /mnt/c/
|
||||
- D: drive â /mnt/d/
|
||||
- And so onâ¦
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
cd /mnt/c/Users/YourName/Documents/projectopencode
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Tips
|
||||
|
||||
- Keep OpenCode running in WSL for projects stored on Windows drives - file access is seamless
|
||||
- Use VS Codeâs WSL extension alongside OpenCode for an integrated development workflow
|
||||
- Your OpenCode config and sessions are stored within the WSL environment at ~/.local/share/opencode/
|
||||
Reference in New Issue
Block a user