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-5XA
Replace 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:3000
docker compose up -d
# Open http://localhost:3000
Add 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 config
Then restart the container:
docker compose restart my-app
| 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:
POST /api/chat
Content-Type: application/json
{
"messages": [
{ "role": "user", "content": "Show me all errors" }
]
}
GET /api/logs/search?q=error&container=nginx&limit=50
GET /api/logs/containers
GET /api/containers/:id
GET /api/status
GET /api/version
See 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/settings
For 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:full
The app runs on: http://localhost:5173 (with hot-reload)
What's running:
localhost:5173 (hot-reload enabled)localhost:7700 (Docker container)Stop development services:
bun run dev:stop
Build and run with all services in Docker:
docker compose down && docker compose up -d --build
App 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 lint
See DEVELOPMENT.md for detailed development guide.
The AI assistant can help you analyze your Docker logs through natural conversation:
Example Queries:
This project supports two development modes:
bun run dev:full) - Hot-reload for fast iterationdocker compose up --build) - Full containerized deploymentThe local development setup uses:
.env.development for localhost configurationdocker-compose.dev.yml for minimal service requirementsNODE_ENVMIT © Marcel Beggiato