Docker Log Aggregator with AI-Search, powered by Meilisearch and OpenRouter
Collect, index, and search container logs with a modern web UI and a AI assistant.
Quick Start β’ Features β’ Configuration β’ API β’ Development
# Download docker-compose.example.yml
curl -O https://raw.githubusercontent.com/MBeggiato/loggator/main/docker-compose.example.yml
# Rename to docker-compose.yml
mv docker-compose.example.yml docker-compose.yml# Linux/Mac
openssl rand -base64 32
# Or use this example key (NOT for production!)
# bLwLpwgIW6VQTBrt7ZhUw9MiJXYh8Vat7YVr4lU-5XAReplace aSampleMasterKey1234567890abcdef with your generated key in both places:
MEILI_MASTER_KEY(Meilisearch service)MEILISEARCH_API_KEY(Loggator service)
Important: Both values must be identical!
Get your free API key from OpenRouter and create a .env file:
# .env
OPENROUTER_API_KEY=sk-or-v1-... # Your OpenRouter API key
AI_MODEL=xiaomi/mimo-v2-flash:free
SITE_URL=http://localhost:3000docker compose up -d
# Open http://localhost:3000Add the label to containers you want to monitor:
services:
my-app:
image: my-app:latest
labels:
- 'loggator.enable=true' # Enable log collection
# ... rest of your configThen restart the container:
docker compose restart my-app- π€ AI Log Assistant - Chat with an AI about your logs using OpenRouter
- Natural language queries: "Show me all errors from the last hour"
- Automatic tool calling for log search, container info, and health checks
- Chat history persistence across sessions
- Markdown responses with syntax highlighting
- οΏ½ Error Notifications - Get notified when errors occur in your containers
- AI-generated summaries of problems with recommendations
- Support for Email, Slack, Discord, Telegram, MS Teams, and custom Webhooks
- Configurable filters by severity, container, and error count
- Smart cooldown to prevent notification spam
- οΏ½π Full-text search - Fast log search powered by Meilisearch
- π Real-time dashboard - Live log streaming and statistics
- π³ Label-based filtering - Only monitor containers you choose
- π Multi-language UI - English and German support
- π Update notifications - Get notified of new releases
- π Log histograms - Visualize log activity over time
| Variable | Default | Description |
|---|---|---|
| `MEILISEARCH_HOST` | `http://meilisearch:7700\` | Meilisearch URL |
| `MEILISEARCH_API_KEY` | - | Meilisearch API key |
| `DOCKER_LABEL_FILTER` | `loggator.enable=true` | Container filter label |
| `PORT` | `3000` | Web UI port |
To enable the AI Log Assistant, add these environment variables:
| Variable | Default | Description |
|---|---|---|
| `OPENROUTER_API_KEY` | - | Your OpenRouter API key |
| `AI_MODEL` | `xiaomi/mimo-v2-flash:free` | OpenRouter model to use |
| `SITE_URL` | `http://localhost:3000\` | Your site URL for OpenRouter logs |
Get your free OpenRouter API key at: https://openrouter.ai/keys
Available AI Tools:
- `search_logs` - Search logs using Meilisearch with filters
- `list_containers` - List all Docker containers
- `get_container_info` - Get detailed container information
- `analyze_container_health` - Analyze container health status
POST /api/chat
Content-Type: application/json
{
"messages": [
{ "role": "user", "content": "Show me all errors" }
]
}GET /api/logs/search?q=error&container=nginx&limit=50GET /api/logs/containersGET /api/containers/:idGET /api/statusGET /api/versionSee NOTIFICATIONS.md for complete notification system documentation.
# List all notification channels
GET /api/notifications/channels
# Create/update notification channel
POST /api/notifications/channels
# Test notification channel
POST /api/notifications/test
# Get notification settings
GET /api/notifications/settingsFor local development with instant code updates:
# Start required services (Meilisearch + Test-Logger)
bun run dev:services
# Start dev server with hot-reload
bun run dev
# Or start everything at once
bun run dev:fullThe app runs on: http://localhost:5173 (with hot-reload)
What's running:
- SvelteKit Dev Server:
localhost:5173(hot-reload enabled) - Meilisearch:
localhost:7700(Docker container) - Test-Logger: Docker container for testing
Stop development services:
bun run dev:stopBuild and run with all services in Docker:
docker compose down && docker compose up -d --buildApp runs on: http://localhost:3000
.env.development- Local development (localhost URLs).env- Production/Docker (container URLs)
# Install dependencies
bun install
# Type check
bun run check
# Format code
bun run format
# Lint
bun run lintSee DEVELOPMENT.md for detailed development guide.
- Frontend: SvelteKit 2 + Svelte 5 (with runes)
- AI: OpenRouter (multi-model support)
- Search: Meilisearch
- Docker: dockerode
- Runtime: Bun
- UI: Tailwind CSS + shadcn-svelte
- Markdown: marked + highlight.js
- i18n: Custom translation system (DE/EN)
The AI assistant can help you analyze your Docker logs through natural conversation:
- Automatic Tool Selection: The AI automatically chooses the right tools to answer your questions
- Context-Aware: Understands container names, log levels, and time ranges
- Markdown Formatting: Responses include formatted tables, code blocks, and lists
- Persistent Chat: Your conversation history is saved in your browser
- Multi-Language: Works in German and English
Example Queries:
- "Show me all errors from the last hour"
- "Which containers are currently running?"
- "What happened with the nginx container?"
- "Analyze the health of my database container"
This project supports two development modes:
- Local Development (
bun run dev:full) - Hot-reload for fast iteration - Production Build (
docker compose up --build) - Full containerized deployment
The local development setup uses:
.env.developmentfor localhost configurationdocker-compose.dev.ymlfor minimal service requirements- Automatic environment switching based on
NODE_ENV
MIT Β© Marcel Beggiato

