Open Dungeon

Run a private, local AI roleplaying game with on-device text and image generation, connecting to Ollama or other local LLMs.

Run a private, local AI roleplaying game with on-device text and image generation, connecting to Ollama or other local LLMs.

The gist

Open Dungeon is a self-hosted AI roleplaying application for creating interactive fiction. Built by GitHub user newideas99, it solves the privacy and cost issues of cloud-based AI by running entirely on your own machine. The application generates both the story text and corresponding scene images locally, requiring no accounts or API keys. Your stories and characters are stored privately on your computer, ensuring complete data ownership.

What it does

  • Generates interactive stories and scene images locally on your machine.
  • Connects to local LLMs via Ollama or any OpenAI-compatible backend.
  • Manages long-term story memory using context window management and summarization.
  • Provides full play controls including Do/Say/Story modes, Retry, Erase, and inline editing.
  • Maintains character visual continuity using reference images for text and image generation.
  • Runs as a local web server accessible from other devices on your network.

How it works

Architecture Diagram
Open Dungeon Architecture Diagram

Open Dungeon is a self-hosted Next.js web application that you run on your computer. It interfaces with local LLMs through Ollama or other backends to generate story text based on user input. For optional image generation, it uses a separate local worker. All data, including stories and images, is stored in a local SQLite database. The software is free and open-source under the MIT license.

Best for

This tool is best for roleplayers and creative writers who want a completely private, self-contained environment for generating interactive fiction without relying on cloud services.

Watch out for

Inline image generation is currently optimized for and targets Apple Silicon devices. The initial setup requires technical comfort with installing Node.js, Ollama, and downloading multi-gigabyte language models, which requires substantial RAM and storage.