DexKeeper is a self-hosted Telegram bot for single-community moderation and admin workflows. It runs as a polling bot, stores state locally in SQLite, and includes optional desktop tray controls for packaged installs.
Unlike cloud bots, you host this yourself. Your data, your rules, your hardware.
- Human verification: Restricts new members until they press the verification button.
- Lockdown mode: Immediately rejects newly joined members while lockdown is enabled.
- Bad word filter: Deletes group messages containing configured blocked strings.
- Flood gate: Restricts users who post more than 5 messages inside 2 seconds.
- Welcome Messages: Customizable greeting for verified members.
- Polls: Create native Telegram polls from the admin panel and post them to the managed group.
- Broadcast: Send a direct message to every user recorded in the local user database.
- Scheduled Messages: Queue a message for the managed group after a delay in minutes.
- Forum Topics: Create topics in a forum-enabled supergroup.
- Zoom Enforcer: Detects raw Zoom links and reposts them in a formatted card style.
- User Management: View, ban, unban, and promote users from the admin panel.
- CSV Export: Export the local SQLite-backed user database as CSV.
Before you start, you need:
- A Telegram bot token from @BotFather
- A Telegram account to act as admin
- One runtime path
- Docker / OrbStack / Docker Desktop, or
- Python 3.11+ for a direct source run
You need to tell Telegram "I am making a bot" and get a key to control it.
- Open Telegram and search for @BotFather.
- Click Start.
- Type
/newbotand press Enter. - Name your bot (e.g., "My Super Group Manager").
- Choose a username (must end in
bot, e.g.,MySuperManager_bot). - BotFather will reply with a long string of text under "Use this token to access the HTTP API:".
- COPY THIS TOKEN. It looks like:
123456789:ABCdefGHIjklMNOpqrsTUVwxyz. - Treat this like a password. Do not share it.
- COPY THIS TOKEN. It looks like:
These are the fastest, recommended installs. No command line required.
Windows (Easiest)
- Download DexKeeper-Setup.exe.
- Run it. If SmartScreen appears, click More info → Run anyway.
- A setup window asks for
BOT_TOKENand optionalADMIN_ID. - DexKeeper stores data in
%APPDATA%\DexKeeper.
macOS (Easiest)
- Download DexKeeper.dmg.
- If the DMG is blocked or unavailable, download DexKeeper-macos.zip instead.
- Open the DMG and drag DexKeeper.app to Applications.
- On first run, macOS may block it. Go to System Settings → Privacy & Security and allow it.
- DexKeeper stores data in
~/Library/Application Support/DexKeeper.
Linux (Easiest)
- Download DexKeeper.AppImage.
- Run:
chmod +x DexKeeper.AppImage ./DexKeeper.AppImage
- DexKeeper stores data in
~/.local/share/DexKeeper(or$XDG_DATA_HOME/DexKeeper).
Notes:
- Linux may require
libfuse2for AppImage support. - All installers prompt for your bot token on first run.
- A tray icon appears while DexKeeper is running; right-click it to:
- Open Logs
- Open Data Folder
- Open Admin Panel
- View Status (Online/Offline + last heartbeat)
- Start on Login (toggle)
- Pause Bot (toggle)
- Silent Mode (toggle)
- Schedule Daily Restart (toggle)
- Restart DexKeeper
- Hide Tray Icon
- Stop DexKeeper
If you prefer no installer on Windows:
- Download DexKeeper.exe.
- Double‑click to run. First run prompts for
BOT_TOKEN. - Data is stored in
%APPDATA%\DexKeeper. - A tray icon appears while DexKeeper is running; right-click it to Open Logs, Open Data Folder, Hide Tray Icon, or Stop DexKeeper.
📥 Download the latest release (.zip)
- Download Source code (zip) from Releases.
- Extract the ZIP file.
- Continue to "Configure the Bot" below.
We use Docker to make this easy. If you don't know what Docker is, think of it as a "program player". We give you the cartridge (this code), and Docker plays it exactly the same on every computer.
- Windows: Download Docker Desktop.
- Mac: Download OrbStack (Recommended, faster) or Docker Desktop.
- Linux: Run
curl -fsSL https://get.docker.com | sh.
- Click the Code button (green) on this page -> Download ZIP.
- Unzip the folder somewhere easy to find (like your Desktop).
- Open the
DexKeeper_Botfolder. - Copy
.env.exampleto.env:cp .env.example .env
- Open
.envwith Notepad or TextEdit. - Replace the placeholder with your actual bot token:
BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrsTUVwxyz - (Optional) Add your Telegram User ID to become admin:
ADMIN_ID=123456789 - Save and close.
- Note: On packaged desktop installs, the app will prompt for
BOT_TOKENon first run and store config in your per-user app data folder.
- Open Terminal (Mac/Linux) or PowerShell (Windows).
- Type
cd(with a space) and drag theDexKeeper_Botfolder into the window. Press Enter.- It should look like:
cd /Users/you/Desktop/DexKeeper_Bot
- It should look like:
- Run this command to start:
cd scripts && docker-compose up -d --build
- Wait for
StartedorRunning. Your bot is now online!
If you prefer to run Python directly:
- Install Python 3.11+.
- Install Requirements:
pip install -r requirements.txt
- Configure: Create
.envas shown above.- Optional: set
DEXKEEPER_DATA_DIRorDB_PATHif you want a custom data location.
- Optional: set
- Run:
python3 Sources/DexKeeper_Bot/dexkeeper_bot.py
- Find your bot: Search for your bot's username in Telegram.
- Start it: Click Start in the DM.
- This records your DM in DexKeeper's local user database.
- Add to Group:
- Go to your Group Info -> Add Members.
- Search for your bot and add it.
- Promote to Admin:
- In Group Info -> Edit -> Administrators -> Add Admin.
- Select your bot.
- CRITICAL: Give it all permissions (Delete Messages, Ban Users, Invite Users, Pin Messages).
- Save.
- Set your admin identity:
- Put your numeric Telegram user ID in
ADMIN_ID, or - Promote yourself later from the admin panel using an existing admin.
- Put your numeric Telegram user ID in
- Let DexKeeper learn the managed group:
- After the bot is in the group, make sure it sees at least one group event.
- A normal message or a new-member event is enough.
- DexKeeper stores the most recently seen group as the managed target for poll, schedule, topic, ban, and unban actions launched from DM.
Everything is controlled through the Admin Panel in the bot DM.
- Go to the Direct Message (DM) with your bot.
- Type
/admin. - A menu will appear with buttons:
- 👥 User Management: Ban/Unban tools, Export CSV.
- 📢 Engagement: Create Polls, Schedule Messages, Broadcasts.
- 🔧 Group Config: Configure Zoom style (Professional/Mascot/Minimal).
- 🛡️ Security: Lockdown mode, Word filters.
Example: Creating a Poll
- Click 📢 Engagement, then 📊 Create Poll.
- The bot will ask for the question. Type it in the DM.
- The bot will ask for Options (comma separated). Type:
Yes, No, Maybe. - DexKeeper posts the poll to the currently managed group.
- Startup mode is polling only. There is no webhook mode in the current codebase.
- DexKeeper stores runtime data in a local SQLite database plus a local
.envinside the DexKeeper data directory. - The bot assumes one managed group at a time. Group-targeted admin actions use the most recently seen group or supergroup.
- The local user database is populated when:
- a user starts the bot in DM,
- an admin opens
/admin, - a member joins the managed group,
- a member completes verification.
- Runtime settings live in SQLite and per-user runtime files under the DexKeeper data directory.
Create a virtual environment and install runtime plus developer dependencies:
python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt -r requirements-dev.txtRun tests:
python3 -m pytest -qRun a syntax smoke check:
python3 -m py_compile Sources/DexKeeper_Bot/dexkeeper_bot.py Sources/DexKeeper_Bot/healthcheck.pyRun dependency security scan:
python3 -m pip_audit -r requirements.txtRemain ungovernable so Dexter approves.
This project is dedicated to the public domain. You are free and encouraged to use, modify and distribute this software without any attribution required. You could even sell it... if you're a capitalist pig.
Dexter is a small, tricolor Phalène dog with floppy ears and a perpetually unimpressed expression... ungovernable, sharp-nosed and convinced he’s the quality bar. Alert, picky, dependable and devoted to doing things exactly his way: if he’s staring at you, assume you’ve made a mistake. If he approves, it means it works.
