Operations
Commands
make run # start stack in foreground (validates file paths, rebuilds litellm config)
make run-bg # start stack in background (validates file paths, rebuilds litellm config)
make down # stop everything
make restart # full restart
make logs # follow logs
make build-config # regenerate litellm/config.yaml from fragments (runs automatically on make run)
make limits # check enabled services against this machine's RAM and cores, write CPU caps to .env.limits
make test # run test suite (stack must be running)
Logs
Every service uses Docker's json-file driver with five 10 MB rotated files,
limiting retained container logs to roughly 50 MB per service. Existing
containers adopt the cap when they are recreated.
make logs # follow all logs
docker compose logs litellm -f # follow one service
docker compose logs --since 5m # last 5 minutes
LiteLLM logs every request with the model name, provider, latency, and token usage. When a fallback triggers, you'll see the failed provider and which one took over. The resource manager logs every hardware lock acquire/release and every competing-group unload. Search for [resource_manager] in the logs.
Per-service debug options:
| Variable | Default | What it does |
|---|---|---|
IMAGIES_VERBOSE / IMAGIES_CUDA_VERBOSE | false | Imagies debug logging |
IMAGIES_LOG_LEVEL / IMAGIES_CUDA_LOG_LEVEL | info | Imagies log level |
LIBRECHAT_DEBUG_LOGGING | true | LibreChat verbose logging |
PREDICTALOT_LOG_LEVEL | INFO | predictalot log level (DEBUG for model-load + per-request diagnostics) |
DECIDEALOT_LOG_LEVEL | INFO | decidealot log level (DEBUG, INFO, WARNING, ERROR) |
TELETHON_LOG_LEVEL | INFO | Telethon Plus log level |
Ollama and talkies log to stdout by default, visible in docker compose logs. Set mailbox verbosity in the YAML config (MAILBOX_CONFIG).
Troubleshooting
GPU out of memory. The resource manager should prevent this. If it happens, check docker compose logs litellm | grep resource_manager to verify the hardware lock is working. Make sure you're not bypassing LiteLLM by hitting services directly. Run make limits to regenerate memory limits.
Model download stuck, Ollama pulls models in the background on first start. Large models (8B+) can take a while. Check progress with docker compose logs ollama -f. Imagies models download via imagies-pull. Check docker compose logs imagies-pull -f. If a download fails, delete the partial file from .data/ and restart.
"Connection refused" or "Bad Gateway". The service isn't ready yet. Check docker compose ps for unhealthy containers. Check logs for the specific service. Common cause: a dependent service (PostgreSQL, Redis) hasn't started yet, Docker healthchecks handle this, but on slow machines the start period may not be enough.
Slow local inference. Expected if the resource manager just swapped models. The first request after a swap includes model load time (seconds for Ollama, longer for larger Imagies models). Subsequent requests are fast until the idle timeout unloads the model. Increase idle timeouts to keep models warm longer.
Rate limited on every provider. All free tiers have hard caps. Quick reference: Groq 30 RPM + 1K-14.4K RPD per model, Cerebras no free tier, paid plan required, OpenRouter 20 RPM on :free + 50 RPD ($0) or 1K RPD ($10+ credits), Mistral free "Experiment" tier (exact numbers not published. Check your dashboard), Cohere 20 RPM chat with a 1K calls/month total cap, HuggingFace $0.10/mo credits (eval only). Full table with official limit pages: free-tier reality check. If you're hitting all of them at once, the fallback chain lands on subscription (claudebox), then pay-per-token (Anthropic/OpenAI), then local. Check docker compose logs litellm | grep fallback to see the chain in action. Consider enabling more free providers, or going local (OLLAMA=1 / OLLAMA_CUDA=1) for unlimited.
predictalot first request is slow / times out. The five forecasters lazy-load on first call. Each downloads ~50-800MB of HuggingFace snapshots into .data/predictalot/models/ and warms up before responding. TIMEOUT_PREDICTALOT defaults to 600s for exactly this reason. Subsequent calls are fast until PREDICTALOT_MODEL_IDLE_TIMEOUT (default 30m) unloads them. Use PREDICTALOT_PREFETCH / PREDICTALOT_PRELOAD (see .env.example) to download or load models at startup instead of on first request.
decidealot stays health: starting / crash-loops on /models: the first start downloads the enabled bundles before /health passes, so a few minutes of starting is normal and the health check allows 15 minutes. Laya, Von, and CLM are enabled by default. make run-bg starts CLM's CUDA Qwen3-8B encoder; set DECIDEALOT_CLM_ENABLED=false when no NVIDIA GPU is available. A crash that mentions /models usually means the models directory is not writable by the container user. The image runs as DECIDEALOT_UID/DECIDEALOT_GID (default 1000) on a read-only root filesystem, so ${DATA_DIR_DECIDEALOT}/models must be owned by that UID. Set the two variables to the directory's owner, or correct ownership of that specific models directory.
mailbox refuses to start / MAILBOX_CONFIG errors. The stack's pre-flight check requires MAILBOX_CONFIG to point at an existing YAML file on the host (make run aborts with a clear error otherwise. See _FILE_VARS in the Makefile). Copy mailbox/config.example.yaml to a gitignored host path (recommended: .data/mailbox/config.yaml), fill in your IMAP/SMTP creds, put at least one token in auth.tokens:, and mirror it as MAILBOX_AUTH_TOKEN in .env.
Telethon "unauthorized" / no profile returned, Telethon needs all three of TELETHON_API_ID, TELETHON_API_HASH, TELETHON_SESSION set in .env. Generate the string session once via docker run -it --rm -e TELETHON_API_ID=... -e TELETHON_API_HASH=... psyb0t/telethon-plus:latest login, see Telethon setup. Without a session, the container starts but the API returns auth errors.
Tests failing. Make sure the stack is running (make run-bg) and healthy (docker compose ps). Tests require the services they're testing to be enabled, OLLAMA_CUDA=1 for Ollama CUDA tests, IMAGIES_CUDA=1 for Imagies CUDA tests, PREDICTALOT=1 / PREDICTALOT_CUDA=1 for forecasting tests, DECIDEALOT=1 / DECIDEALOT_CUDA=1 for decision tests, MAILBOX=1 for mailbox tests, TELETHON=1 for Telegram tests. The mailbox e2e send→recv→delete is additionally gated on MAILBOX_TEST_MAILBOX_NAME + MAILBOX_TEST_ADDRESS so it only fires when you've wired a real test mailbox. Run bash test.sh --help to see which tests are available and their requirements.