Requirement: Python 3.11 or newer.
1. Get your tokens
- Bot token: open @BotFather, send
/newbot, follow the prompts and copy the token. - Your Telegram ID: open @userinfobot and copy the number. This makes you the admin.
- Crypto Pay token:
- For testing with free test coins: @CryptoTestnetBot → Crypto Pay → Create App → copy the token.
- For real payments: @CryptoBot, same steps.
2. Open the project folder
3. Create a virtual environment (skip this if .venv already exists)
python -m venv .venv
4. Install the dependencies
.venv\Scripts\python.exe -m pip install -r requirements.txt
5. Configure
Copy the template (skip this if .env already exists):
copy .env.example .env
Open .env and fill in:
BOT_TOKEN=your-bot-token
ADMIN_IDS=your-telegram-id
CRYPTOPAY_TOKEN=your-crypto-pay-token
CRYPTOPAY_TESTNET=true
Set CRYPTOPAY_TESTNET=false when you switch to a real @CryptoBot token.
6. Run
.venv\Scripts\python.exe -m shopbot
When you see Starting @YourBotName, it's running.
7. Set up the shop
In Telegram, open your bot and send /start. Then go to ⚙️ Admin Panel → 📂 Catalog → ➕ New category → ➕ Add product → ➕ Add stock.
On Linux/macOS, steps 3–6 are:
python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt && cp .env.example .env
Edit .env, then:
python -m shopbot
With Docker, after filling in .env:
docker compose up -d --build