Build Your Private AI Image Generator with Docker and Open WebUI
Introduction
Ever found yourself needing a quick image for a project, only to get sidetracked by credit counts, privacy worries, or overly strict content filters blocking your dragon-in-a-suit concept? There's a better way: run everything on your own machine with a polished chat interface. Docker Model Runner now makes it trivial to pull a diffusion model, connect it to Open WebUI, and start generating images—all locally, privately, and without a single subscription fee. This guide walks you through the entire setup, from prerequisites to your first generated image.

What You'll Need
- Docker Desktop (macOS) or Docker Engine (Linux)
- ~8 GB of free RAM for a small model (more RAM allows larger models)
- GPU (optional but highly recommended): NVIDIA CUDA, Apple Silicon (MPS), or CPU fallback
- Open WebUI (automatically handled by Docker Model Runner)
If you can run docker model version without errors, you're ready to proceed.
Step 1: Pull an Image Generation Model
Docker Model Runner uses DDUF (Diffusers Unified Format) to distribute models via Docker Hub. This single-file bundle contains everything a diffusion model needs: text encoder, VAE, UNet/DiT, and scheduler configuration. To get started, open your terminal and run:
docker model pull stable-diffusion
This pulls the default Stable Diffusion XL model. You can verify it downloaded correctly with:
docker model inspect stable-diffusion
You'll see output like this (truncated for clarity):
{
"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. At runtime, Docker Model Runner unpacks it and starts the inference backend. For a list of available models, run docker model search.
Step 2: Launch Open WebUI
Here's the magic: Docker Model Runner includes a built-in command that wires up Open WebUI against your local inference endpoint. Just run:
docker model launch openwebui
This command automatically:
- Starts the model inference service (exposing an OpenAI-compatible API)
- Pulls and runs the Open WebUI container
- Connects the UI to the API endpoint
- Opens a browser tab at
http://localhost:8080(or your configured port)
You'll see a familiar chat interface. The backend fully supports the POST /v1/images/generations endpoint, so Open WebUI can use it natively.

Step 3: Generate Your First Image
Once Open WebUI loads in your browser:
- Select the image generation model from the dropdown (usually named "stable-diffusion" or something similar).
- Type a prompt in the chat box, e.g., "a dragon wearing a business suit, digital art".
- Hit Enter and wait a few seconds. The model will generate an image and show it inline.
- Refine your prompt or adjust parameters (like number of images, size) in the settings panel if available.
Because everything is local, there are no credit limits, no content filters (unless you add them), and no data leaving your machine.
Tips for Best Results
- Use a GPU for speed. CPU generation can be 10–100x slower. For NVIDIA, ensure CUDA drivers are installed. For Apple Silicon, Docker Desktop handles MPS automatically.
- Free up RAM. Stable Diffusion XL requires about 8 GB VRAM. Close other heavy applications to avoid swap thrashing.
- Experiment with models. Try
docker model pull sdxl-turbofor faster generation ordocker model pull pixart-sigmafor higher quality. Usedocker model searchto discover more. - Customize Open WebUI. You can add external Ollama models for chat while keeping image generation local. Just configure the OpenAI endpoint in Open WebUI settings.
- Manage storage. Image models are large (5–10 GB each). Run
docker model pruneto remove unused models. - Security. Keep the Docker port unused or behind a firewall—local AI means local only.
That's it! You now have a private, no-cloud image generator accessible through a friendly chat interface. No subscriptions, no data leaks, no rejected prompts.
Related Articles
- AWS and Anthropic Deepen AI Collaboration; Meta Joins Graviton Ecosystem for Agentic AI
- 5 Key Insights into Kubernetes Server-Side Sharded List and Watch (v1.36 Alpha)
- Dynamic Workflows: Durable Execution Customized Per Tenant
- 10 Milestones of Docker Hardened Images: One Year of Security Innovation
- 10 Critical Lessons from the .de DNSSEC Outage: How One Misconfiguration Broke the Internet
- 10 Essential Actions to Defend Your Software Supply Chain Now
- AWS Weekly Roundup: Anthropic Collaboration, Meta’s Graviton Deal, and Lambda S3 Files Integration
- How Dynamic Workflows Bring Durable Execution to Multi-Tenant Platforms