Documentation Index
Fetch the complete documentation index at: https://mintlify.com/avikekk/JackettSearchBot/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, ensure you have the following:Python 3.10+
JackettSearchBot requires Python 3.10 or higher. Check your version with
python --version.uv Package Manager
Install uv for fast dependency management:
curl -LsSf https://astral.sh/uv/install.sh | shTelegram Bot Token
Create a bot via @BotFather on Telegram to get your bot token.
Jackett Instance
A running Jackett instance (localhost or remote) with an API key.
You’ll also need your Telegram API credentials (API_ID and API_HASH) from my.telegram.org.
Installation
Install Dependencies with uv
Use This command automatically:
uv to create a virtual environment and install all dependencies:- Creates a
.venvdirectory with a virtual environment - Installs all dependencies from
pyproject.toml - Installs
tgcryptoon Python 3.10-3.12 (skipped on 3.13+ without C++ tools)
You don’t need to manually activate the virtual environment when using
uv run commands.Configure Environment Variables
Fill in your configuration values in
config.env:Configuration Reference
| Variable | Description | Required | Default |
|---|---|---|---|
TELEGRAM_TOKEN | Bot token from @BotFather | Yes | - |
API_ID | Telegram API ID from my.telegram.org | Yes | - |
API_HASH | Telegram API hash from my.telegram.org | Yes | - |
JACKETT_API_KEY | Your Jackett API key | Yes | - |
JACKETT_URL | Jackett base URL (with protocol) | Yes | - |
AUTHORIZED_CHAT_IDS | Comma-separated chat/user IDs with access | No | Empty |
OWNER_ID | Your Telegram user ID (for admin commands) | Yes | - |
MAX_RESULTS | Results per page | No | 10 |
REDACT_AFTER_SECONDS | Auto-redaction timeout for results | No | 300 |
LOG_FILE_PATH | Path for rotating log file | No | logs/jackett_bot.log |
CONSOLE_LOG_LEVEL | Console logging level | No | INFO |
FILE_LOG_LEVEL | File logging level | No | DEBUG |
Getting Your Credentials
Get Telegram Bot Token
- Open Telegram and search for @BotFather
- Send
/newbotand follow the prompts - Choose a name and username for your bot
- Copy the bot token provided (format:
123456789:ABCdefGHI...)
Get Telegram API Credentials
- Visit my.telegram.org/apps
- Log in with your phone number
- Create a new application
- Copy your
api_id(numeric) andapi_hash(hex string)
Get Your Telegram User ID
Get your user ID for the
OWNER_ID field:- Send a message to @userinfobot
- Copy your numeric ID (this grants you admin access)
Running the Bot
Once configured, start the bot with:The bot runs in the foreground by default. Press
Ctrl+C to stop it gracefully. For production deployments, see the Running guide.Verify Bot Access
Test that everything is working:Start the Bot
Send If you get
/start to your bot. You should receive:ERROR: NOT AUTHORIZED, verify that your user ID is in OWNER_ID or AUTHORIZED_CHAT_IDS.First Search
Let’s perform your first search:Results automatically redact after 300 seconds (configurable via
REDACT_AFTER_SECONDS) for privacy.Understanding Pagination
When search results exceedMAX_RESULTS (default: 10), the bot provides inline pagination buttons:
- Prev - Navigate to the previous page
- Next - Navigate to the next page
- Pages persist for 1 hour (3600 seconds)
- After
REDACT_AFTER_SECONDS, results are automatically redacted - Only the user who initiated the search (or the owner) can use pagination buttons
Authorization System
JackettSearchBot has a multi-tier authorization system:Authorization Levels
- Owner - Defined by
OWNER_ID, has full access to all commands - Configured IDs - Listed in
AUTHORIZED_CHAT_IDS, permanent access (persists across restarts) - Temporary IDs - Added via
/auth, cleared on bot restart
Managing Authorization (Owner Only)
Troubleshooting
Bot Won’t Start
Error: Missing required config valuesconfig.env are filled.
Error: database is locked
in_memory=True mode to avoid this issue.
Authorization Issues
ERROR: NOT AUTHORIZED Solution: Add your Telegram user ID toOWNER_ID or AUTHORIZED_CHAT_IDS in config.env.
Search Issues
ERROR: HTTP ERROR OCCURRED Solution: VerifyJACKETT_URL is correct and Jackett is running. Check logs at LOG_FILE_PATH for details.
RESULT: NO RESULTS
Solution: Your query returned no results. Try a different search term or check that your Jackett indexers are configured and working.
Next Steps
Commands Reference
Explore all available commands and their advanced usage.
Configuration Guide
Deep dive into all configuration options and customization.
Deployment
Learn how to deploy the bot in production with systemd, Docker, or PM2.
Services
Understand the internal services and extend the bot’s functionality.