Rocket.Chat Notifications for Server Updates - Self-Hosted Chat Integration
Update-Watcher sends server update notifications to Rocket.Chat channels using incoming webhooks. Rocket.Chat is a self-hosted, open-source team communication platform with a rich feature set. The webhook integration requires minimal setup and supports customizable bot names and target channels, allowing you to keep update notifications organized within your existing team communication.
Setup on Rocket.Chat
Step 1: Enable Incoming Webhooks
An administrator must enable incoming webhooks on the Rocket.Chat instance:
- Go to Administration (click the three-dot menu -> Administration or Workspace -> Settings).
- Navigate to Integrations.
- Ensure incoming webhooks are enabled.
Step 2: Create an Incoming Webhook
- In the Administration panel, go to Integrations.
- Click New Integration and select Incoming WebHook.
- Fill in the details:
- Enabled: Toggle on.
- Name: Update Watcher
- Post to Channel: Select the target channel (e.g.,
#server-updates). - Post as: Choose a username for the bot or leave it to be overridden by the payload.
- Click Save Changes.
- Scroll down to find the Webhook URL and copy it. It looks like
https://rocketchat.example.com/hooks/xxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyy.
Step 3: Store the Webhook URL
Store the webhook URL in an environment variable:
export UPDATE_WATCHER_ROCKETCHAT_WEBHOOK="<your-rocketchat-webhook-url>"Configuration Options
| Option | Required | Default | Description |
|---|---|---|---|
webhook_url | Yes | – | Rocket.Chat incoming webhook URL. Use an environment variable reference. |
channel | No | – | Override the default channel set in the webhook configuration. Use the channel name with # prefix (e.g., #server-updates) or a username with @ prefix for direct messages. |
username | No | Update Watcher | Display name for the bot when posting messages. Overrides the default set in the webhook configuration. |
Configuration Example
notifiers:
- type: rocketchat
webhook_url: ${UPDATE_WATCHER_ROCKETCHAT_WEBHOOK}
channel: "#server-updates"
username: "Update Watcher"Minimal Configuration
notifiers:
- type: rocketchat
webhook_url: ${UPDATE_WATCHER_ROCKETCHAT_WEBHOOK}Message Format
Rocket.Chat notifications use Markdown formatting and include:
- Header – Server hostname and update summary in bold text.
- Checker sections – Each checker with available updates is listed with its name as a bold heading, followed by package names with current and available versions.
- Security labels – Security updates are marked with a distinct text label for quick identification.
- Attachments – Colored attachment bars may be used to differentiate regular updates from security-critical ones.
Rocket.Chat’s Markdown renderer ensures clean formatting on desktop, mobile, and web clients.
Channel Override
When the channel option is set, notifications are posted to the specified channel instead of the default one configured in the webhook:
- Use
#channel-namefor public or private channels. - Use
@usernameto send a direct message. - The webhook must have permission to post to the target channel.
Testing
Run Update-Watcher to verify the Rocket.Chat notification:
update-watcher runCheck the configured Rocket.Chat channel for the notification. If no updates are available and send_policy is only-on-updates, temporarily set send_policy: "always" to force a notification.
For troubleshooting:
update-watcher run --verboseA successful delivery returns HTTP status 200 OK from the Rocket.Chat webhook endpoint. Common errors include a disabled integration (403) or an incorrect webhook URL (404).
send_policy: "always" in your configuration to force a notification and verify the integration is working.Related
Receive update notifications for APT, Docker, WordPress, and 11 more checkers.