---
id: document_item.vps-setup
page_type: documentation_article
title: "VPS setup"
description: "How to install the native Linux core of Moonbot on a VPS from the terminal: SSH key access, MoonProto port and key, memory check. Trading continues after the client is closed. For version 7.73 and later."
section: documentation
category: "\"Menu\" Button"
url: https://moonbot.eu/en/documentation/menu-button/vps-setup?format=md
locale: en
alternate_ru: https://moonbot.eu/documentation/menu-button/vps-setup?format=md
alternate_zh: https://moonbot.eu/zh/documentation/menu-button/vps-setup?format=md
parent: https://moonbot.eu/en/documentation/menu-button?format=md
previous: https://moonbot.eu/en/documentation/menu-button/moon-kernel?format=md
next: https://moonbot.eu/en/documentation/menu-button/manage-triggers?format=md
status: published
updated_at: 2026-11-16T21:43:43+03:00
---

# VPS setup

**Moonbot on a VPS** – installing the kernel and managing MoonProto access.

The native **Linux** kernel runs **Moonbot** on a server without a desktop. Connect to it from **Moonbot for Windows** or from [MoonTerminal](https://github.com/Moonbot-Tech/MoonTerminal) (download from GitHub); trading continues even after the client is closed or SSH is disconnected.

This guide applies to **Moonbot** version **7.73** and later. For information on monitoring, logs, changes to exchanges and post-installation updates, please refer to the instructions on GitHub: “[Linux kernel commands](https://github.com/Moonbot-Tech/MoonDoc/blob/main/reference/linux-kernel-commands.md)”.

![](https://moonbot.eu/storage/editor-images/VPS-setup-W-eng.jpg)

![(dark)](https://moonbot.eu/storage/editor-images/VPS-setup-B-eng.jpg)

- **Install a new core**
- **Change MoonProto key**
- **Restore access via SSH**

- **Settings**
  - **Current bot**
  - **Connected core**
  - **Get settings**
  - **Select ZIP...**
  - **Field** \[Get settings or select a ready-made ZIP\]\
    Exchange, API keys and strategies — from the archive.
- **Access to the VPS**
  - **IPv4** **VPS** \[VPS address\]
  - **SSH** \[22\]
  - **Username** \[root\]
  - **SSH key** \[Private key file\]
  - **Select...**
  - **Create...**
  - **Password** \[For setting up an SSH key only\]\
    Select a key or create a new one. If key-based authentication is already set up, no password is required.
  - **Check SSH**
  - **Disable password login**
- **Moonbot Core**
  - Folder \[Exchange name\]
  - **MoonProto port** \[3000\]\
    The MoonProto key is saved. Each core requires its own UDP port.
- **VPS memory**
  - **Check the memory**
  - **Disable unnecessary services**
- **Workflow** \
  \[VPS wizard opened.\]
- **Install and check**

Get settings and enter VPS access details.

### Set up a VPS

- We recommend **Ubuntu 24.04 x86-64** as a tested system. The native package requires **x86-64, systemd and glibc 2.38** or later. Wine, a graphical desktop environment, a compiler and Python are not required; the archive includes libraries and fonts.
- You must have **SSH** access **as root**. The Windows Wizard also accepts another administrator account **with password-less sudo access**.
- Select a separate folder and **an** available **UDP port** for each core. The default MoonProto port is **3000**. Allow this port through your internet service provider’s firewall and, if enabled, through your VPS firewall.
- Add **the VPS IP address** to the list of authorised **IPs for the** exchange’s **API key**. Use the permissions required for trading, without authorisation to withdraw funds.
- If you are transferring settings, first remove the password required to open the configuration in Windows. A password-protected configuration will not run on the Linux kernel.

### Installation from Moonbot for Windows

- Open "**Menu → VPS Settings**" to open a separate Moonbot VPS window. In the top right-hand corner of this window, select "Install a new kernel" from the menu.
- In the ‘Settings’ section of the menu, select **‘Current bot**’ or **‘Connected core**’, then click the **‘Get settings**’ button. You can also use the **‘Select ZIP...**’ button to select a previously exported settings archive.
- In the **‘VPS Access**’ section, enter **the VPS IP** address, SSH username and authentication details. Click the **‘Select...**’ button to choose **an SSH private key file**, or click the **‘Create...**’ button to generate one, then click the **‘Verify** SSH’ button. The wizard can use the server password to install the selected public key and verify access using the key.
- Select **the** instance **folder** and **the** MoonProto **UDP port**, then click the **‘Install and Check**’ button. The wizard downloads the full release package, applies the selected settings, installs the **systemd** service and enables **it to start automatically** after **the VPS** is rebooted.
- Wait until the MoonProto connection has been successfully verified, then click ‘**Copy connection**’. This package contains the server address, port and secret key; keep it confidential.
- Set up your client and check that you can log in to the exchange and that trading is active before transferring trading to the VPS.

The selected exchange, API keys, strategies and emulator mode are transferred along with the settings. The original bot continues to run: choose when to stop trading on it to avoid unintentional simultaneous trading. The reporting database, history, saved charts and Telegram Windows session are not transferred by this wizard. The connection check performed by the wizard does not switch your current client to the new core.

### Using MoonTerminal

In MoonTerminal, go to "**Settings → Cores → Connect a core…**". The same wizard opens when there are no cores connected.

\- **To use the release core:** install it using the Windows wizard or by following the manual steps below. In MoonTerminal, select ‘**Connect to a Moonbot core**’, enter a name, paste the connection package into the ‘**Key**’ field and click ‘**Connect**’.

\- **To install via MoonTerminal:** select ‘**New core on a Linux** server’, enter your SSH details, verify the server, then follow the installation steps and configure the exchange keys. Wait until you are logged into the exchange and the terminal connection is complete. The current wizard downloads the latest “test build”; it does not select the full release distribution. Use the first option if you require the release version.

Once the kernel has been connected, information on the status, logs and actions relating to the service from the terminal can be found on GitHub under [‘Managing the kernel from MoonTerminal](https://github.com/Moonbot-Tech/MoonDoc/blob/main/reference/linux-kernel-commands.md#manage-the-core-from-moonterminal)’.

### Manual installation via SSH

These steps create a "new instance with fresh settings". To transfer the configuration of an existing bot, use the Windows wizard above.

```
(
    set -eu
    apt-get update
    apt-get install -y curl unzip ca-certificates
    mkdir -m 700 /root/MoonBot-Bybit
    cd /root/MoonBot-Bybit
    curl --fail --show-error --location \
        https://api.moonbot.pro/files/linux/MoonBot.zip -o MoonBot.zip
    unzip MoonBot.zip
    sha256sum -c SHA256SUMS
    chmod 700 MoonBot moonbot-update

    unit=$(systemd-escape --path --template=moonbot@.service "$PWD")
    install -m 0644 moonbot@.service /etc/systemd/system/moonbot@.service
    if test ! -e /usr/local/bin/mb || test mb -nt /usr/local/bin/mb; then
        install -p -m 0755 mb /usr/local/bin/mb
    fi
    ln -sfn mb /usr/local/bin/moonbot
    systemctl daemon-reload
    systemctl enable --now "$unit"
    systemctl status "$unit" --no-pager
)
```

The service provided runs as root; this also allows the kernel to manage its own Telegram service. A failed installation may leave behind a new folder: check the error message before repeating the steps or running anything from that folder.

Navigate to the instance folder and check that it starts up:

```
cd /root/MoonBot-Bybit
mb --status
mb --exchanges
```

If the command channel is not immediately available, check the service status and try again once it has started. Wait until **the** "**state**" is no longer "**initialising**" before changing the exchange. Use the exact exchange ID from "**--exchanges**", for example:

```
mb --exchange bybit-futures
mb --status
```

Once the exchange shift has finished, enter your API key and secret in the hidden requests:

```
mb --set-api-keys
mb --status
```

For Bitget and OKX, create an exchange key using the passphrase displayed by the "**--exchanges**" command. Hyperliquid uses a wallet address and a signer’s private key; Binance RSA uses an exported RSA package. For these requests, see GitHub: “[Exchange credentials and commands](https://github.com/Moonbot-Tech/MoonDoc/blob/main/reference/linux-kernel-commands.md#connection-exchange-and-api-keys)”.

Once initialisation is complete, configure MoonProto. Replace "**203.0.113.10**" with your VPS’s IP address and use the UDP port that you have opened on both firewalls:

```
mb --setup-moonproto --host 203.0.113.10 --port 3000
mb --status
```

Copy the **key** value from the configuration response into the client. To display the saved connection bundle again, run **\`mb --moonProtoKey**\`. Both outputs contain the secret.

Select an exchange **before** configuring MoonProto: switching to a previously configured exchange also restores its saved connection settings. Changing the exchange or key via the CLI follows the same logout/login behaviour as in Windows; the core process continues to run, but trading and client connections may be interrupted.

### Connection and verification of the result

In **Moonbot for Windows**, open "**Menu → Moon Kernel → Settings**", use "**Paste**" to insert the key, tick the "**Terminal**" box, leave "**Kernel (VPS)**" unticked, then click the **“Apply”** button. In **MoonTerminal,** use the key-based connection method described above.

**Check the following items one by one:**

1. The service has been started and set to start automatically: run \`**systemctl status\`** and **\`systemctl is-enabled\`** for your instance. Run **\`mb --help**\` to find its full service name.
2. **mb --status** returns **the status: ready** after logging into the exchange. If not, check **login_error** and follow [the](https://github.com/Moonbot-Tech/MoonDoc/blob/main/reference/linux-kernel-commands.md#reading---status) "[Status Guide](https://github.com/Moonbot-Tech/MoonDoc/blob/main/reference/linux-kernel-commands.md#reading---status)" on GitHub. A simple **ok: true** merely confirms that the command was successful.
3. **moonproto_listening: true** and the actual client connection confirm different things: the local listener does not, in itself, check the ISP’s firewall or the route from your computer.
4. Please check the selected exchange, your balance, strategies and **emulator mode** in the client before enabling live trading or stopping the old instance. A successful service start-up does not perform this transfer for you.

To manage logs, stop or restart the kernel, modify keys and install future releases, go to the ‘[Linux kernel commands](https://github.com/Moonbot-Tech/MoonDoc/blob/main/reference/linux-kernel-commands.md)’ section on GitHub.

## Navigation

Path: [Main](https://moonbot.eu/en?format=md) / [Documentation](https://moonbot.eu/en/documentation?format=md) / ["Menu" Button](https://moonbot.eu/en/documentation/menu-button?format=md) / VPS setup

Parent section: ["Menu" Button](https://moonbot.eu/en/documentation/menu-button?format=md)

Previous: [Moon Kernel](https://moonbot.eu/en/documentation/menu-button/moon-kernel?format=md)

Next: [Manage Triggers](https://moonbot.eu/en/documentation/menu-button/manage-triggers?format=md)

## Related

- [Manage Triggers](https://moonbot.eu/en/documentation/menu-button/manage-triggers?format=md)
- [Log Analyzer](https://moonbot.eu/en/documentation/menu-button/log-analyzer?format=md)
- [BackTest](https://moonbot.eu/en/documentation/menu-button/backtest?format=md)
- [Moon News](https://moonbot.eu/en/documentation/menu-button/moon-news?format=md)
- [Exit](https://moonbot.eu/en/documentation/menu-button/exit?format=md)
