ai-launchkit
CLAUDE.md117 starsChanged 16 months agoApache-2.0View on GitHub
This file provides guidance to Claude (claude.ai) and other AI assistants when working with code in this repository. This is AI LaunchKit: a comprehensive Docker Compose-based toolkit that creates a complete self-hosted AI development and automation environment. It transforms any Ubuntu server into a powerful AI development platform with 20+ pre-configured services that can be selectively deployed with a single command.
- Reads credentials
In this repository2 other files it gives its agents.
- .cursor/rules/isolation_rules/main.mdcCursor rule
- .cursor/rules/isolation_rules/main-optimized.mdcCursor rule
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
25 rules. About 0 are common, 15 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 78
Environment: All configuration through .env file generated during installation
- Distinctive: line 80
Networks: All services on default Docker network with internal service discovery
- Distinctive: line 107
Use this path in n8n workflows and AI tools to share files
- Very specific: line 134
Update COMPOSE_PROFILES in .env
- Very specific: line 136
Check docker compose ps to verify services started
- Distinctive: line 140
Add hostname variables to Caddy environment section
- Very specific: line 141
Update 04_wizard.sh to include in service selection
- Distinctive: line 142
Add Caddyfile routing if service needs web access
- Distinctive: line 143
Consider GPU requirements and volume mounts
- Distinctive: line 144
Document API endpoints and integration points
- Very specific: line 156
All data in Docker volumes: docker run --rm -v [volume]:/data -v $(pwd):/backup busybox tar czf /backup/[name].tar.gz -C /data .
- Very specific: line 159
Check service logs: docker compose logs [service-name] -f
- Very specific: line 160
Verify GPU access (if applicable): docker exec [container] nvidia-smi
- Distinctive: line 162
Check model loading: Service-specific logs
- Distinctive: line 167
All services require authentication (configured during setup)
- Distinctive: line 200
PaddleOCR: Document OCR processing
- Distinctive: line 204
Never modify the installation script sequence (01-06) without understanding dependencies
- Very specific: line 205
Always use logging functions from utils.sh in new scripts
- Very specific: line 209
When modifying docker-compose.yml, maintain the x-templates pattern
- Distinctive: line 213
Test AI integrations with small workloads before scaling
- Distinctive: line 217
When contributing new AI services or features:
- Very specific: line 218
Follow existing patterns in docker-compose.yml
- Distinctive: line 219
Add comprehensive health checks
- Distinctive: line 222
Test with minimal and full installations
- Distinctive: line 223
Update this CLAUDE.md file with relevant information
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude (claude.ai) and other AI assistants when working with code in this repository.
Project Overview
This is AI LaunchKit: a comprehensive Docker Compose-based toolkit that creates a complete self-hosted AI development and automation environment. It transforms any Ubuntu server into a powerful AI development platform with 20+ pre-configured services that can be selectively deployed with a single command.
Core Features
- AI Development Tools: bolt.diy, OpenHands, OpenUI, ComfyUI, Dify
- Automation Platform: n8n with 300+ pre-configured workflows, Flowise
- LLM Infrastructure: Ollama, Open WebUI, Letta
- Vector Databases: Qdrant, Supabase (with pgvector)
- Monitoring & Observability: Langfuse, Grafana, Prometheus
- Media Processing: ComfyUI (Stable Diffusion), Speech Stack (Whisper STT, OpenedAI TTS)
- Development Tools: SearXNG, Crawl4ai, browserless (planned), LiveKit (planned)
Essential Commands
Installation and Updates
# Main installation (from project root)
sudo bash ./scripts/install.sh
# Update all services to latest versions
sudo bash ./scripts/update.sh
# Clean up unused Docker resources
sudo bash ./scripts/cleanup.shDocker Operations
# View running services
docker compose ps
# View logs for specific service
docker compose logs [service-name]
# Restart services with specific profiles
docker compose --profile n8n --profile ai-dev up -d
# Stop all services
docker compose downPython Helper Script
# Start services with automatic profile detection
python3 start_services.pyService Management
# Apply configuration updates to running services
sudo bash ./scripts/apply_update.sh
# View all available Docker Compose profiles
grep -E '^\s*profiles:' docker-compose.yml
# Check service health status
docker compose ps --format "table {{.Name}}\t{{.Status}}\t{{.Ports}}"Architecture
Core Installation Flow
The installation follows a strict 6-step sequence managed by scripts/install.sh:
- 01_system_preparation.sh - Updates system, installs dependencies, configures security
- 02_install_docker.sh - Installs Docker Engine and Docker Compose
- 03_generate_secrets.sh - Creates .env file with secure passwords and keys
- 04_wizard.sh - Interactive service selection with whiptail UI (20+ services)
- 05_run_services.sh - Deploys selected services using Docker Compose profiles
- 06_final_report.sh - Displays access URLs and credentials
Docker Compose Architecture
- Profiles: Services organized into logical groups (n8n, ai-dev, monitoring, langfuse, ollama, speech, etc.)
- Environment: All configuration through
.envfile generated during installation - Volumes: Named volumes for data persistence across container rebuilds
- Networks: All services on default Docker network with internal service discovery
Key Service Dependencies
- n8n: Requires postgres, redis. Runs in queue mode with configurable worker count
- Supabase: Full stack with postgres, auth, storage, analytics, edge functions
- Langfuse: Requires postgres, redis, clickhouse, minio for LLM observability
- Open WebUI: Integrates with Ollama for local LLMs
- ComfyUI: Requires models downloaded separately (FLUX, SDXL, etc.)
- bolt.diy: Standalone AI-powered full-stack development platform
- OpenHands: AI software engineer with web interface
Important Implementation Details
Environment Variable System
- Generated by
03_generate_secrets.shusingopenssl rand -hex - Contains service hostnames, passwords, API keys
- Used by both Docker Compose and Caddy for routing
- AI-specific keys: OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.
Service Selection Wizard
04_wizard.shuses whiptail to create interactive checklist- Updates
COMPOSE_PROFILESin.envbased on selections - Service dependencies automatically handled
- Grouped by category: AI Development, Automation, Databases, Monitoring
Shared File Access
./shared/directory is mounted to/data/sharedin containers- Use this path in n8n workflows and AI tools to share files
- Persistent storage for generated content (images, documents, models)
AI Service Configuration
- ComfyUI: Models stored in
/var/lib/docker/volumes/localai_comfyui_data/_data/models/ - Ollama: Models persist in
ollama_datavolume - Speech Stack: Uses ports 8001 (Whisper) and 5001 (TTS)
- Vector DBs: Qdrant on port 6333, Supabase includes pgvector
Custom n8n Configuration
- Pre-installs Node.js libraries: cheerio, axios, moment, lodash
- Runs in production mode with PostgreSQL backend
- Queue mode for parallel workflow processing
- Community packages and AI runners enabled
- Configured for tool usage and external function calls
- Metrics enabled for Prometheus monitoring
Network Architecture
- Caddy handles HTTPS/TLS termination and reverse proxy
- Services exposed via subdomains: n8n.domain.com, comfyui.domain.com, etc.
- Internal services (redis, postgres) not exposed externally
- Supports Cloudflare Tunnel as alternative to port exposure
- sslip.io domains work without DNS configuration
Common Development Tasks
Testing Profile Changes
- Update
COMPOSE_PROFILESin.env - Run
docker compose --profile [profiles] up -d - Check
docker compose psto verify services started
Adding New AI Services
- Define service in
docker-compose.ymlwith appropriate profile - Add hostname variables to Caddy environment section
- Update
04_wizard.shto include in service selection - Add Caddyfile routing if service needs web access
- Consider GPU requirements and volume mounts
- Document API endpoints and integration points
Working with AI Models
- ComfyUI models: Download to model directories before use
- Ollama models: Pull with
docker exec ollama ollama pull [model] - Embeddings: Configure in n8n AI nodes or Flowise chains
- Vector stores: Initialize indexes in Qdrant or Supabase
Backup/Restore
- n8n workflows:
./n8n/backup/workflows/ - ComfyUI workflows: Export from UI
- Vector databases: Use respective backup tools
- All data in Docker volumes:
docker run --rm -v [volume]:/data -v $(pwd):/backup busybox tar czf /backup/[name].tar.gz -C /data .
Troubleshooting AI Services
- Check service logs:
docker compose logs [service-name] -f - Verify GPU access (if applicable):
docker exec [container] nvidia-smi - Monitor resource usage:
docker stats - Check model loading: Service-specific logs
- API connectivity: Test with curl or service UI
Security Considerations
- All services require authentication (configured during setup)
- Firewall configured to only allow SSH, HTTP, HTTPS
- Fail2Ban enabled for brute-force protection
- SSL certificates managed by Caddy with Let's Encrypt
- API keys stored in
.envfile (never commit to git) - Services isolated in Docker network namespaces
- Regular security updates via
update.sh
File Structure Notes
memory-bank/- Project documentation and development notesflowise/- Flowise workflow templates and custom toolsn8n/- n8n configurations and community workflowscomfyui/- ComfyUI custom nodes and workflows (if added)scripts/- Installation and utility scripts (all bash)shared/- Shared directory accessible by all containersopenedai-config/- TTS voice configurationsopenedai-voices/- Custom TTS voice models
AI LaunchKit Specific Features
Speech Stack Integration
- Whisper (STT): OpenAI-compatible API on port 8001
- OpenedAI (TTS): Multiple voices, OpenAI-compatible API on port 5001
- Both services integrate seamlessly with n8n HTTP nodes
Development Platforms
- bolt.diy: Full-stack development with AI assistance
- OpenHands: Autonomous coding agent with web interface
- OpenUI: AI-powered UI component generator
Planned Additions
- LiveKit: Real-time communication and AI agents
- browserless: Headless Chrome for web automation
- PaddleOCR: Document OCR processing
Critical Implementation Notes
- Never modify the installation script sequence (01-06) without understanding dependencies
- Always use logging functions from
utils.shin new scripts - The
.envfile contains all secrets and must never be committed - Services use Docker health checks - respect dependency conditions
- Profile-based deployment allows selective service activation
- When modifying
docker-compose.yml, maintain the x-templates pattern - AI services may require significant resources (RAM, disk, GPU)
- Community workflows are imported during installation (20-30 minutes)
- Model downloads for ComfyUI/Ollama happen post-installation
- Test AI integrations with small workloads before scaling
Contributing Guidelines
When contributing new AI services or features:
- Follow existing patterns in docker-compose.yml
- Add comprehensive health checks
- Document resource requirements
- Include example workflows or usage
- Test with minimal and full installations
- Update this CLAUDE.md file with relevant information
Useful Resources
- Repository: https://github.com/freddy-schuetz/ai-launchkit
- Based on: n8n-installer by @kossakovsky
- License: Apache 2.0 (commercial use allowed)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

