General Installation Guide – Prime Spot DCA Trading Bot

I. Installation Overview

Follow these main steps to prepare and run the Prime Spot DCA Trading Bot successfully:

  1. Prepare your Linux server
    Use a Linux VPS or dedicated server (Ubuntu 20.04+ recommended) and check its public IP address.

  2. Open the communication port
    Allow port 8765/tcp for WebSocket communication between the client and the server.

  3. Upload and run the server bot
    Upload the server.bin file (from the trading-bot folder) to your server and start it using:
    ./trading-bot/server.bin
  4. Set up auto-start (recommended)
    Configure the bot to start automatically whenever the system reboots, ensuring 24/7 operation.

  5. Configure the Windows Client
    Open the GUI, enter the server’s public IP, upload your license.enc, input your Binance API key and secret, and start the bot.

  6. (Optional) Quick setup on AWS EC2
    Use the built-in auto setup from the GUI for faster deployment if you prefer AWS.

II. Detailed Installation Instructions

Depending on your setup, choose one of the following guides:

1️⃣ Manual Setup on Any Linux Server

For users who want to install manually on a regular VPS or dedicated server, follow:

Linux Installation Guide →

This covers:

2️⃣ Quick Setup for AWS EC2 (via GUI)

If you’re using AWS EC2 and prefer automatic setup through the Windows app, see:

Quickstart EC2 Setup Guide →

This explains how to:

3️⃣ Windows Server Setup

If you prefer to run the server bot on a Windows Server (e.g., Windows Server 2019 or 2022), follow this dedicated guide. This option is ideal for users familiar with Windows environments or without access to Linux VPS

Prerequisites

Step-by-Step Installation

  1. Copy server.exe to Windows Server
    • Use Remote Desktop (RDP) to connect to your Windows Server
    • Create a dedicated folder for the bot, e.g., C:\Trading_Bot\
    • Copy server.exe (or all files in folder-based) into this folder (via file transfer in RDP or PowerShell Copy-Item)

  2. Open Port 8765 in Windows Firewall
    • Open Windows Defender Firewall with Advanced Security (search for it in the Start menu).
    • Click Inbound Rules > New Rule.
    • Select Port > Next.
    • Choose TCP and Specific local ports: 8765 > Next.
    • Select Allow the connection > Next.
    • Check Domain, Private, and Public (or adjust based on your network) > Next.
    • Name the rule "Prime Bot WebSocket Port 8765" > Finish.
    • Verify: Run netstat -an | findstr 8765 in PowerShell to check if the port is listening once the bot starts.
  3. Create a Windows Service for Auto-Start
    To ensure the bot runs automatically on server boot and restarts if it crashes, create a Windows Service. Choose one of the methods below.

    Method 1: Create Task Schedule (Easiest and Most Popular – Recommended)
    • Open CMD with Administrator permission
    • Run: schtasks /create /tn "PTBot" /tr "C:\Trading_Bot\server.exe" /sc onstart /ru SYSTEM /rl HIGHEST /f
    • Verify: tasklist | find "server.exe"

    Method 2: Using NSSM
    • Download NSSM: Go to nssm.cc/download and download the latest ZIP (e.g., nssm-2.24.zip). Extract nssm.exe (64-bit version) to C:\Windows\System32 (or your bot folder).
    • Install the Service:
      • Open Command Prompt or PowerShell as Administrator.
      • Run: nssm install TradingBotService
      • In the NSSM GUI:
        • Path: C:\PrimeBot\server.exe (full path to your exe).
        • Startup directory: C:\PrimeBot\.
        • Arguments: (leave blank unless you need command-line args, e.g., --config config.json).
        • Service name: TradingBotService.
      • Go to Details tab: Set Display name to "Prime Spot DCA Trading Bot Service".
      • Go to Log on tab: Select "Local System account" for simplicity (or specify a user if needed).
      • Click Install service.
    • Start and Enable:
      • Run: nssm start TradingBotService
      • Enable auto-start: nssm set TradingBotService Start SERVICE_AUTO_START
    • Verify: Open Services (search in Start menu), find "Prime Spot DCA Trading Bot Service", ensure it's "Running" and "Automatic".

    Method 3: Create Service Manually with PowerShell (No Extra Tools)
    • Open PowerShell as Administrator.
    • Run the following script (replace paths as needed):
    # Create the service
    New-Service -Name "TradingBotService" -BinaryPathName "C:\Trading_Bot\server.exe" -DisplayName "Prime Spot DCA Trading Bot Service" -Description "Runs the Prime Spot DCA Trading Bot" -StartupType Automatic
    
    # Start the service
    Start-Service -Name "TradingBotService"
    
    # Verify
    Get-Service -Name "TradingBotService"

III. Notes & Recommendations

💡 Note: Some steps — like opening ports or creating a systemd service — are simple if you follow the provided instructions.
However, if you are not comfortable working with Linux or encounter difficulties, please contact our support team for help.