Skip to main content

Deployment

Troubleshooting? See Troubleshooting for common issues and solutions. Interface Usage? See Interfaces for accessing Telegram, Web API, and CLI.

Quick Start

See Installation for all install methods (Homebrew, one-liner, Docker, manual). The interactive wizard (pnpm wizard) handles all configuration β€” API keys, interfaces, storage paths, and scheduler. It writes a chmod 0600 .env file and creates the required data directories.

Prerequisites

  • Node.js 20+, pnpm 9+
  • Docker and Docker Compose (for Docker deployments)
  • .env file β€” generated by pnpm wizard or manually from .env.example

Docker Compose

Services:
  • redis: Redis 7 for BullMQ job queue (required)
  • echos: The EchOS application (healthcheck: liveness heartbeat file, independent of ENABLE_WEB β€” see Troubleshooting)
Data is persisted via volume mounts to ./data/.

With nginx + Let’s Encrypt (HTTPS)

Certbot auto-renews every 12 hours.

Manual Deployment

Troubleshooting

Module Not Found Errors

If you see Cannot find package '@echos/shared' or '@echos/plugin-youtube' or similar:

LanceDB Native Module Errors

If you see Cannot find module '@lancedb/lancedb-darwin-x64' or similar:
  1. Intel Macs: The project uses LanceDB 0.22.3 (configured in packages/core/package.json)
  2. ARM Macs/Linux: LanceDB should install the correct native binding automatically
  3. Force reinstall: pnpm install --force

Telegram Bot Conflicts

Error: Conflict: terminated by other getUpdates request This means another instance of your bot is already running. Only one instance can poll Telegram. Solution:
For production: Use webhooks instead of polling to avoid conflicts.

VPS Deployment (Ubuntu/Debian)

One-liner install

Installs prerequisites, clones repo, and launches the setup wizard.

systemd service (production)

SSH / VPS CLI Access

The daemon runs via systemd or Docker as normal. When you SSH in, run queries directly against the live data without interrupting the daemon:
SQLite WAL mode allows concurrent reads (and occasional writes) alongside the running daemon. This is safe for single-user personal use.

Oracle Cloud Deployment

The deploy script:
  1. Syncs project files via rsync
  2. Installs dependencies on remote
  3. Builds the project
  4. Restarts via docker-compose

Important: Dev vs Production

Before starting locally, ensure your production deployment is stopped:
Only one instance can poll Telegram at a time. See Troubleshooting for details.

Backup

Environment Variables

See .env.example for the full list. Required:
  • TELEGRAM_BOT_TOKEN - Get from @BotFather on Telegram
  • ALLOWED_USER_IDS - Comma-separated Telegram user IDs (get from @userinfobot)
  • At least one LLM key:
    • ANTHROPIC_API_KEY - Anthropic pay-as-you-go key from https://console.anthropic.com/
    • LLM_API_KEY - API key for any other provider (Groq, Mistral, xAI, etc.)
  • DEFAULT_MODEL - Model spec: bare ID (claude-haiku-4-5-20251001), provider/model (groq/llama-3.3-70b-versatile), or any ID when using LLM_BASE_URL
Optional:
  • LLM_BASE_URL - Custom OpenAI-compatible endpoint (e.g. DeepInfra); requires LLM_API_KEY
  • OPENAI_API_KEY - Required for embeddings and Whisper transcription
  • WHISPER_LANGUAGE - ISO-639-1 code (e.g. en, fr, de) to pin Whisper transcription language. If unset, Whisper auto-detects. See Troubleshooting.
  • CACHE_RETENTION - Prompt cache TTL for Anthropic models: long (1h, default), short (5min), none (off). Always none for custom endpoints.
  • DISABLE_UPDATE_CHECK - Set to true to disable the daily update check. Useful for air-gapped environments with no internet access.
  • TELEGRAM_REACTIONS - Set to false to disable emoji reactions (πŸ‘€, πŸ€—) on incoming Telegram messages. Default: true.
Redis (required):
  • REDIS_URL - Redis connection URL (default: redis://localhost:6379)
See Scheduler for details.

Process Management

Development

Production

For production deployments, use a process manager: