A complete Docker Compose setup for running n8n automation workflows with integrated AI services and document processing capabilities.
- Docker and Docker Compose installed
- At least 4GB RAM available (for AI models)
- 10GB free disk space
git clone <repository-url>
cd n8n-docker-composeStart the default (basic) set (ytdlp, whisper, n8n):
docker-compose up -d --buildStart the full set (all services):
docker-compose --profile full up -d --build- Open http://localhost:5678
- Login with:
- Username:
admin - Password:
password
- Username:
- In n8n, go to Workflows β Import from File
- Upload
workflows/Text File to Elasticsearch Indexer - Working Version.json - Activate the workflow
This repository provides a ready-to-use Docker Compose stack that includes:
- n8n - No-code automation platform for building workflows
- Elasticsearch - Search and analytics engine for document indexing
- Ollama - Local LLM inference server for AI capabilities
- LaBSE - Multilingual text embeddings service (109 languages supported)
- YT-DLP - YouTube and video platform downloader with REST API
- Whisper - Audio transcription service using OpenAI Whisper (faster-whisper)
This setup is ideal for:
- Document Processing & Search: Upload text files, automatically split them into paragraphs, and index them in Elasticsearch for semantic search
- AI-Powered Workflows: Leverage local LLM models through Ollama for text processing, analysis, and generation
- Multilingual Text Analysis: Use LaBSE embeddings for cross-language semantic similarity and search
- Audio Transcription: Convert audio files to text using state-of-the-art Whisper models
- No-Code Automation: Build complex workflows without programming using n8n's visual interface
- Privacy-First AI: All AI processing happens locally β no data sent to external APIs
| Service | Port | Purpose | Access |
|---|---|---|---|
| n8n | 5678 | Workflow automation platform | http://localhost:5678 |
| Elasticsearch | - | Document search and analytics | Internal (via Docker network) |
| Ollama | - | Local LLM inference server | Internal (via Docker network) |
| LaBSE | - | Multilingual embeddings API | Internal (via Docker network) |
| YT-DLP | - | YouTube video/audio downloader | Internal (via Docker network) |
| Whisper | - | Audio transcription service | Internal (via Docker network) |
Note: Ports for services other than n8n are not forwarded to localhost to avoid conflicts. They are accessible from n8n or other containers via the Docker network.
Automatically transcribe YouTube videos to text:
- Open n8n: http://localhost:5678 (login: admin / password)
- Find workflow: "YouTube Video Transcription (Manual)"
- Edit URL: Open the "Enter YouTube URL" node and paste your YouTube link
- Run: Click "Execute workflow"
- Get result: View the transcription in the "Format Response" node
π Full instructions: See workflows/QUICK_START.md
Features:
- β Simple form-based input
- β Automatic audio extraction
- β Multi-language support (auto-detect or specify)
- β Timestamped segments
- β Multiple Whisper models (tiny to large)
The included workflow demonstrates the stack's capabilities:
- File Upload: Web form for uploading text files
- Text Processing: Automatically splits content into paragraphs
- Elasticsearch Indexing: Stores processed documents with metadata
- Batch Processing: Handles large files efficiently
- Activate the "Text File to Elasticsearch Indexer" workflow
- Open the webhook URL provided by the form trigger
- Upload a
.txtfile - Documents will be automatically indexed in Elasticsearch
- Basic authentication enabled
- Persistent data storage
- Connected to other services via Docker network
- Production-oriented settings for local development
- Single-node setup
- No authentication (for local development)
- Persistent data volume
- Optimized for document storage
- Ready for LLM model installation
- Persistent model storage
- GPU acceleration supported if available
- FastAPI-based service
- Supports 109 languages
- 768-dimensional embeddings
- Batch processing capable
- Download videos from YouTube and 1000+ sites
- Extract audio in MP3 format
- Return video metadata and transcripts
- REST API for easy integration
- Audio-to-text transcription using faster-whisper
- Supports multiple audio formats (MP3, WAV, M4A, OGG, FLAC, WebM)
- Automatic language detection
- Multiple model sizes (tiny, base, small, medium, large)
- Timestamp generation for each segment
- Optional translation to English
curl -X POST http://localhost:8080/embeddings \
-H "Content-Type: application/json" \
-d '{"texts": ["Hello world", "ΠΡΠΈΠ²Π΅Ρ ΠΌΠΈΡ", "Hola mundo"]}'curl -X GET "http://localhost:9200/documents/_search?q=your_search_term"docker exec -it ollama ollama pull llama2curl -X POST http://localhost:8081/download \
-H "Content-Type: application/json" \
-d '{"url": "https://www.youtube.com/watch?v=VIDEO_ID", "format": "video", "quality": "best"}'curl -X POST http://localhost:8081/download \
-H "Content-Type: application/json" \
-d '{"url": "https://www.youtube.com/watch?v=VIDEO_ID", "format": "audio"}'# Basic transcription
curl -X POST http://localhost:8082/transcribe \
-F "file=@audio.mp3"
# With specific model and language
curl -X POST http://localhost:8082/transcribe \
-F "file=@audio.mp3" \
-F "model=small" \
-F "language=ru"
# Translate to English
curl -X POST http://localhost:8082/transcribe \
-F "file=@audio.mp3" \
-F "translate=true"- LaBSE API: http://localhost:8080/docs (requires --profile full)
- YT-DLP API: See
docker/ytdlp/README.mdfor full API documentation - Whisper API: See
docker/whisper/README.mdfor full API documentation - Elasticsearch: http://localhost:9200 (requires --profile full)
- n8n Webhooks: Available through workflow triggers
All data is persisted in Docker volumes:
n8n_data- n8n workflows and settingsesdata- Elasticsearch indicesollama_data- Downloaded LLM modelslabse_cache- Cached embedding modelsytdlp_downloads- Downloaded videos and audio filesytdlp_cache- yt-dlp cachewhisper_cache- Whisper models cache
Create workflows that combine:
- File processing with LaBSE embeddings
- AI text generation with Ollama
- Document search with Elasticsearch
- Web scraping and data transformation
- Download YouTube videos with YT-DLP and transcribe with Whisper
- Audio transcription and text analysis with Ollama
- Add more Elasticsearch nodes for clustering
- Use external GPU for Ollama acceleration
- Deploy behind reverse proxy for production
Services not starting?
- Check Docker logs:
docker-compose logs [service-name] - Ensure ports are not in use
- Verify sufficient disk space and RAM
n8n workflows failing?
- Check service connectivity between containers
- Verify Elasticsearch is ready before running workflows
- Check webhook URLs and credentials
LaBSE model loading slowly?
- First request downloads ~1.8GB model
- Subsequent requests are fast
- Model is cached in volume
- n8n: admin / password
- Elasticsearch: No authentication
- Other services: No authentication (local development)
Feel free to:
- Add new workflows to the
workflows/directory - Improve service configurations
- Add new AI services or tools
- Submit issues and pull requests
This project is provided as-is for educational and development purposes.