Documentation Index
Fetch the complete documentation index at: https://mintlify.com/S1LV4/th0th/llms.txt
Use this file to discover all available pages before exploring further.
Overview
th0th can be deployed in multiple ways depending on your infrastructure needs. The system is designed for local-first operation with zero external dependencies when using Ollama for embeddings.Quick Start with Docker
The recommended deployment method uses Docker Compose for both the API and MCP services.Set up environment variables
Create a
.env file in the project root:The default configuration uses Ollama running on your host machine. Docker containers access it via
host.docker.internal:11434.Docker Compose Services
Thedocker-compose.yml defines two services:
API Service
- Exposes port 3333 (configurable via
TH0TH_API_PORT) - Persistent data stored in Docker volume
th0th-data - Automatic health checks every 30 seconds
- Restarts automatically unless manually stopped
MCP Service
- Stdio transport for MCP protocol
- Depends on healthy API service
- Connects to API via Docker internal network
Deployment from Source
For development or custom deployments:Install dependencies
th0th uses Bun as its runtime. Install from bun.sh if needed.
Run the setup script
- Install/start Ollama if needed
- Pull the embedding model (
bge-m3by default) - Create
~/.config/th0th/config.json - Create a
.envfile with defaults
Environment Variables Reference
Core Configuration
| Variable | Default | Description |
|---|---|---|
TH0TH_API_PORT | 3333 | API server port |
NODE_ENV | production | Runtime environment |
LOG_LEVEL | info | Logging verbosity |
ENABLE_METRICS | false | Enable metrics collection |
Embedding Providers
Database Paths
| Variable | Default | Description |
|---|---|---|
VECTOR_DB_PATH | ./data/chroma | Vector database location |
CACHE_DB_PATH | ./data/cache.db | Cache database |
KEYWORD_DB_PATH | ./data/keyword.db | Keyword search index |
EMBEDDING_CACHE_DB_PATH | ./data/embedding-cache.db | Embedding cache |
Cache Configuration
| Variable | Default | Description |
|---|---|---|
L1_CACHE_MAX_SIZE | 104857600 | L1 cache max size (100MB) |
L1_CACHE_TTL | 300 | L1 TTL in seconds (5 min) |
L2_CACHE_MAX_SIZE | 524288000 | L2 cache max size (500MB) |
L2_CACHE_TTL | 3600 | L2 TTL in seconds (1 hour) |
Production Considerations
Resource Requirements
Minimum Requirements
- CPU: 2 cores
- Memory: 4GB RAM (8GB recommended with Ollama)
- Storage: 10GB for databases and models
- Network: Port 3333 accessible
Data Persistence
Inspect the volume location:Scaling Considerations
- Ollama Server: For high-load deployments, run Ollama on a dedicated machine with GPU support
- API Instances: The API is stateless and can be load-balanced across multiple instances
- Data Volume: Use network-attached storage (NFS, EBS) for shared data access
Security
The current version does not include built-in authentication. Deploy behind a reverse proxy (nginx, Traefik) with authentication for production use.
Container Management
View Logs
Restart Services
Update to Latest Version
Clean Up
Next Steps
Monitoring
Set up health checks and monitoring
Troubleshooting
Common issues and solutions