Build Your Own Private AI Image Generator with Docker and Open WebUI

By ✦ min read

Introduction

Have you ever wanted to generate images with AI but hesitated because of privacy concerns, credit limits, or overly strict content filters? Imagine creating stunning visuals—like a dragon in a business suit—without worrying about where your prompts go or how many credits you have left. With Docker Model Runner and Open WebUI, you can run a powerful image generation model entirely on your own machine, accessible through a sleek chat interface. This guide walks you through setting up your personal, private DALL-E alternative—no cloud subscription required.

Build Your Own Private AI Image Generator with Docker and Open WebUI
Source: www.docker.com

What You'll Need

Before diving in, ensure your system meets these requirements:

To verify your setup, run docker model version in your terminal. If it returns without errors, you're ready to proceed.

How Docker Model Runner & Open WebUI Work Together

Here’s the big picture: Docker Model Runner acts as the control plane for AI models. It downloads the model, manages the inference backend lifecycle, and exposes a fully OpenAI-compatible API—including the critical POST /v1/images/generations endpoint. Open WebUI, a popular chat interface, already knows how to talk to this API. By connecting them, you get a local, private image generator that feels like a cloud service.

Step-by-Step Setup

Step 1: Pull an Image Generation Model

Docker Model Runner uses DDUF (Diffusers Unified Format), a compact packaging format that bundles all diffusion model components (text encoder, VAE, UNet/DiT, scheduler config) into a single portable file. These models are distributed through Docker Hub like any OCI artifact.

To download a model, run:

docker model pull stable-diffusion

Once downloaded, verify it with:

docker model inspect stable-diffusion

You'll see output similar to this (truncated for brevity):

{
  "id": "sha256:5f60862074a4c585126288d08555e5ad9ef65044bf490ff3a64855fc84d06823",
  "tags": ["docker.io/ai/stable-diffusion:latest"],
  "config": {
    "format": "diffusers",
    "size": "6.94GB"
  }
}

The model is stored locally as a DDUF file, ready to be unpacked at runtime by Docker Model Runner.

Step 2: Launch Open WebUI

This is where the magic happens. Docker Model Runner includes a built-in command that automatically configures Open WebUI to connect to your local inference endpoint. Simply run:

Build Your Own Private AI Image Generator with Docker and Open WebUI
Source: www.docker.com
docker model launch openwebui

That single command wires everything together. Open WebUI starts up, pointing directly at your local model server. You can then open your browser to the provided URL and start generating images from the chat interface—fully private, fully local, and completely free.

Alternative: Manual Configuration

If you prefer to run Open WebUI separately (e.g., over an existing container setup), you can configure the OPENAI_API_BASE_URL environment variable to point to your Docker Model Runner endpoint. But the launch command is the simplest path.

Pro Tips for Best Results

Conclusion

With Docker Model Runner and Open WebUI, you now have a fully private, locally running AI image generator. No cloud subscriptions, no data leaving your machine, and no content filters blocking your creative ideas. Whether you're a designer, developer, or hobbyist, this setup puts the power of generative AI at your fingertips—literally on your own desktop.

Start creating today: pull a model, launch the UI, and let your imagination run wild. The only limit is your hardware.

Tags:

Recommended

Discover More

Simulating Complex Systems: How Hash.ai Empowers You to Model the WorldHow to Curate Your Own Weekly Gaming Roundup: A Step-by-Step GuideThe World's Worst Coder Creates AI That Cracks Code Leaderboards—And Experts Are WorriedCemu Wii U Emulator Linux Builds Infected with Malware: What You Need to KnowDisappearing Act: The Art of Invisible Smart Home Sensors