Running Multiple Bots

Multiple bots via Docker

Create multiple instances using ./create.sh script or docker run.. command (see Create Hummingbot Instance).

Running in the background (via Docker)

Press keys Ctrl+P then Ctrl+Q in sequence to detach from Docker (i.e. return to command line). This exits out of Hummingbot without shutting down the container instance.

Restart or connect to a running instance using ./start.sh or docker start.. && docker attach.. command (see Restarting Hummingbot after Shutdown Closing the Window).

For more information: Docker Commands

Multiple bots from source

Tip

We recommend that users download and install Hummingbot separately for each instance they wish to run.

Below command downloads the Hummingbot repository from GitHub where $FOLDER_NAME is the name of the separate directory.

1
2
cd ~
git clone https://github.com/CoinAlpha/hummingbot.git $FOLDER_NAME

Do another install in the new directory.

1
2
3
4
cd $FOLDER_NAME
./install
conda activate hummingbot
./compile

Running in the background (from source)

Note

The screen package is pre-installed on most Linux distros nowadays. To learn more about screen please visit how-to-use-linux-screen. You can check if it is installed on your system by typing:

1
screen --version

If not installed here's how to install screen

1
2
sudo apt-get update
sudo apt-get install -y screen
1
sudo yum -y install screen

To run an instance in the background, run either of the following commands: screen or screen -S $NAME, where $NAME is what you wish to call this background instance. Use the latter to be more explicit if you want to run multiple bots.

Navigate to the folder where your separate Hummingbot is installed, then start the bot like normal.

1
2
conda activate hummingbot
bin/hummingbot.py

To exit the screen (detach), press Ctrl+A then Ctrl+D in sequence.

To list all running instances, use screen -ls.

List Screen Instances

Log back into the screen by using either screen or screen -r $NAME to open a specific instance.

Credits to discord user @matha for this question and @pfj for the solution.