A self-hosted AI stack running locally with Docker Compose.
This repository contains everything needed to run:
- Ollama (local LLM inference)
- Open WebUI (chat interface)
- SearXNG (web search)
- ComfyUI (image generation workflows)
- n8n (automation and agents)
┌──────────────┐
│ Open WebUI │
└──────┬───────┘
│
├──► Ollama
│
├──► SearXNG
│
├──► ComfyUI
│
└──► n8n
| Service | URL | Purpose |
|---|---|---|
| Open WebUI | http://localhost:3000 | Chat interface |
| Ollama | http://localhost:11434 | Local LLM backend |
| SearXNG | http://localhost:8080 | Private web search |
| ComfyUI | http://localhost:8188 | Image generation |
| n8n | http://localhost:5678 | Automations & agents |
Recommended:
- NVIDIA GPU
- 16 GB+ VRAM
- 64 GB+ RAM
Current development machine:
- AMD Ryzen 7 8700G
- NVIDIA RTX 5070 eGPU
- 96 GB RAM
Clone repository:
git clone https://github.com/davcastroruiz/local-ai-stack.git
cd local-ai-stackStart stack:
docker compose up -dVerify:
docker psUpdate all containers:
docker compose pull
docker compose down
docker compose up -dUpdate a single service:
docker compose pull open-webui
docker compose up -d open-webuiExamples:
docker compose pull ollama
docker compose up -d ollama
docker compose pull searxng
docker compose up -d searxng
docker compose pull comfyui
docker compose up -d comfyui
docker compose pull n8n
docker compose up -d n8nAutomatic container updates.
Example service:
watchtower:
image: containrrr/watchtower
container_name: watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --cleanup --interval 86400Start:
docker compose up -d watchtowerLogs:
docker logs -f watchtowerForce update check:
docker exec watchtower /watchtower --run-onceOpen WebUI search integration requires JSON output.
Enter container:
docker exec -it searxng shEdit:
/etc/searxng/settings.ymlRequired configuration:
search:
formats:
- html
- jsonRestart:
docker restart searxngValidation:
curl "http://localhost:8080/search?q=test&format=json"Expected result:
- JSON response
- Not HTML
docker logs -f ollama
docker logs -f open-webui
docker logs -f searxng
docker logs -f comfyui
docker logs -f n8ndocker restart ollama
docker restart open-webui
docker restart searxng
docker restart comfyui
docker restart n8nImportant data:
webui volume
ollama volume
./n8n_data
docker compose config > compose-resolved.yml- Install Docker Desktop
- Copy repository
- Restore volumes
- Restore
n8n_data - Run:
docker compose up -d- Verify services
Verify:
curl "http://localhost:8080/search?q=test&format=json"If HTML is returned:
search:
formats:
- html
- jsonRestart SearXNG.
docker psExpected:
ollama
open-webui
searxng
comfyui
n8n
- HTTPS reverse proxy
- Authentication hardening
- Automatic backups
- Monitoring
- GPU metrics
- Multi-user support
- Agent workflows through n8n
- ComfyUI API integration with Open WebUI
MIT License