Running OpenCode with a Remote Ollama Server I recently changed my local AI development setup so that OpenCode no longer runs models on the same machine where I edit code. Instead, OpenCode connects to a remote Ollama server over my local network. This approach lets me keep my development environment lightweight while dedicating another machine to model inference. Why use a remote Ollama server? Running Ollama remotely offers several advantages: The development machine remains responsive while the model generates responses. GPU resources can be centralized on a dedicated machine. Multiple computers can share the same inference server. Updating or changing models only needs to be done on one system. The OpenCode configuration remains simple. As long as the network latency is reasonable, the experience is very close to using a local Ollama instance. My OpenCode configuration OpenCode supports providers compatible with the OpenAI API. Since O...
Supercharging Your Local Ollama Server: Network Access, Permanent Memory, and Extended Context If you run LLMs locally on Linux using Ollama, you know how smooth and lightweight the installation experience is. However, out of the box, Ollama’s default configuration is tailored for a single-user desktop environment—binding strictly to localhost, unloading models from memory after 5 minutes of inactivity, and capping the context length to a standard limit. If you are setting up a dedicated AI server on your local network, running a WebUI on another machine, or building RAG (Retrieval-Augmented Generation) applications, these defaults can get in your way. In this post, we’ll explore how to tweak Ollama's systemd service file on Linux to: 1. Expose the API across your local network. 2. Keep models continuously loaded in memory (zero startup lag). 3. Extend the context window size up to 32,768 tokens. The Customized systemd Service File When installing Ollama on Linux, it r...