setup
CopperX Payout Bot Setup Guide
Prerequisites
Installation Steps
1. Clone the Repository
2. Install Dependencies
3. Configure Environment Variables
.env
file in the root directory with the following variables:# Bot Configuration
BOT_TOKEN=your_telegram_bot_token
BOT_USER=https://t.me/your_bot_username
# CopperX API
COPPERX_API_KEY=your_copperx_api_key
COPPERX_API_URL=https://income-api.copperx.io
# Redis Database
REDIS_DATABASE_URL=your_redis_connection_string
# Server Settings
SERVER_URL=https://your-server-url.com
PORT=3000
NODE_ENV=development
# Pusher Settings (for real-time notifications)
PUSHER_KEY=your_pusher_key
PUSHER_CLUSTER=your_pusher_cluster
4. Set Up Redis Database
1.
2.
3.
.env
file1.
2.
REDIS_DATABASE_URL=redis://localhost:6379
5. Build the Project
6. Start the Server
Webhook Configuration
Using ngrok for Local Development
1.
npm install -g ngrok
2.
npm run dev
3.
ngrok http 3000
4.
5.
SERVER_URL
in your .env
file6.
For Production Servers
1.
2.
SERVER_URL
in your .env
file to this endpoint3.
npm run setup
to configure the webhookVerifying the Setup
1.
2.
/start
to the bot3.
Troubleshooting Setup Issues
SERVER_URL
is publicly accessible and using HTTPSModified at 2025-03-23 17:03:35