Prerequisites
- A Telegram account
- Admin access to your Dokploy organization
- Basic familiarity with Telegram bots
Creating a Telegram Bot
Start Chat with BotFather
Open Telegram and search for @BotFather (the official bot for creating bots)
Choose Bot Username
Choose a unique username ending in “bot”:Usernames must be unique across all Telegram.
Getting Your Chat ID
You need to know where the bot should send messages:For Personal Chats
For Groups
For groups, you may also need to give the bot admin privileges if you want it to send messages in groups with restricted posting permissions.
Getting Thread ID (Optional)
For Telegram groups with topics/threads enabled:Configuring Telegram in Dokploy
Enter Configuration
Provide the following details:
- Name: A descriptive name for this notification (e.g., “Production Alerts”)
- Bot Token: Paste the token from BotFather
- Chat ID: Enter the chat ID where notifications should be sent
- Message Thread ID: (Optional) Specify a thread ID for topic-based groups
Select Events
Choose which events should trigger Telegram notifications:
- Application Deploy
- Application Build Error
- Database Backup
- Volume Backup
- Dokploy Restart
- Docker Cleanup
- Server Threshold Exceeded
Test Connection
Click Test Connection to send a test message:Verify the message appears in your Telegram chat.
Configuration Schema
The Telegram notification configuration uses the following structure:Message Format
Telegram notifications from Dokploy are sent as plain text messages. The format includes:- Event Type: The type of event that triggered the notification
- Details: Event-specific information
- Timestamp: When the event occurred
- Status: Success or failure indicator
Example Notification
Using Message Threads
For Telegram groups with topics (also called threads or forums):- Enable Topics in your group settings
- Create topics for different notification types:
- “Deployments”
- “Errors”
- “Monitoring”
- Get the thread ID for each topic
- Create separate Dokploy notifications for each thread
Message threads help organize notifications in busy groups. Each notification destination can target a specific thread within a group.
Troubleshooting
Test Connection Fails
Invalid bot token- Verify the bot token is correct and complete
- Ensure you copied the entire token from BotFather
- Check that the bot hasn’t been deleted
- Verify the chat ID is correct (positive for personal chats, negative for groups)
- Ensure you sent at least one message to the bot before getting the chat ID
- For groups, verify the bot is still a member
- Start a conversation with the bot if it’s a personal chat
- For groups, add the bot as a member
- Check that the bot hasn’t been banned from the group
- Verify topics are enabled in your group
- Ensure the thread/topic still exists
- Check that the thread ID is correct (should be a positive number)
Not Receiving Notifications
Check bot permissions- Verify the bot has permission to send messages
- For restricted groups, ensure the bot has posting privileges
- Confirm the notification is enabled for the events you want to receive
- Check that events are being triggered in Dokploy
- Ensure you haven’t blocked the bot in Telegram
- Verify the bot still exists in BotFather
Best Practices
Separate Bots by Environment
Create different bots for different purposes:- dokploy_prod_bot: Production alerts only
- dokploy_staging_bot: Staging and development
- dokploy_backups_bot: Backup notifications
Use Groups for Team Notifications
For team environments:- Create a dedicated Telegram group for Dokploy notifications
- Add team members to the group
- Configure the bot to send notifications to the group chat ID
Organize with Topics
For large teams, use Telegram topics to separate:- Critical alerts
- Deployment notifications
- Backup reports
- System monitoring
Privacy Considerations
- Personal Chats: Only you receive notifications
- Groups: All group members see notifications
- Channels: Consider Telegram channels for read-only notification feeds
API Integration
Manage Telegram notifications programmatically using the Dokploy API:Security Considerations
Bot Token Security
- Never share your bot token publicly or in code repositories
- Regenerate tokens if they are exposed or compromised
- Use environment variables when storing tokens in code
Revoking Access
To revoke a bot’s access:Telegram Limits
- Message Length: 4096 characters maximum
- Rate Limit: 30 messages per second per bot
- Group Limit: Bots can be in up to 20 groups by default
- Broadcast Limit: 30 different chats per second
Dokploy respects Telegram’s rate limits and will automatically queue notifications if limits are reached.
Next Steps
Slack Notifications
Set up Slack webhook integration
Discord Notifications
Configure Discord webhooks
Email Notifications
Set up SMTP email notifications
Notification Overview
Learn about all notification options