Docker Compose
Recommended The easiest way to deploy Alita. Includes PostgreSQL and Redis out of the box.
git clone https://github.com/divkix/Alita_Robot.gitcd Alita_Robotcp sample.env .env# Edit .env with your configurationdocker-compose up -dThis guide covers everything you need to deploy your own instance of Alita Robot.
Before you begin, ensure you have:
| Component | Minimum Version | Purpose |
|---|---|---|
| PostgreSQL | 14+ | Primary database |
| Redis | 6+ | Caching layer |
| Docker (recommended) | 20.10+ | Container deployment |
For building from source:
Docker Compose
Recommended The easiest way to deploy Alita. Includes PostgreSQL and Redis out of the box.
git clone https://github.com/divkix/Alita_Robot.gitcd Alita_Robotcp sample.env .env# Edit .env with your configurationdocker-compose up -dBinary Deployment
Download pre-built binaries for your platform:
Build from Source
Compile the bot yourself for development or customization:
git clone https://github.com/divkix/Alita_Robot.gitcd Alita_Robotgo build -o alita_robot .At minimum, you need these environment variables:
BOT_TOKEN=your_bot_token_from_botfatherOWNER_ID=your_telegram_user_idMESSAGE_DUMP=-100xxxxxxxxxx # Log channel IDDATABASE_URL=postgres://user:pass@host:5432/dbREDIS_ADDRESS=localhost:6379| Mode | Use Case | Setup Complexity |
|---|---|---|
| Webhook | Production | Requires HTTPS domain |
| Polling | Development | Simple, works anywhere |
Alita uses PostgreSQL with automatic migrations:
# Enable auto-migrationAUTO_MIGRATE=true
# Or run manuallymake psql-migrateBuilt-in observability endpoints:
GET /health - Health check with DB/Redis statusGET /metrics - Prometheus metrics