Skip to content

Self-Hosting Overview

This guide covers everything you need to deploy your own instance of Alita Robot.

Before you begin, ensure you have:

ComponentMinimum VersionPurpose
PostgreSQL14+Primary database
Redis6+Caching layer
Docker (recommended)20.10+Container deployment

For building from source:

  • Go 1.25+

The easiest way to deploy Alita. Includes PostgreSQL and Redis.

Terminal window
git clone https://github.com/divkix/Alita_Robot.git
cd Alita_Robot
cp sample.env .env
# Edit .env with your configuration
docker-compose up -d

Full Docker Guide →

Download pre-built binaries for your platform:

  • Linux (amd64, arm64)
  • macOS (amd64, arm64)
  • Windows (amd64)

Binary Installation →

Compile the bot yourself:

Terminal window
git clone https://github.com/divkix/Alita_Robot.git
cd Alita_Robot
go build -o alita_robot .

Building from Source →

At minimum, you need these environment variables:

Terminal window
BOT_TOKEN=your_bot_token_from_botfather
OWNER_ID=your_telegram_user_id
MESSAGE_DUMP=-100xxxxxxxxxx # Log channel ID
DATABASE_URL=postgres://user:pass@host:5432/db
REDIS_ADDRESS=localhost:6379

Full Environment Reference →

ModeUse CaseSetup Complexity
WebhookProductionRequires HTTPS domain
PollingDevelopmentSimple, works anywhere

Webhook Setup →

Alita uses PostgreSQL with automatic migrations:

Terminal window
# Enable auto-migration
AUTO_MIGRATE=true
# Or run manually
make psql-migrate

Database Guide →

Built-in observability endpoints:

  • GET /health - Health check with DB/Redis status
  • GET /metrics - Prometheus metrics

Monitoring Guide →

  1. Docker Deployment - Quick start with containers
  2. Environment Variables - Full configuration reference
  3. Troubleshooting - Common issues and solutions