# BitBot
Event-driven, modular IRC bot for Python 3.
---
## Quick start (Linux/macOS)
### 0) System prerequisites
- Python **3.11+** (tested on **3.13**)
- Git
- Build tools only if wheels aren’t available:
- **Fedora/RHEL**: `sudo dnf install -y gcc python3-devel libxml2-devel libxslt-devel pkgconf-pkg-config`
- **Debian/Ubuntu**: `sudo apt-get install -y build-essential python3-dev libxml2-dev libxslt1-dev pkg-config`
### 1) Get the code
```bash
git clone https://github.com/bitbot-irc/bitbot.git
cd bitbotbash/zsh
python3 -m venv .venv
source .venv/bin/activatefish
python3 -m venv .venv
source .venv/bin/activate.fishrequirements.txt targets modern Python (includes lxml>=6,<7, requests-toolbelt>=1.0.0, and legacy-cgi for Py3.13 compatibility).
pip install -U pip wheel
pip install -r requirements.txt
# If pip compiles lxml from source, install the -devel headers from step 0.mkdir -p ~/.bitbot
cp docs/bot.conf.example ~/.bitbot/bot.conf
# Edit ~/.bitbot/bot.conf: set nick/ident/realname, servers/channels, and enable modules.
# Some modules (google/youtube/spotify/…​) require API keys; add them here before enabling.
# The 'user_time' module depends on the 'location' module being configured../bitbotd -a # add your network(s)
./bitbotd # start the bot (foreground)./bitbotctl command master-password
# Use this in IRC to register your admin account.# /etc/systemd/system/bitbot.service
[Unit]
Description=BitBot IRC bot
After=network-online.target
Wants=network-online.target
[Service]
User=bitbot
WorkingDirectory=/opt/bitbot
Environment=PATH=/opt/bitbot/.venv/bin
ExecStart=/opt/bitbot/bitbotd
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.targetDeploy:
sudo useradd -r -s /usr/sbin/nologin bitbot 2>/dev/null || true
sudo cp -r ~/bitbot /opt/bitbot && sudo chown -R bitbot:bitbot /opt/bitbot
cd /opt/bitbot
sudo -u bitbot python3 -m venv .venv
sudo -u bitbot .venv/bin/pip install -U pip wheel
sudo -u bitbot .venv/bin/pip install --only-binary=:all: -r requirements.txt
sudo systemctl daemon-reload
sudo systemctl enable --now bitbotUpgrade:
cd /opt/bitbot
sudo -u bitbot git pull
sudo -u bitbot .venv/bin/pip install -U -r requirements.txt
sudo systemctl restart bitbotBack up the entire ~/.bitbot directory (config, database, rotated logs). Tools like
borgbackup work well.
- Configuration help: see
docs/help/config.md. - Chat:
#bitboton irc.libera.chat. - License: GNU GPL v2.0 — see LICENSE.