Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Installation on Linux

This page covers installing the MoonTrader core on a Linux cloud server. The core runs on the server around the clock, and the client on your computer connects to it over the network. The example uses AWS EC2 with Ubuntu 24.04; the terminal steps work on any VPS with Ubuntu 20.04 or later.

Before you start, prepare:

Creating a server (AWS EC2)

  1. Open the AWS console, go to "EC2", and click "Launch instance".

  2. In the "Name" field, enter a server name.

  3. In "Application and OS Images", select "Ubuntu" and the "Ubuntu Server 24.04 LTS" image.

  4. In the "Architecture" list, select the architecture. It determines which core build you download:

    • "64-bit (Arm)": the "Linux (arm64)" build;

    • "64-bit (x86)": the "Linux (x64)" build.

  5. In the "Instance type" list, select the server type. The example uses t4g.small (Arm, 2 vCPU, 2 GiB).

  6. In "Key pair (login)", select your key or click "Create new key pair".

    ⚠️ Save the .pem key file. Without it, you cannot connect over SSH from your computer.

  7. In "Network settings", select a security group. Its inbound rules must open these ports:

    • 22/TCP: SSH connection to the server;

    • 4242/UDP: client connection to the core.

  8. Review the "Summary" block and click "Launch instance".

  9. Open the server page and copy the "Public IPv4 address". You will need it to connect the client and for the Binance IP whitelist.

Connecting to the server

Connect in one of two ways:

  • In the browser. On the server page, click "Connect", select "EC2 Instance Connect", user ubuntu, and click "Connect".

  • From your computer. Open the "SSH client" tab and run the command shown there:

In the EC2 Instance Connect browser terminal, paste with Ctrl+Shift+V. If pasting does not work, allow the site to access the clipboard: icon left of the address bar → "Site settings" → "Clipboard" → "Allow", then reload the page.

Installing the core

  1. Install the required packages:

  2. Download the core for your server architecture. For "64-bit (Arm)":

    For "64-bit (x86)":

    Current links are in your account, in the "Download" section.

  3. Extract the archive to your home folder:

    The folder now contains the MTCore file and the BotClient folder.

First launch and setup wizard

The core runs inside a screen session, so it keeps running after you close the terminal.

  1. Create a session and start the core:

    If you extracted the archive to a different folder, go to it first: cd <folder>. If you get a Permission denied error on launch, run chmod +x MTCore and start the core again.

  2. The profile setup wizard starts. Enter a "Profile name": up to 64 characters, allowed a-z, 0-9, -, and _.

  3. Paste the "Activation Code" from your account. It is a long string, not the license number in the 15-xxx-xxx-xxx format. The wizard shows "Activation Code accepted" with the license number and exchange.

  4. At the "Client Token" prompt, press Enter: the wizard generates a new token. If you already have a token, paste it.

    ⚠️ Save the Client Token shown. You need it to connect the client to this core.

  5. Press any key to continue.

  6. In "Core Network configuration", press Enter twice to keep the defaults: address * and port 4242.

  7. Press any key. The wizard warns that changing the Binance API keys for the license resets its current data.

  8. Choose the Binance key type:

    For a "System generated" key, enter 1.

  9. The wizard lists the required key permissions:

    • must be enabled: "Enable Reading", "Enable Spot & Margin Trading", "Enable Futures", "Permits Universal Transfer";

    • must be disabled: "Enable Withdrawals";

    • recommended: "IP Restriction".

  10. Paste the "Public API key" and the "Secret API key". The wizard checks the key permissions.

  11. If permissions are missing, the wizard shows the permission list and offers options:

    • 1: fix the permissions on Binance and check again;

    • 2: enter different keys;

    • 3: continue without the required permissions (not recommended);

    • 4: quit.

  12. The wizard activates the license and shows "License activated successfully!".

  13. At the "Watchdog Token" prompt, press Enter: the wizard generates a token for the Watchdog service. If you already have a token, paste it.

    ⚠️ Save the Watchdog Token shown. You need it to set up Watchdog: Watchdog: monitoring trading cores.

  14. Press any key. The wizard saves the profile and makes it the default profile.

  15. After "Configuration wizard completed successfully!", press any key. The core starts and loads Binance markets.

  16. Detach from the session without stopping the core: press Ctrl+A, then D.

Useful commands:

Command
What it does

screen -ls

lists running sessions

pgrep -a MTCore

checks that the core is running

screen -r mtcore

returns to the core session

Connecting the client to the core

The client needs the Client Token the wizard showed in step 4. If you did not save it, you can get it on the server: it is stored in the profile's client.auth file, base64-encoded.

  1. If you do not have the token, print it on the server. Replace <profile> with the profile name from the wizard:

    The command prints a 64-character string of 0-9 and a-f. Copy it.

  2. On your computer, launch MoonTrader and click "Add profile".

  3. Fill in the fields:

    • "Profile name": the profile name;

    • "Launch Mode": "Run Client Only";

    • "Exchange": "Binance";

    • "Client Token": the token from the wizard or from step 1;

    • "Address (IP)": the server Public IPv4;

    • "Port": 4242.

  4. Click "Add".

  5. Hover over the profile row and click "Start".

  6. Check the connection: the MoonTrader window title shows the core address, for example 3.112.213.120:4242.

Binance IP whitelist

Add the server Public IPv4 to the API key's trusted IP list. The core sends the trading requests, so add the server IP, not the IP of the computer running the client. How to do it: Getting Binance API keys.

Still have questions? Contact support!

Last updated