Subdomain & Telegram Bot Configuration
Set up a custom domain for your Mobazha store and connect a Telegram Bot for your storefront Mini App.
Part A: Custom Domain Setup
For Docker Standalone Stores
If you deployed with the Docker standalone installer:
Option 1: Set domain during installation
curl -sSL https://get.mobazha.org/standalone | sudo bash -s -- --domain shop.example.com
Option 2: Add domain to an existing store
- Point your domain's DNS A record to the VPS IP address
- Wait for DNS propagation (usually 1-5 minutes)
- Run:
mobazha-ctl set-domain shop.example.com
The store automatically obtains a TLS certificate from Let's Encrypt.
For Native Binary Stores
Start (or restart) with the domain flag:
mobazha start --domain shop.example.com
DNS Setup
At your domain registrar (Cloudflare, Namecheap, GoDaddy, etc.), create an A record:
| Type | Name | Value | TTL |
|---|
| A | shop (or @) | <VPS_IP> | Auto / 300 |
If using a subdomain like shop.example.com, the "Name" field should be shop.
If using the root domain example.com, the "Name" field should be @.
Verify
After DNS propagation:
# Check DNS resolution
dig +short shop.example.com
# Check HTTPS
curl -sI https://shop.example.com | head -5
Part B: Telegram Bot Setup
Mobazha stores can be accessed as a Telegram Mini App via a Telegram Bot. This lets buyers browse and purchase directly inside Telegram.
Step 1: Create a Bot with BotFather
- Open Telegram and message @BotFather
- Send
/newbot
- Choose a display name (e.g., "My Store")
- Choose a username (e.g.,
my_store_bot) — must end with bot
- BotFather will reply with a Bot Token — save it securely
Step 2: Configure the Mini App URL
Tell BotFather where your store frontend lives:
- Send
/mybots to BotFather
- Select your bot
- Choose Bot Settings → Menu Button
- Set the URL to your store:
- SaaS store:
https://app.mobazha.org/tma?store=<your-peer-id>
- Standalone store:
https://shop.example.com/tma
Step 3: Configure the Bot in Your Store
In your store admin panel:
- Go to Admin → Settings → Telegram
- Enter the Bot Token from BotFather
- Save
This enables:
- Order notifications in Telegram
- Buyer can message you through the bot
- Mini App storefront accessible via the bot's menu button
Step 4: Set Bot Description & Photo
Back in BotFather:
- Send
/mybots → select your bot
- Edit Bot → Edit Description: describe your store
- Edit Bot → Edit About Text: short store summary
- Edit Bot → Edit Botpic: upload your store logo
Step 5: Share Your Bot
Your Telegram storefront is now live at:
https://t.me/<bot_username>
Share this link anywhere — buyers tap the menu button to open your Mini App store.
Credential Handling
- Ask for explicit user consent before connecting to any server or entering credentials
- If the user shares a BotFather token, use it only for the immediate configuration task
- Never store, log, or display credentials after use
- Remind the user to keep tokens and passwords private
- The agent must not transmit credentials to any party other than the intended target