Reverse Image Search Bot

August 30, 2026 · View on GitHub

A Telegram bot that performs reverse image searches across multiple engines including Google, Yandex, SauceNAO, Trace, and more.

Usage & Commands

Quick Start

# docker-compose.yml
services:
  ris-bot:
    image: ghcr.io/nachtalb/reverse_image_search_bot:latest
    restart: unless-stopped
    environment:
      TELEGRAM_API_TOKEN: ""
      SAUCENAO_API: ""
      TRACE_API: ""
      UPLOADER_URL: ""
      UPLOADER_PATH: /data/uploads
    volumes:
      - ris-data:/data

volumes:
  ris-data:
docker compose up -d

Configuration

All configuration is done via environment variables.

Required

VariableDescription
TELEGRAM_API_TOKENBot token from @BotFather
SAUCENAO_APISauceNAO API key
TRACE_APITrace.moe API key
UPLOADER_URLPublic base URL for uploaded files
UPLOADER_PATHLocal directory to store uploads (when using local uploader)

Optional

VariableDefaultDescription
ADMIN_IDSComma-separated Telegram user IDs with admin access
ERROR_CHAT_IDChat to send WARNING+ log records to; when unset they are DMed to ADMIN_IDS. Channel/supergroup ids need the -100 prefix
ANILIST_TOKENAniList OAuth token (raises rate limit from 90 to 120 req/min)
MODE_ACTIVEpollingBot mode: polling or webhook
CONCURRENT_UPDATES16Number of concurrent update handlers
OLD_CONFIG_DIR~/.config/reverse_image_search_botLegacy config directory (used for JSON→SQLite migration only)
PIXIV_CONFIG~/.config/reverse_image_search_bot/pixiv.jsonPath to the Pixiv config file
CONFIG_DB_PATH~/.config/reverse_image_search_bot/config.dbPath to the configuration database
PERSISTENCE_PATH~/.config/reverse_image_search_bot/bot_data.picklePath to the bot persistence file
LOG_FORMAT%(asctime)s - %(name)s - %(levelname)s - %(message)sPython log format string
METRICS_ENABLEDtrueEnable Prometheus metrics endpoint
RIS_METRICS_PORT9100Prometheus metrics port

Uploader (SSH)

Set UPLOADER_TYPE=ssh to upload files via SSH instead of storing locally.

VariableDescription
UPLOADER_HOSTSSH host
UPLOADER_USERSSH username
UPLOADER_PASSWORDSSH password
UPLOADER_UPLOAD_DIRRemote upload directory
UPLOADER_KEY_FILENAMEPath to SSH private key (optional)

Webhook Mode

Set MODE_ACTIVE=webhook to use webhooks instead of polling.

VariableDescription
MODE_LISTENListen address
MODE_PORTListen port
MODE_URL_PATHURL path for webhook
MODE_WEBHOOK_URLFull public webhook URL

Security

To report a security issue or abuse, see our security.txt (RFC 9116). Contact: report@nachtalb.io (PGP key).

Blocks and policy

All blocks are reviewed manually and are not appealable. Please don't open issues about them.

Users of this bot are subject to Telegram's Standard Bot Privacy Policy, Terms of Service for Bots and Terms of Service.