---
title: gremlin-stack Stack
description: NetGrimoire Homelab Docker Swarm Configuration
published: true
date: 2026-04-15T23:47:54.785Z
tags: docker,swarm,gremlin-stack,netgrimoire
editor: markdown
dateCreated: 2026-04-15T23:47:54.785Z
---

# gremlin-stack

## Overview
The gremlin-stack is a Docker Swarm configuration for NetGrimoire's homelab. This stack consists of several services: Ollama, Open WebUI, Qdrant, and N8N Workflow Automation.

## Architecture
| Service | Image | Port | Role |
|---------|-------|-----|------|
- **Host:** docker4
- **Network:** netgrimoire
- **Exposed via:** ai.netgrimoire.com (Caddy), https://ai.netgrimoire.com (Open WebUI)
- **Homepage group:** Gremlin

---

## Build & Configuration

### Prerequisites
No specific prerequisites for this stack.

### Volume Setup
```bash
mkdir -p /DockerVol/ollama:/root/.ollama
mkdir -p /DockerVol/open-webui:/app/backend/data
mkdir -p /DockerVol/qdrant:/qdrant/storage
```

### Environment Variables
```bash
# generate: openssl rand -hex 32
WEBUI_SECRET_KEY=<secret key>
N8N_USER=<user>
N8N_PASSWORD=<password>
NTFY_URL=<ntfy url>
FORGEJO_URL=<forgejo url>
FORGEJO_TOKEN=<forgejo token>
FORGEJO_DOCS_OWNER=<forgejo docs owner>
FORGEJO_DOCS_REPO=<forgejo docs repo>
FORGEJO_WRITE_TOKEN=<forgejo write token>
OLLAMA_MODEL_GENERAL=<ollama model general>
OLLAMA_MODEL_CODE=<ollama model code>
```

| Variable | Description |
|----------|-------------|
WEBUI_SECRET_KEY | Web UI secret key |
N8N_USER | N8N workflow user |
N8N_PASSWORD | N8N workflow password |
NTFY_URL | NTFY notification URL |
FORGEJO_URL | Forgejo API URL |
FORGEJO_TOKEN | Forgejo token |
FORGEJO_DOCS_OWNER | Forgejo docs owner |
FORGEJO_DOCS_REPO | Forgejo docs repo |
FORGEJO_WRITE_TOKEN | Forgejo write token |
OLLAMA_MODEL_GENERAL | Ollama model general |
OLLAMA_MODEL_CODE | Ollama model code |

### Deploy
```bash
cd services/swarm/stack/gremlin-stack
set -a && source .env && set +a
docker stack config --compose-file gremlin-stack-stack.yml > resolved.yml
docker stack deploy --compose-file resolved.yml gremlin-stack
rm resolved.yml
docker stack services gremlin-stack
```

### First Run
No specific steps for the first run.

---

## User Guide

### Accessing gremlin-stack
| Service | URL | Purpose |
|---------|-----|---------|
Open WebUI: https://ai.netgrimoire.com (Caddy), https://n8n.netgrimoire.com (N8N) |

### Primary Use Cases
This stack provides a local LLM runtime and workflow automation capabilities.

### NetGrimoire Integrations
This stack connects to other services in NetGrimoire, including Qdrant and NTFY.

---

## Operations

### Monitoring
[kuma monitors from kuma.* labels]
```bash
docker stack services gremlin-stack
<docker service logs commands>
```

### Backups
Critical data should be backed up regularly. Reconstructing critical data may not be possible if backups are lost or corrupted.

### Restore
```bash
cd services/swarm/stack/gremlin-stack
./deploy.sh
```

---

## Common Failures
| Symptom | Cause | Fix |
|---------|-------|-----|
| Ollama not available | Insufficient resources, invalid configuration | Increase resources or correct configuration |
| Open WebUI not accessible | Invalid Caddy configuration, missing domains | Correct Caddy configuration and add exposed domains |
| N8N Workflow Automation not running | Invalid workflow configuration, missing dependencies | Review and update workflow configuration to include dependencies |

---

## Changelog

| Date | Commit | Summary |
|------|--------|---------|
| 2026-04-15 | 6b1f2646 | Initial documentation for gremlin-stack |
| 2026-04-15 | 9ed423bc | Added Ollama configuration |
| 2026-04-15 | e544cddd | Updated Open WebUI configuration |
| 2026-04-15 | 942855e4 | Added Qdrant configuration |
| 2026-04-14 | 13d50426 | Initial documentation for N8N Workflow Automation |

<Write a paragraph summarizing the evolution of this service based on the diffs above. If no diffs available, note that this is the initial documentation.>

---

## Notes
- Generated by Gremlin on 2026-04-15T23:47:54.785Z
- Source: swarm/stack/Gremlin/gremlin-stack.yml
- Review User Guide and Changelog sections