Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dbdock.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Slack alerts use incoming webhooks — the simplest Slack integration. No app installation required for the user side; just a webhook URL.

Setup

1

Create a Slack app

Go to api.slack.com/apps and click Create New App → From scratch. Name it “DBdock” (or whatever you like) and pick your workspace.
2

Enable incoming webhooks

In the app settings, go to Incoming Webhooks and toggle it on.
3

Add the webhook to a channel

Click Add New Webhook to Workspace. Pick the channel where alerts should post (e.g. #backups or #ops-alerts). Slack generates a webhook URL.
4

Copy the URL

The URL looks like https://hooks.slack.com/services/T.../B.../.... Copy it.

Configuration

dbdock.config.json

{
  "alerts": {
    "slack": {
      "enabled": true
    }
  }
}

.env

DBDOCK_SLACK_WEBHOOK=https://hooks.slack.com/services/T.../B.../...
Alternatively, set the webhook in the config (less recommended):
{
  "alerts": {
    "slack": {
      "enabled": true,
      "webhookUrl": "https://hooks.slack.com/services/T.../B.../..."
    }
  }
}
The .env approach is preferred — keeps the URL out of version control.

Message format

Slack messages look like:

Success

✓ Backup complete Database: myapp Size: 45.2 MB (compressed) Duration: 8.4s Storage: s3://my-backups/dbdock_backups/backup-...sql

Failure

✗ Backup failed Database: myapp Error: Connection timeout Timestamp: 2026-04-16 08:00:02 Tip: Check database is reachable from the runner

Testing

npx dbdock test
Sends a test message to the channel. Verify it arrives and looks right.

Routing

Alerting strategy

  • #backups — all events (success + failure)
  • #ops-alerts — failures only (separate webhook, separate app instance)
DBdock supports one webhook per environment. For multiple channels, run separate DBdock configs (dev, staging, prod) with different webhook URLs.

Channel permissions

The webhook can only post to the channel it was created for. To change channels, create a new webhook and update DBDOCK_SLACK_WEBHOOK.

Common issues

Webhook URL is correct but Slack rejected the message. Usually a transient issue — retry.
The channel was deleted, or the webhook was revoked. Recreate the webhook.
If you see raw JSON or unformatted text, your Slack workspace may have legacy incoming webhooks (pre-2019). Recreate the app from scratch.

Security

  • The webhook URL is a secret — anyone with it can post to the channel
  • Store it in .env, never commit it
  • Rotate webhooks periodically (Slack dashboard → Incoming Webhooks → regenerate)
  • If accidentally committed, revoke it immediately

See also

Email alerts

SMTP-based alerts.

Custom webhooks

Discord, Teams, and custom endpoints.