How to Install and Run the Prime Spot DCA Trading Bot on Amazon EC2

I. Launch EC2 Instance

  1. Log in to AWS Management Console
  2. Go to EC2 → Launch Instance
  3. Choose:
    • AMI: Ubuntu Server 22.04 LTS (Free Tier eligible)
    • Instance type: t2.micro (Free Tier)
    • Region/Zone: (choose as desired)
  4. Configure:
    • Key pair: create or use an existing key pair for SSH access.
    • Security group: add inbound rules:
      • SSH (TCP 22) from your IP.
      • Custom TCP (8765) from Anywhere (0.0.0.0/0) for client access
  5. Launch the instance.

II. Connect to Server

ssh -i your-key.pem ubuntu@your-ec2-public-ip

III. Update System

sudo apt update && sudo apt upgrade -y

IV. Deploy Your Bot

  1. Transfer your compiled file to the server, for example:
    scp -i your-key.pem server.bin license.enc ubuntu@your-ec2-public-ip:/home/ubuntu/
  2. Make the binary executable:
    chmod +x /home/ubuntu/server.bin

V. Create systemd Service

Create the service file:

sudo nano /etc/systemd/system/trading_bot.service

Paste the following:

[Unit]
Description=Binance Trading Bot
After=network.target

[Service]
User=ubuntu
WorkingDirectory=/home/ubuntu
ExecStart=/home/ubuntu/server.bin
Restart=always
RestartSec=10
StandardOutput=append:/home/ubuntu/trading_bot.log

[Install]
WantedBy=multi-user.target

💡 Looking for an easier way?

If you don’t want to go through the full manual EC2 setup, you can use our Prime Spot DCA Trading Bot – Quick Start GUI guide.

With Quick Start GUI, the system will automatically create and configure your Amazon EC2 server for you. This option is perfect for beginners or anyone who wants to get started within minutes.

VI. Enable and Start the Service

sudo systemctl daemon-reload
sudo systemctl enable trading_bot.service
sudo systemctl start trading_bot.service
sudo systemctl status trading_bot.service

VII. Configure Firewall (UFW)

sudo ufw allow 22/tcp
sudo ufw allow 8765/tcp
sudo ufw enable

VIII. Test

Notes: