Connect DeepSeek Harness to Telegram: dsh-im tutorial
Connect Telegram to local DSH with the community dsh-im plugin. Choose Desktop, npx or global CLI instructions, then verify binding, a read-only task and access restrictions.
On this page
Complete a read-only task in a local test folder, then install the plugin using the path that matches your setup and connect the platform. First-task guide →
Step 1 — install dsh-im using your installation method
Choose only the route matching your existing installation. Check plugin/Harness compatibility and use the same active Web profile. Do not enable LAN access just to install a plugin.
If your build's in-app plugin manager lists @xmanrui/dsh-im, check compatibility, install it and restart. If the entry is missing, consult the Desktop README for your version; this page has no installation test for that build. To continue with this guide, follow the Web UI plugin setup to create a separate Web profile, then use the npx steps below. This starts a separate Web UI.
I start DSH with npx (no global dsh command)
Keep the same npx prefix as the installation guide. Check the version, install the plugin, then restart:
npx @deepseek-ai/dsh --version
npx @deepseek-ai/dsh plugin --profile web add -w @xmanrui/dsh-im
npx @deepseek-ai/dsh webRun one command at a time. If you previously pinned @version after the package name, use that same version in all three commands. Do not mix versions while troubleshooting.
I have the global CLI and dsh is available
Use this route only if dsh --version succeeds:
dsh --version
dsh plugin --profile web add -w @xmanrui/dsh-im
dsh webIf dsh is not found, use the npx route above rather than changing system permissions.
Testing unreleased source code (advanced)
Normal installation does not need this route. The author provides the command below for source builds. It downloads and builds a Git dependency; inspect the source and build scripts before executing it.
npx -y github:xmanrui/dsh-im installAfter installation and restart, open Settings → IM Bot and confirm the platform card appears in the active profile.
Step 2 — connect Telegram
Create a Telegram bot, then enter its credentials in the Telegram card in your local DSH app.
- Open @BotFather, send
/newbot, and choose the display name and username. - Copy the token returned by BotFather into local DSH settings. Do not publish it or include it in screenshots.
- Obtain your numeric user ID using the steps below. Save
private-allowlistaccess mode and enter that number in this bot card's private-user allowlist. A username cannot replace it. - Save the settings and connect, then send /start in a private chat and complete the read-only check in Step 3. Keep public groups disconnected until the allowlist is saved.
How do I obtain my numeric Telegram user ID?
- Use a new test bot. Stop it in DSH and close other polling programs using the same token.
- Send
dsh-id-checkto this bot in a Telegram private chat. - Download the local script below. It requires Node.js 22 or later. Run the command from its download directory and enter the Bot Token at the prompt; input is hidden and is not written to a file.
- Copy the returned
Telegram user IDinto the card's user allowlist, save and reconnect, then test/status. The script only reads the official Bot API; it stops if a webhook exists and never removes it.
Download the user-ID lookup script ↓
node get-telegram-user-id.mjsNode.js is required for this helper, not for Desktop installation itself. If the test message is missing, confirm the bot and stop other polling before sending the test text again. getUpdates
Step 3 — verify a read-only task and access restrictions
In the bot card, select a test folder containing no secrets and a configured model. The bot's workspace is saved separately and may differ from the current Web conversation.
In the Telegram DM with the bot, send the following messages one at a time, waiting for each reply.
/status /new List the file names in the current workspace's root directory. Do not modify any files.
/statuschecks connection status; it does not prove the model can execute a task./newunbinds the chat from its old session without deleting that session. The next normal message creates a new session.- Open the new DSH session and its tool log. Check that the workspace path and file names match the local test folder and that no files were modified.
- When an allowlist is configured, use another test account you control that is not authorized and confirm a harmless message cannot trigger a task. Do not contact unrelated users for testing.
The connection responds, the workspace and file list are correct, no files change, and access restrictions work. A /status reply alone is not a complete pass.
Telegram troubleshooting
The IM Bot page is missing
Confirm the plugin is installed in the active profile. Restart DSH Desktop, or restart the Web UI with the same CLI prefix used during installation, then open Settings → IM Bot.
The card stays offline
Check the bot token, local connectivity to the Telegram Bot API, and whether another bot process is already running.
Messages arrive but the task has no reply
Send /status, then check the model, workspace, Agent Preset and tool permissions directly in local DSH. Remove credentials before sharing logs.
getUpdates receives no messages
Check for an existing webhook or another polling process. Telegram getUpdates and webhooks cannot consume updates simultaneously. Identify the existing integration before removing its webhook.
Security
- Bot tokens are sensitive credentials. Never commit them to Git, publish screenshots of them, or share them in group chats. Revoke or replace exposed credentials on the relevant platform.
- Start with a workspace without production secrets and keep access minimal. IM messages can trigger local file access, commands and tools.
- dsh-im is a community plugin, not an official integration from each messaging platform. Review its README, compatibility and changelog before upgrades.
Pinned dsh-im README, Channel source, Platform documentation, Desktop README
Reference snapshot: 35f7e790. The content update date does not mean an installation was re-tested. Follow the README for your installed version when its interface differs.