How to Run a Predictoor Bot
Step-by-step guide to launch your prediction bot
⚠️ Prerequisites
- ppss.yaml file downloaded from the creation page
- Ethereum/Ocean private key (starting with 0x...)
- Docker installed (Option A) OR Python 3.11+ (Option B)
- Sufficient funds on the chosen network (testnet/mainnet)
Option A: Run with Docker (Recommended)
Simplest and most isolated method
1. Create a working directory
mkdir predictoor-run && cd predictoor-run2. Place your ppss.yaml file
Copy the downloaded ppss.yaml file into this folder.
3. Export your private key
export PRIVATE_KEY=0xYOUR_PRIVATE_KEY_HERENEVER commit your private key to Git. Do not store it in a file.
4a. Run with docker run
docker run --rm -it \
-e PRIVATE_KEY=${PRIVATE_KEY} \
-v $(pwd):/work \
ghcr.io/oceanprotocol/pdr-backend:latest \
pdr predictoor /work/ppss.yaml testnet4b. OR run with docker-compose
If you downloaded the docker-compose.yml:
docker compose up -dView logs: docker compose logs -f
Stop: docker compose down
Option B: Run with Python CLI
For developers familiar with Python
1. Create a virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate2. Install pdr-backend
pip install pdr-backend3. Export your private key
export PRIVATE_KEY=0xYOUR_PRIVATE_KEY_HERE4. Run the bot
pdr predictoor ppss.yaml testnetLogs & Troubleshooting
View logs (Docker)
docker compose logs -f predictoorCheck outputs
Results are saved in the specified directory (out_dir in ppss.yaml).
Common errors
- PRIVATE_KEY not defined: Check the variable export
- Insufficient funds: Fund your wallet on the network
- Cron error: Check the cron schedule format
- Permission denied (Docker): Add your user to docker group
Update the bot
Docker
docker pull ghcr.io/oceanprotocol/pdr-backend:latest
docker compose restartPython CLI
pip install --upgrade pdr-backendSwitch to Mainnet
⚠️ Warning
Before switching to mainnet:
- Test your bot thoroughly on testnet
- Check your funds and gas fees
- Start with a low stake
- Monitor performance and adjust
To switch to mainnet, recreate your ppss.yaml with network: mainnet, and run withmainnet instead oftestnet in the commands.