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 detailed setup steps.
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/OctoBotCreate a virtual environment to contain OctoBot’s dependencies and activate it :
cd OctoBot
python3 -m venv venv
source venv/bin/activateInstall 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
rustrelated error while runningpants install-deps --full ::when installingcryptography. If this happens, you need to install therust compiler:cryptographyis coded inrust.
sudo apt-get install -y rustcYou can then restart pants install-deps --full ::.
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 devOr if you already have an OctoBot repository
git checkout dev
git pullSetting 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_patternsof OctoBot’spants.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 --allUsage
The following command replaces OctoBot Launcher:
python3 start.pyMake 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.
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.pyYou 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.