Skip to content
Open sourceInstallationWith Python and Git

Install OctoBot on Python and Git

After installation, OctoBot starts in node mode and opens its node interface. From there you can:

  • Run automations configured and monitored from the new OctoBot interface or the mobile app (recommended for most users).
  • Launch manual OctoBots with their own interface, deeper configuration and the backtesting engine (for expert users).

See the getting started guide for setup steps, or the connect guide if you have connection issues.

Requirements

  • Packages installed : Python3.13.X, Python3.13.X-dev, Python3.13.X-pip, git
  • Build system: Pants

OctoBot’s Python code is a monorepo: each part of OctoBot (commons, trading, evaluators, …) lives in its own folder under packages and is built with Pants.

Pants is not bundled with OctoBot, install the scie-pants launcher once and it will bootstrap the Pants version required by OctoBot’s pants.toml on its first run. Installation instructions are on the Pants installation page.

This Pants based setup is not supported on Windows yet. Pants only runs on Windows through the Windows Subsystem for Linux (WSL 2).

If you are on Windows, install WSL 2, clone OctoBot inside the Linux file system of your WSL distribution and follow the Linux commands of this guide from your WSL shell. A repository kept on the Windows side and reached through /mnt is not supported by Pants and leads to unexpected behaviors.

Installation

First, make sure you have python3.13 and python3.13-dev and python3.13-pip installed on your computer.

Using the current stable version (master branch)

This is the recommended python installation.

Clone the OctoBot repository

git clone https://github.com/Drakkar-Software/OctoBot

Create a virtual environment to contain OctoBot’s dependencies and activate it :

cd OctoBot
python3 -m venv venv
source venv/bin/activate

Install python packages. This command installs every third party dependency of the OctoBot packages into the currently activated virtual environment :

pants install-deps --full ::

--full also includes the optional dependencies listed in the full_requirements.txt files, which are required by some tentacles.

On some setup like 32-bit ARM architectures, you might get a rust related error while running pants install-deps --full :: when installing cryptography. If this happens, you need to install the rust compiler: cryptography is coded in rust.

sudo apt-get install -y rustc

You can then restart pants install-deps --full ::.

After install: Initialize your OctoBot and start your first automated strategy with a risk-free virtual account.

Using the latest version (dev branch)

This is installation allows to use the most up-to-date version of OctoBot but might broken depending on the moment it is being done (modules updates might be in progress in this branch).

Clone the OctoBot repository using the dev branch

git clone https://github.com/Drakkar-Software/OctoBot -b dev

Or if you already have an OctoBot repository

git checkout dev
git pull

After install: Initialize your OctoBot and start your first automated strategy with a risk-free virtual account.

Setting PYTHONPATH

OctoBot’s packages are not installed into your virtual environment, they are used directly from their folder in the repository. Python therefore needs to know where each of them is: this is what PYTHONPATH is for.

From the OctoBot repository folder :

ROOT=$PWD
export PYTHONPATH="$ROOT:$ROOT/packages/agents:$ROOT/packages/async_channel:$ROOT/packages/backtesting:$ROOT/packages/binary:$ROOT/packages/commons:$ROOT/packages/copy:$ROOT/packages/evaluators:$ROOT/packages/flow:$ROOT/packages/node:$ROOT/packages/protocol:$ROOT/packages/services:$ROOT/packages/sync:$ROOT/packages/tentacles_manager:$ROOT/packages/trading"

Notes:

  • Use absolute paths, some OctoBot subprocesses are started from other folders and would not be able to resolve relative ones.
  • This list mirrors the root_patterns of OctoBot’s pants.toml, update it when a new package is added.

Installing latest tentacles :

Warning: using the latest tentacles might break your OctoBot

cd OctoBot
pants install-deps --full ::
export TENTACLES_URL_TAG="latest"
python3 start.py tentacles --install --all

Usage

The following command replaces OctoBot Launcher:

python3 start.py

Make sure your virtual environment is activated and PYTHONPATH is set in the terminal running this command. Both are lost when you close your terminal, so they have to be set again in every new one.

The node interface is at http://localhost:8000/.

After install: Initialize your OctoBot and start your first automated strategy with a risk-free virtual account.

Initialize your OctoBot

After installation: Starting your OctoBot

  1. Open the node setup
    Open http://localhost:8000 on the PC where OctoBot is running. The node setup screen opens in your browser.
  2. Set up your node wallet
    On the node, create or import your node wallet to secure your node and its data. This wallet is not a cryptocurrency wallet, do not use a crypto wallet private key and never share your private key with anyone.
  3. Connect your Node to your OctoBot interface
    From the Connect your Node to your OctoBot interface step (or Settings → Connect → Web tab), open new.mobile.octobot.cloud. I already have a wallet → I already have a private key. Paste Copy your private key from this node. Then new automation → any type → Add a node → Existing install. Hostname: the hostname or IP the node shows. Port: 8000 (or what the node shows). Click Save when the checks turn green. Still Unreachable? Check our connection troubleshoot.
  4. Launch your first OctoBot
    On new.mobile.octobot.cloud, leave demo mode on (default for risk-free simulated trading). Add an exchange account with 1000 USDC (or the crypto of your choice). Start a new automation (for example a Grid on BTC/USDC, if you added USDC to the demo account) and follow your automation from your OctoBot interface.
  5. Your node is now executing your strategy
    When you start an automation, the node runs it on its computer. You do not need to keep the browser tab or app open. Just leave the OctoBot program running so that it keeps trading. You can run as many automations as you want, on most crypto exchanges, with demo and real accounts. When needed, feel free to stop and restart your node, it will resume trading when you turn it back on.

Use new.mobile.octobot.cloud or the iOS or Android app on a regular basis to follow your investments and turn automations on and off. Go back to the node interface at http://localhost:8000 only for configuration, administration, or to connect to a new phone or computer.

Connection problems? Read the Node Connect Guide. If your node shows Unreachable, see connection common issues.

Update

Executing the following command will update your Python OctoBot using the latest version of the selected branch (master or dev), as well as installing the latest requirements. Activate your virtual environment first, the dependencies are installed into it.

cd OctoBot
source venv/bin/activate
git pull
pants install-deps --full ::

The next restart will automatically update your OctoBot tentacles.

Python3

There python3 is refering to your Python3.13.X installation, just adapt the commands to match your setup if any different (might be python, python3, python3.13, etc: it depends on your environment).

Start in background

For unix distribution only

With the Linux screen command, you can push running terminal applications to the background and pull them forward when you want to see them.

sudo apt-get install -y screen
screen python3 start.py

You need the number from the start of the window name to reattach it. If you forget it, you can always use the -ls (list) option, as shown below, to get a list of the detached windows:

screen -ls
screen -r 23167

(23167 is an example value)

OctoBot has been working away in the background is now brought back to your terminal window as if it had never left.