Logo hamster-bot
RU EN PT

Loading…

Choose a convenient way to run the bot

Free
Self-Hosted version

Download the bot and run it on your own server or computer. Full control, no monthly fee.


Builds available for:

Windows Linux ARM64 macOS
Download the bot and instructions →
Ready-to-use Online bot

No need to deal with hosting — the bot is already running on our server. Get your personal link right after payment.

  • Isolated bot instance
  • Developer support
19 USDT / month
Buy subscription →
VPS rental

VPS (VDS) is a virtual dedicated server.
For us, a VPS is a full computer located in the provider's datacenter. The provider is responsible for uninterrupted server operation and stable internet connectivity. This matters for trading!

We will use a VPS to run the bot program. This is the most correct and reliable way to run programs that trade on an exchange.

Which server configuration to choose: when renting your first VPS server you can just pick the cheapest one. Its performance will be enough. The software is optimized and not resource-hungry.

Example providers: zomro.com, contabo.com, melbicom.ru
If possible, use my referral link: zomro.com/vps?from=413202 Promo code: zomro_413202

The bot can run on any OS: Linux, macOS and Windows.
Recommended OS versions  Ubuntu: 20.04 , 22.04 , 24.04

❗️Choose a server location outside the US. (Exchanges usually block requests from the US). Europe and Asia regions are OK

You get remote access to this rented computer. (IP address, login (usually root) and password)
To connect to your Linux VPS we will use SSH via the app termius (or putty)
Termius can even be installed on a smartphone. The free version of this program is enough. (all offers to buy can simply be ignored)

Linux (CLI) | INSTALLATION

You chose the path of renting your own VPS and running a self-hosted bot

First you need to connect to your VPS via SSH using the app termius (This is free software which persistently asks you to buy the paid version)
After paying for the server you receive the IP address, login (usually root) and password for SSH access.

Installing the bot on a Linux server is very simple thanks to ready-made scripts.
Just copy -> paste -> run the commands in the command line interface.

Done! The bot is installed in the hb1 folder and a service with the same name hb1.serviece will be started.
Information from the bot (work log) will be output in the terminal in real time. You can close termius and move on to adding API keys and configuring strategies.


If you replace the bot's files on the server manually over SFTP - don't forget the command to make the executable file runnable: chmod +x ./hb_c

Linux (CLI) | UPDATE

When you have 2 or more bots running on your VPS:
/opt/hb1
/opt/hb2
/opt/hb3

To update the bot in the /opt/hb2 folder you need to run the following commands in order:

Done! Only the bot in the folder /hb2 will be updated and restarted. The script finds the service associated with the chosen folder on its own.

Linux (CLI) | Finding bots on the server

If you have installed many different bots on your VPS running Linux and can't figure out which .service belongs to which bot folder - I recommend using the command:
grep -rl "hb_c" /usr/lib/systemd/system/

This command outputs a list of all services that contain the executable hb_c (this is the bot's executable file). This way you can find the service you need and see which folder it belongs to.

hamster-bot.com

In the screenshot we see 5 services, while there are only (2) bots in the folders - meaning there are already extra ones.

If you enter a folder name as the search string, you will get a list of services that reference that folder:
grep -rl "/hb/" /usr/lib/systemd/system/

If you want to remove a bot service you need to run the commands:
1. systemctl stop hb2.service - stop the hb2 service
2. systemctl disable hb2.service - disable the hb2 service
3. rm -rf /usr/lib/systemd/system/hb2.service - remove the service file hb2.service

Linux (CLI) | Restarting all active bots on the server

wget -qO- https://raw.githubusercontent.com/ksandric/hamster-bot/refs/heads/master/restart_all.sh | bash

1. This script finds all services associated with the bot. It separately lists which of them are currently enabled.
2. Restarts only the enabled ones with a 15-second pause between services.

hb
Linux (CLI) | Updating all active bots on the server

wget -qO- https://raw.githubusercontent.com/ksandric/hamster-bot/refs/heads/master/update_all.sh | bash

1. This script finds all services associated with the bot. It separately lists which of them are currently enabled.
2. Updates only the active bots.

Linux (CLI) | Manual installation step by step

Video guide link youtu.be/jxb6aZQwtN4

First you need to connect to your VPS via SSH using the app termius (or putty)

After that the file can be run just like this ./hb_c but that's not suitable for a bot. You need to create a service - so the bot runs in the background and doesn't close when the console session ends.

File content: hamster-bot_1.service
[Unit]
Description=hamster-bot_1
After=multi-user.target
[Service]
Environment="DOTNET_BUNDLE_EXTRACT_BASE_DIR=%h/.net"
Type=simple
ExecStart=/opt/hb/hb_c
WorkingDirectory=/opt/hb
RestartSec=61
Restart=always
[Install]
WantedBy=multi-user.target


Linux (CLI) | Manual update step by step

Video guide link youtu.be/FJgu7OfgUWU

First you need to connect to your VPS via SSH using the app termius (or putty)

In the example the service name is: "hamster-bot_1.service".
The folder where the bot files are located: "/opt/hb"

  1. Stop the bot (stop the service)
    systemctl stop hamster-bot_1.service
  2. Go to the bot's folder
    cd /opt/hb
  3. Download the zip archive
    wget https://github.com/ksandric/hamster-bot/blob/master/hb_linux-x64.zip?raw=true
  4. Unpack the archive replacing files (the file settings_program.json will be ignored)
    unzip -u hb_linux-x64.zip?raw=true -x settings_program.json
  5. Delete the zip archive
    rm -rf hb_linux-x64.zip?raw=true
  6. Give the file execute permission again
    chmod +x ./hb_c
  7. Start the bot
    systemctl restart hamster-bot_1.service
  8. Done! The bot will continue working with your settings. Everything is applied on the fly without closing positions or orders
Administration recommendation

If your VPS running Linux has little memory:
hamster-bot.com

(1) View available and used memory:
df -h

(2) A utility with memory usage visualization. For easy search of large folders:
ncdu /

I often notice that on Ubuntu systems with a small amount of memory system logs can take up a lot of space. These two commands will free up space:
journalctl --vacuum-size=100M
rm /var/log/*.[0-9]

But it's better to fix the config so this situation doesn't come up in the first place.

The bot's logs can also take up a lot of space in some situations. They live in the /logs folder and here's what the log parameters look like in the config:
"log": {
"log_months": 2, - how many months to keep logs
"debug_mode": false,
"log_size_mb": 50, - limit on log file size
"log_files_count": 5 - file rotation N times once the size limit is reached },

In the logs the bot outputs CPU, RAM and disk usage. And it sends an alert to telegram at critical values.

WatchDog — offline bot notification

WatchDog is a separate independent service (running on an external server) which monitors that your bot is alive and running. If the bot stops responding - you receive a notification in Telegram: WARNING! Bot is offline.

Configured in the file settings_program.json:

Trigger causes:

Run on macOS

The archive already includes scripts: mac_sign.sh for signing and run_tester_mac.sh for running the tester.

After starting the executable file the bot's WEB interface is available locally in the browser at http://127.0.0.1:80.

Run on Windows

Guide on how to open a port on Windows

After starting the executable file the bot's WEB interface is available locally in the browser at http://127.0.0.1:80. If the bot is running on a server then the interface will be available at your server's IP address on the port from the config file.

It is recommended to install Dimension 4 or nettime to sync time on windows

Telegram connection:

hamster-bot.com