OpenCode and Ollama: local coding setup with Qwen3-Coder
Learn to connect OpenCode to Ollama on a Windows PC over a local network, configure Qwen3-Coder 30B, and test the connection.
Player not loading? Watch on YouTube
This tutorial connects OpenCode, an open source coding assistant, to Qwen3-Coder 30B through Ollama. The presenter uses an Ollama server on a Windows PC over the local network. The walkthrough covers the connection and a basic response test; application development and context tuning are left for a later video.
After installing OpenCode with npm, the presenter checks the Ollama server with curl and inspects its available models. The setup uses port 11434. OpenCode's global JSON configuration defines the provider, connection library, base URL and model entries. The presenter explains when to use the server's network address or 127.0.0.1 for a server on the same machine. Model identifiers must match the names returned by Ollama, while display names can differ.
The configured models have 16K and 4K context windows. A provider/model setting selects the default when OpenCode launches. This gives the AI agent a local LLM backend without a paid cloud API for the demonstrated connection.
The final test sends a greeting and receives a reply. During loading, the presenter reports about 20.4 GB of memory use and increased GPU activity. That observation describes this setup, rather than a general hardware requirement. The presenter expects later requests to be faster, but does not benchmark them or demonstrate a complete coding task.