An inspection with a one-hour deadline is of little use if the message about it sits in a mailbox nobody is checking right now, or if push does not reach the device. That is why there is a third channel alongside email and push: Telegram. This post explains how you connect, how you set the volume, and what the operator of an instance has to do for it. It also includes an honest account of what runs over third-party servers with Telegram.
How Telegram works here
There is exactly one bot per instance. It is not a user's account but the sender through which the instance delivers messages. Each person connects their own Telegram to this bot, and from then on their notifications also arrive in the chat with the bot. Subs and keyholders proceed the same way.
Telegram is optional. Whether the channel is available on your instance at all is decided by the instance operator, because only they can set up the bot. More on that below.
For users: connecting Telegram
This applies as soon as the Telegram section shows up in your settings. If it is missing, the instance has no bot.
- Open settings and tap “Connect with Telegram” under “Telegram”.
- Telegram opens through a personal one-time link of the form
t.me/<bot>?start=…. Tap “Start” there. - The bot confirms in the chat, and settings show “Telegram is connected.”.
The link is only valid for a short time. If you wait too long it expires or becomes invalid; simply start connecting again in settings.
You can disconnect at any time with “Disconnect Telegram”, in the same place. If you block the bot in Telegram, the app disconnects by itself and settings point this out. To reconnect you then need a new link.
Telegram messages appear in your account language, the same language as the interface, mails and push.
Volume per channel
You set mail, push and Telegram separately, each to one of three levels:
- Everything: you get every notification through this channel.
- Important only: just the important messages, the rest stays off.
- Off: this channel stays silent.
For Telegram, “Everything” is the default. If you are tired of the flood of mail but check Telegram on your phone all day anyway, you can set mail to “Important only” and leave Telegram on “Everything”. The reverse works just as well.
Messages with a deadline always get through
Setting a channel to “Off” must not let an inspection lapse unnoticed. So for messages with a deadline, such as inspections and requests, the rule is: if no enabled channel is reachable, the message goes to every channel that can deliver it. Someone who has switched all channels off still receives a message with a deadline, as long as some route is open.
In addition, everything stays in the app inbox. Push, mail and Telegram deliver; the inbox keeps. How the inbox is meant to work is covered in the manual for subs.
For operators: setting up the bot
The bot belongs to the instance and is set up by the operator. Whoever self-hosts is that operator. It is not a big job, but it consists of several steps that have to happen in the right order.
1. Create the bot. Message @BotFather in Telegram and create a new bot. You get a token and choose the bot name.
2. Set the environment variables. In the instance's .env:
TELEGRAM_BOT_TOKEN=<token>
TELEGRAM_BOT_USERNAME=<bot-name-without-@>
TELEGRAM_WEBHOOK_SECRET=<random-string>
The webhook secret is a random string you generate yourself, for example with openssl rand -hex 32. The bot name is written without the leading @.
3. Register the webhook. Once, so that Telegram can tell the server when someone taps “Start”:
curl "https://api.telegram.org/bot<TOKEN>/setWebhook?url=https://yoursub.chastitytracker.ch/api/telegram/webhook&secret_token=<SECRET>"
<TOKEN> and <SECRET> are the values from steps 1 and 2, and the address is your instance's.
4. Restart the container. With docker compose up -d, so the new variables take effect.
Two things are good to know. Without a webhook secret the endpoint rejects everything. And without a token and bot name the Telegram section stays invisible in settings and nothing is sent, which makes that the safe starting state. The instance's other variables are listed in Self-Hosting Chastity Tracker with Docker.
And in the portal?
The portal does not set up a Telegram bot automatically. Portal instances run as a free goodwill service on trublue's server, with no guarantee and no data control of your own. The Telegram section only appears there if the instance operator has stored a bot, and whether that happens is no commitment. Anyone who wants to rely on Telegram sets up the bot themselves when self-hosting.
Privacy: what runs through Telegram
This belongs to the decision. The text of a notification is handed to Telegram and passes through their servers. Telegram is a third-party provider; the data is therefore no longer only on the server the instance runs on. A bot chat is also not end-to-end encrypted.
In practice that means Telegram can see what a message says. Anyone who does not want that leaves Telegram off and uses mail and push, or sets Telegram to “Important only” or “Off”. It is a plain trade-off, and it is yours to make. How the instance itself handles data is described in the privacy policy.
In short
As a user: settings, “Connect with Telegram”, tap “Start”, done. After that you choose the level per channel, and messages with a deadline reach you even if you have switched everything off. As an operator: bot at @BotFather, three variables, register the webhook once, restart the container. And in every case: the message text passes through Telegram's servers.