TELEGRAM BOT · FORUM TOPICS · MINI WEB APP
Control your agents.
Right from Telegram.
Your @BotFather bot Mini Web App (live ANSI UI) Forum Topics (1 card = 1 topic)
Run a private local Telegram worker on your Omarchy PC using your own bot token, and open the full live-themed Telegram Mini Web App via Tailscale Serve. Zero third-party relay servers, zero open ports — works behind NAT and on headless machines.
Included in SUPER DESKTOP · Outbound HTTPS long-polling · No public IP or port forwarding
USAGE & SETUP SCREENS
What it looks like on Telegram and on your PC.
Switch between a live 2-member Forum Topics group in Telegram and the desktop Settings → Telegram screen where you pair your account and control permissions.
Linked to card sd_term_1
~/super-desktop · Status: ◌ WAITINGLinked to card sd_term_2
~/GitHub/api-server · Status: ● WORKINGLinked to card sd_term_3
~/GitHub/web-app · Status: ✓ FINISHED1. Telegram bot
Create a bot with @BotFather, paste its token below, and verify directly against Telegram's API.
api.telegram.org as @my_superdesktop_bot.
2. Account pairing
Only one Telegram user ID can control this PC. Every link is single-use and needs desktop approval.
Paired with Owner (@you) · ID 123456789
482 9153. Forum Topics & Mini Web App
1-card-1-topic mode inside a private 2-member supergroup. Linked: My PC Agents.
https://*.ts.net:8443 live ANSI UI.4. Permissions (safe defaults)
/screen, /history, and 📎 Files.Illustrative previews of the live Forum Topics workspace and the PC Settings → Telegram screen (sample session data).
CAPABILITIES
What you can do from Telegram.
Everything runs locally inside a dedicated super-desktop telegram-bot child process supervised by the daemon — whether the overlay is hidden, open, or running headless.
Live Dashboard + 1 card = 1 Topic
A pinned General dashboard shows every card plus provider Usage limits. Each running card gets its own color-tagged topic with a live status header and typing… indicator while working.
Live statuses & quiet 👍 acks
Pinned headers and the General dashboard update live status dots (🟢 🟡 ✅ 🔴 ⚪ ⚫) silently in place with zero topic-rename service spam, while prompts in Forum Topics acknowledge with a clean 👍 reaction.
Instant Done reports & live output
When a harness finishes, a concise ✅ Done output summary arrives right in chat (final assistant reply or cleaned terminal result without TUI chrome). Tap 📺 Live (/live) while running for an auto-updating stream.
Files, PDF pages & text pager
📎 Files (/files) filters Images, Docs, and Links with pagination, sends photos directly, previews PDF pages as images, pages long redacted text files inline, and opens public URL buttons.
Quick Keys & slash shortcuts
Tap ⌨ Keys (/keys) for Yes, No, 1–3, arrows, Tab, ⇧Tab, Esc, Ctrl-C, and agent shortcuts like /resume, /compact, and /clear.
Bounded screen & history
Inspect live screen state with /screen or scrollback with /history. ANSI escapes are stripped and secrets masked before leaving your PC.
Launch & close sessions
Start new agents in remembered project folders using /new's 2-step inline keyboard wizard, or close finished cards cleanly with /close + confirmation.
Send photos, files & voice
Drop a screenshot, document, or voice clip directly into a card's topic — staged privately outside workspaces, never saved to random repos.
Telegram Mini Web App (Tailscale)
Tap ⚡ Open App (or /app) for an Android-like WebSocket ANSI terminal, Weekly Usage bars, Quick Keys, and interactive Files & Previews over private tailscale serve.
Zero ports, headless-ready
Uses outbound HTTPS long-polling to api.telegram.org. Combine with Settings → System launch to control a PC with no display logged in.
STEP BY STEP
Setup in five steps (with screenshots).
Takes about two minutes. You stay the sole owner of your bot token, your Telegram pairing, your Tailscale URL, and every permission switch.
Telegram Create your own bot via @BotFather
- Open Telegram and message the official verified
@BotFatherbot with/newbot. - Pick a display name (for example
My Super Desktop) and a unique username ending inbot(for examplemy_superdesktop_bot). - Copy the HTTP API token (looks like
123456789:ABC...) and keep it private.
Privacy note: Leave @BotFather Group Privacy Mode enabled — promoting the bot to Admin in your private 2-member Forum group already lets it receive messages in topics.
PC Save the token, enable the bot, and pair your account
- Press Super + Shift + Q → open ⚙ Settings → Telegram.
- Under Bot setup (BYOB), paste your
@BotFathertoken, click Save & verify (checksapi.telegram.org/getMe), and switch Enable Telegram bot on until the greenRunningchip appears. - Under Account pairing, click Pair Telegram account to generate a single-use QR code and
t.me/<bot>?start=…invite link. - Scan or tap the link in Telegram, hit Start, confirm the 6-digit comparison code matches on both screens, and click Approve on your PC. Access locks to your numeric Telegram
user_idonly.
0600), QR/deep link expires after 5 minutes, and desktop approval verifies the 6-digit code.Telegram Link a 2-member Forum Topics supergroup (recommended)
- In Telegram, create a new private group and add only your bot (2 members max — if any third person is in the group,
/linkforumrefuses to link). - Open Group Info → Edit → Topics → Enable so topics are turned on.
- Open Administrators → Add Admin → select your bot and turn on Manage Topics, Delete Messages (to remove closed cards’ topics), and Pin Messages (so each topic can silently pin its live status card and delete closed card topics cleanly).
- Open the group's General topic and send
/linkforum. SUPER DESKTOP pins a live Dashboard in General and spawns one color-tagged topic per running card — with zero status-rename spam and automatic ✅ Done output reports as soon as a turn finishes.
PC Choose your permissions
By default, only Notifications and Redact common secrets start enabled. Turn on only the controls you want from Telegram — changes take effect immediately without restarting cards:
- Enable Read terminal output to receive full ✅ Done result summaries,
Waitingsnippets,/screen,/history,/live,📎 Files, and the Mini Web App terminal. - Enable Submit prompts and Control keys to reply directly from topics, approve prompts with
Yes/No, or send interrupts.
.env secrets, and PEM keys before sending.Phone Open the Mini Web App or message any topic
- Turn on Tailscale on your phone (if using the Mini Web App below) and tap ⚡ Open App or send
/appin your 1:1 bot chat. - Or jump into your linked Forum group: tap any topic, reply directly to steer that harness, tap inline Quick Keys, or check
/usagein General.
OPTIONAL · PRIVATE TAILNET UI
Telegram Mini Web App via Tailscale.
Want a full Android-like experience right inside Telegram — live colored ANSI terminal over WebSocket, automatic live Omarchy theme syncing (dark & light), weekly allowance meters, swipeable Quick Keys, and interactive image/PDF/code previews? Serve the embedded UI on 127.0.0.1:7789 and wrap it privately inside your own Tailscale tailnet using tailscale serve (never public Funnel).
A−/A+ font sizing, swipeable Yes/No/1/2/↑/↓/Tab Quick Keys, and attachment uploads.
Use this prompt to setup
Paste this prompt into Claude Code, Codex, OpenCode, Antigravity, Grok, or any AI coding agent on your Linux PC to configure Tailscale Serve and enable the Mini Web App safely without exposing any tokens.
Configure the SUPER DESKTOP Telegram Mini Web App on this Linux PC using Tailscale Serve (never Tailscale Funnel).
Rules:
- Never print, echo, or commit my bot token (`botToken`) or any secrets from config.json.
- Use `tailscale serve` (private to my tailnet only), never `tailscale funnel`.
- Keep all existing Telegram settings (`enabled`, `botToken`, `allowedUser`, `forum`, `permissions`) intact.
Steps:
1. Check Tailscale status with `tailscale status --json` and ensure it is Running with a `Self.DNSName`.
- If MagicDNS or HTTPS Certificates are disabled, stop and tell me what toggle to enable in https://login.tailscale.com/admin/dns.
2. Expose only SUPER DESKTOP's local loopback Mini App server privately via Tailscale Serve:
`tailscale serve --bg --https=8443 http://127.0.0.1:7789`
and record `URL="https://<DNSName_without_trailing_dot>:8443"`.
3. Inspect `${XDG_STATE_HOME:-$HOME/.local/state}/super-desktop/telegram/config.json`:
- If the Telegram bot is not yet configured (`enabled: false` or empty `botToken` or no `allowedUser`), stop and guide me through Settings → Telegram (`@BotFather` token + account pairing) first.
- Otherwise update `config.json` atomically (`chmod 600`) to set:
`miniApp.enabled = true`, `miniApp.listenPort = 7789`, `miniApp.publicUrl = "$URL"` (preserving `miniApp.shortName` and all other fields).
4. Signal/verify the worker cleanly:
- Check `curl -fsS http://127.0.0.1:7789/health` and `curl -fsS "$URL/health"`.
- If the `super-desktop telegram-bot` process isn't listening on `127.0.0.1:7789` yet, wait a couple seconds after updating `config.json` (the daemon hot-reloads it) or restart SUPER DESKTOP with `super-desktop status`.
5. Report back concisely:
- The private Mini App `$URL`
- Whether `/health` succeeded locally and via Tailscale HTTPS
- Next steps on my phone (keep Tailscale ON, tap ⚡ Open App in 1:1 chat with the bot or run `/app`; optionally register `/newapp` in `@BotFather` and paste the short name into Settings → Telegram → Mini Web App for Forum Topic deep links).
Manual setup & optional @BotFather Forum Topic deep links
- Ensure MagicDNS and HTTPS Certificates are enabled in Tailscale Admin → DNS, and Tailscale is running on both your PC and your phone.
- Toggle Enable Telegram Mini Web App on in ⚙ Settings → Telegram, then click Auto-setup Tailscale Serve (or run
tailscale serve --bg --https=8443 http://127.0.0.1:7789) and verify yourhttps://<pc>.<tailnet>.ts.net:8443URL saves cleanly. - In your 1:1 chat with your bot, tap ⚡ Open App or send
/app(works on Android, iOS, and Telegram Desktop while connected to your tailnet). - Optional for Forum Topic buttons: Message
@BotFather→/newapp, pick your bot, register a short name (e.g.superdesktop) pointing to your Tailscale Serve URL, and paste it in BotFather short name. Every card topic and✅ Donereport gains a 📱 Open App deep link directly to that card.
409 Conflict). Simply create one @BotFather bot per machine (e.g. @sd_laptop_bot and @sd_server_bot) and group them — along with their Forum groups — into a single Telegram Chat Folder. Each machine runs independently with its own Tailscale Serve Mini App and its own live Omarchy theme.
REFERENCE
Bot commands.
In a linked Forum group, messages and commands sent inside a topic apply automatically to that topic's card. In a private 1:1 chat with your bot, use /cards or reply to any card alert.
| Command | Action |
|---|---|
/app | Open the Android-like Telegram Mini Web App (live ANSI terminal, Usage & Files) |
/cards | List active terminal cards with quick select, 📷 screen, and 📎 files buttons |
/dashboard · /usage | Show or refresh the live workspace dashboard, or view weekly allowance & progress bars for each provider |
/status | Show selected card status, model, prompt, and inline action keyboard |
/screen | Capture current terminal screen (bounded, ANSI-stripped) |
/history [N] | Capture recent terminal scrollback (20–300 lines) |
/live | Stream a live auto-updating terminal tail message while the card runs |
/keys | Open Quick Keys (↑/↓/Tab/⇧Tab/Yes/No/Ctrl-C + slash shortcuts) |
/files | Browse referenced images, PDF page previews, redacted text pages, and links |
/new | Launch a new harness card via 2-step folder → harness picker |
/close | Close the selected card on your PC after confirmation |
/ctrlc · /enter · /esc | Send interrupt, Enter, or Escape to the selected card |
/sync | Force-sync Forum Topics with live cards (and recreate unlinked/deleted topics) |
/linkforum | Bind the current 2-member Forum supergroup |
/unlinkforum | Unlink the Forum group |
/unlink | Unlink the current Forum Topic without closing its card |
/help | Show available commands and currently enabled permissions |
CONTROL
Permissions & safe defaults.
All inspection, input, launch, close, and attachment capabilities default to Off until you explicitly turn them on in ⚙ Settings → Telegram.
| Switch | Default | What it allows |
|---|---|---|
| Notifications | On | Push Finished, Waiting, and Error alerts with inline buttons |
| Redact common secrets | On | Best-effort masking of API keys, Bearer/bot tokens, .env secrets, and PEM private keys |
| Read terminal output | Off | /screen, /history, and 📎 Files / /files |
| Submit prompts | Off | Sending text prompts to AI harness cards |
| Control keys | Off | Inline/command Yes, No, 1, 2, Enter, Esc, Ctrl-C |
| Allow shell input | Off | Typing text or keys into plain Shell cards (higher risk) |
| Launch new cards | Off | /new harness launching in remembered project folders |
| Close cards | Off | Closing cards from Telegram after explicit confirmation |
| Receive attachments | Off | Staging photos, documents, and voice clips privately for harnesses |
TRUST MODEL
Private control, honest limits.
0700/0600) on your Linux machine. Nobody else can pair without physical approval of a single-use invite + matching 6-digit code on your desktop, and any Forum group with more than 2 members is refused automatically.
HELP
Troubleshooting.
| Symptom | Fix |
|---|---|
Status chip shows Stopped or Error | In ⚙ Settings → Telegram, verify the token with Save & verify, turn on Enable Telegram bot, and ensure outbound HTTPS access to api.telegram.org. |
Refused: this group has N members… | Remove everyone except you and your bot so the group has at most 2 members, then run /linkforum again. |
Promote this bot to Administrator… | In Group Settings → Administrators, make the bot Admin with Manage Topics (and optionally Pin Messages). |
| Bot replies that an action is disabled | Enable the corresponding switch under ⚙ Settings → Telegram → Permissions (for example Read terminal output for 📎 Files and /screen). |
| Old messages sent offline don't run | Messages older than ~2 minutes or queued before worker startup are ignored by design so stale commands never replay unexpectedly on wake. |