Skip to content

TuxLux40/decky-ollama

Repository files navigation

decky-ollama

decky-ollama logo

Run and monitor Ollama from the Steam Deck Quick Access Menu (QAM).

Decky Loader compatible Steam Deck ready TypeScript frontend Python backend

A Decky Loader plugin that brings Ollama to Gaming Mode. Start and stop the service from the QAM and see what models are loaded. A companion system service automatically evicts models from VRAM when a game launches.

What It Does

  • Service control — start and stop ollama serve from the QAM without leaving Gaming Mode
  • Model info — lists installed models and their disk size at a glance
  • VRAM eviction — the ollama-game-watcher system service unloads models from VRAM the moment a game starts

Whats the point?

I wanted to let my PC run as a game streaming server to play over tailscale and sunshine/moonlight when I'm away from home, but I also wanted my Ollama models to still be available in OpenWebUI. Since user services don't persist into Gaming Mode, I had Claude create this plugin for me to turn it into a system service that would and also check the status. Future features could include some form of assist features for games or errors or whatever else could be useful.

Quick Start

Requirements

  • Steam Deck / SteamOS 3.x or an Arch-based distro (tested on CachyOS)
  • Decky Loader installed
  • Ollama installed and at least one model pulled (e.g. ollama pull huihui_ai/qwen3.5-abliterated)

Option A — sideload a pre-built release (no build tools required)

  1. Download decky-ollama.zip from the latest release
  2. In Decky Loader, open Settings → Developer → Install plugin from zip
  3. Point it at the downloaded zip

Option B — build from source

Requires Node.js 20+ and pnpm (npm install -g pnpm).

git clone https://github.com/TuxLux40/decky-ollama.git
cd decky-ollama
bash install.sh

Then restart Decky Loader from the QAM.

How It Works

QAM panel (React/TypeScript)
                                │  callable()
                                ▼
Decky Loader IPC
                                │
                                ▼
main.py  (Python, runs as root)
                                │
         ┌──────────┴──────────────┐
         │                         │
ollama binary          Ollama REST API
                       http://localhost:11434

The game watcher is a separate bash process under systemd. It polls pgrep -f "SteamLaunch AppId" every 2 seconds and calls the Ollama API to evict loaded models when a game starts.

Backend API

Method Purpose
get_status() Returns { installed, running, version }
start_service() Starts ollama serve
stop_service() Stops the running ollama serve process
list_models() Returns installed models from the Ollama API

Development

Prerequisites: Node.js 20+, pnpm 10+.

pnpm install       # install dependencies
pnpm build         # compile frontend → dist/index.js
pnpm run watch     # rebuild on changes
pnpm run typecheck # TypeScript type check without emit
pnpm run lint      # ESLint on src/

For backend-only changes, edit main.py and restart Decky Loader on the Deck.

Contributing

PRs are welcome. Open an issue first for anything beyond small fixes.

License

See LICENSE.

About

Decky Loader plugin to let Ollama run in game-mode.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors