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 provides Docker containers for both the REST API and MCP server, enabling:- Isolated deployments - Run th0th in containers
- Production ready - Optimized for production use
- Easy scaling - Multiple instances with Docker Compose
- MCP via Docker - Use with Claude Desktop, OpenCode, and other MCP clients
Docker Compose Setup
The recommended way to run th0th with Docker is using Docker Compose.Quick Start
Docker Compose Configuration
Thedocker-compose.yml defines two services:
docker-compose.yml
Service Details
API Service
- Runs on port 3333
- Persistent data in Docker volume
- Health checks enabled
- Connects to host Ollama instance
MCP Service
- Stdio interface for MCP
- Depends on API service
- Used with AI assistants
- Waits for API health check
Using MCP with Docker
To use th0th’s MCP server from a Docker container with AI assistants:OpenCode Configuration
~/.config/opencode/opencode.json
Ensure you run this command from the th0th project directory, or provide the full path to the docker-compose.yml file.
Claude Desktop Configuration
~/Library/Application\ Support/Claude/claude_desktop_config.json
Docker Commands
Service Management
- Start
- Stop
- Logs
- Restart
MCP Client Usage
Environment Variables
API Configuration
| Variable | Default | Description |
|---|---|---|
TH0TH_API_PORT | 3333 | Port for REST API |
NODE_ENV | production | Node environment |
Ollama Configuration
| Variable | Default | Description |
|---|---|---|
OLLAMA_BASE_URL | http://host.docker.internal:11434 | Ollama server URL |
OLLAMA_EMBEDDING_MODEL | nomic-embed-text:latest | Embedding model |
OLLAMA_EMBEDDING_DIMENSIONS | 768 | Embedding dimensions |
host.docker.internal allows the container to access Ollama running on the host machine.Optional: LLM Configuration
| Variable | Default | Description |
|---|---|---|
RLM_LLM_ENABLED | false | Enable LLM features |
RLM_LLM_API_KEY | - | LLM API key |
RLM_LLM_MODEL | - | LLM model name |
MISTRAL_API_KEY | - | Mistral API key for embeddings |
Data Persistence
Docker volumeth0th-data stores:
- Indexed project data
- Memory/recall storage
- Cache files
- SQLite databases
Production Deployment
Using Ollama in Docker
For a fully containerized setup, run Ollama in Docker:Using External Embedding Providers
For production, consider using cloud embedding providers:.env
Scaling
Run multiple API instances:docker-compose.yml
Troubleshooting
Container won't start
Container won't start
Check logs for errors:Common issues:
- Port 3333 already in use: Change
TH0TH_API_PORTin.env - Ollama not reachable: Verify
OLLAMA_BASE_URLis correct - Build errors: Run
docker compose build --no-cache
Can't connect to Ollama
Can't connect to Ollama
If using Ollama on the host:If this fails:
- On Linux, use
--network hostor configurehost.docker.internal - On Mac/Windows, ensure Docker Desktop is running
- Check Ollama is running:
ollama list
MCP client not working
MCP client not working
Test the MCP client directly:You should see JSON output with th0th tools. If not:
- Check API is healthy:
curl http://localhost:3333/health - Verify MCP service can reach API:
docker compose logs mcp - Ensure stdin is open: The
-iflag is required
Data lost after restart
Data lost after restart
Ensure you’re using Docker volumes, not bind mounts:Don’t use
docker compose down -v unless you want to delete data.High memory usage
High memory usage
Limit container resources:
docker-compose.yml
Health Checks
The API service includes built-in health checks:Next Steps
API Reference
Learn about REST API endpoints
Deployment
Production deployment guides
Monitoring
Monitor th0th in production
Configuration
Configure embedding providers