Use a gaming PC as a Google Gemma 4 LLM server
I can use my gaming rig (with an RTX 5070 Ti) as a dedicated local LLM server for AI-assisted coding.
• public
The goal was to run Gemma 4 natively on the PC, and access it as an agentive coding assistant from my work laptop over the local network (LAN). As it turns out, it's very easy.
Initially, I tried pointing Claude Code CLI at my local Ollama instance. Unfortunately, Claude is tightly coupled to Anthropic's specific XML-style tool-calling format. When the local model tried to use its native tool tags, Claude Code couldn't parse it, failing with hanging <tool|><tool_call|> errors.
If you want a seamless, terminal-native coding agent that actually edits your codebase locally, the answer right now is Aider. It uses a diff-based format that local models handle brilliantly.
Here is a quick guide on how to set it up.
1. Set up the Host (Windows PC)
First, install Ollama on your Windows machine. By default, Ollama only listens to localhost. To make it accessible to your laptop, we need to bind it to your local network.
Open your Start menu, search for "Environment Variables", and add a new System Variable:
- Name:
OLLAMA_HOST - Value:
0.0.0.0:11434
Restart Ollama.
Finally, pull your model of choice. With 16GB of VRAM, gemma4:26b (quantised to 4-bit) fits nicely in VRAM entirely.
ollama run gemma4:26b
2. Set up the client
I set this up on MacOS.
Find your local ipv4 of your PC, then you can send a curl command from your laptop to see if they can talk to each other:
curl http://192.168.86.28:11434/v1/models
You should get a response like this:
{"object":"list","data":[{"id":"gemma4:26b","object":"model","created":1775762737,"owned_by":"library"}]}
If not, you may need to allow the port in Windows Defender.
On the machine you're actually writing code on, install Aider. Aider is a command-line AI pair programmer that works exceptionally well inside git repositories.
Install it via pip:
pip install aider-chat
Next, point Aider to your Gaming PC's local IP address (e.g., 192.168.86.31) by setting the API base URL in your terminal:
export OLLAMA_API_BASE="http://192.168.86.28:11434"
Then, launch Aider and specify the Ollama model:
Bash
aider --model ollama/gemma4:26b
Done!
That's it. You can now use your laptop to ask Aider to refactor files, write tests, or implement new features. Aider streams the context over your LAN to your Windows PC, the 5070 Ti crunches the tokens, and Aider automatically commits the resulting diffs to your local git repo.
It’s completely private, subscription-free, and incredibly fast.