This project uses GitHub Actions for automatic builds and deployments. When you push to main, the pipeline:
- Runs tests
- Builds a Docker image and pushes it to GitHub Container Registry (GHCR)
- Deploys to your VDS server automatically
- GitHub repository forked from this project
- VDS server with SSH access
- Telegram API credentials
1. Configure GitHub Secrets:
In your GitHub repository, go to Settings > Secrets and add:
| Secret | Description |
|---|---|
SSH_HOST |
Your VDS server IP or hostname |
SSH_USER |
SSH username (e.g., root) |
SSH_PORT |
SSH port (default: 22) |
SSH_PRIVATE_KEY |
Private key for SSH authentication |
GHCR_PULL_TOKEN |
GitHub PAT with packages:read scope (optional, for private repos) |
GHCR_PULL_USER |
GitHub username for GHCR login (optional) |
2. Configure your .env file:
# Telegram API Credentials
API_ID=your_api_id
API_HASH=your_api_hash
# Domain Configuration
DOMAIN=your-domain.com
# Server Configuration
SERVER_MODE=http-auth
HOST=0.0.0.0
PORT=80003. Push to main:
git push origin mainThe deployment will start automatically. Watch the Actions tab in your GitHub repository for progress.
For manual deployment (without GitHub Actions), use the sync script:
# Configure .env with SSH connection details
export SSH_HOST=your.server.com
export SSH_USER=root
# Sync compose file and run deployment
./scripts/sync-remote-config.shFor local testing or development:
# Configure .env
cp .env.example .env
# Edit .env with your API credentials
# Build and start
docker compose up --build -d
# Check logs
docker compose logs -fAfter the server is running, authenticate via the web interface:
- Open
http://localhost:8000/setup(local) orhttps://your-domain.com/setup - Enter your phone number
- Enter the verification code from Telegram
- Download your
mcp.jsonconfiguration
Sessions are stored in a Docker named volume (telegram-sessions) and persist across deployments.
# Backup sessions
docker compose exec fast-mcp-telegram tar czf - -C /home/appuser/.config/fast-mcp-telegram . > sessions-backup.tar.gz
# Restore sessions
cat sessions-backup.tar.gz | docker compose exec -T fast-mcp-telegram tar xzf - -C /home/appuser/.config/fast-mcp-telegram| Variable | Description | Default |
|---|---|---|
API_ID |
Telegram API ID | Required |
API_HASH |
Telegram API hash | Required |
DOMAIN |
Public host for web setup and attachment URLs | your-domain.com |
SERVER_MODE |
Server mode (stdio, http-no-auth, http-auth) |
http-auth |
PORT |
Service port | 8000 |
GHCR_IMAGE |
Docker image to use | ghcr.io/{owner}/fast-mcp-telegram |
IMAGE_TAG |
Docker image tag | main |
# Check container status
docker compose ps
# Test health endpoint
curl http://localhost:8000/health
# View logs
docker compose logs fast-mcp-telegramDeployment fails:
- Verify GitHub secrets are configured correctly
- Check Actions tab for error details
- Ensure SSH key is authorized on VDS server
Container won't start:
- Verify
.envhas required variables - Check logs:
docker compose logs fast-mcp-telegram - Ensure
traefik-publicnetwork exists:docker network ls
Authentication issues:
- Clear browser cache and try again
- Use the
/setupendpoint to re-authenticate - Check server logs for verification code issues