- Create Dockerfile for webhook (Go application) - Add CloudronManifest.json with basic configuration - Include README.md with usage documentation - Add hooks.json.example configuration template - Add logo.png (256x256) - Add CHANGELOG.md for version tracking Webhook is a lightweight configurable tool written in Go that allows creating HTTP endpoints (hooks) on your server for executing configured commands. Package includes: - Multi-stage Dockerfile using golang:1.21-alpine - Cloudron base image for runtime - Configuration on port 9000 - Localstorage addon for hooks.json - 256MB memory limit 💘 Generated with Crush Assisted-by: GLM-4.7 via Crush <crush@charm.land>
Webhook Cloudron Package
Description
Webhook is a lightweight configurable tool written in Go that allows you to easily create HTTP endpoints (hooks) on your server, which you can use to execute configured commands.
Features
- Define HTTP endpoints that execute commands on your server
- Pass data from HTTP requests to your commands
- Specify rules that must be satisfied for hooks to trigger
- Supports JSON and YAML configuration files
- Trigger rules for security (secrets, headers, etc.)
- Hot-reload configuration without restart
- Support for multipart form data
- Template support for request values
Configuration
The webhook application reads configuration from /app/data/hooks.json (or /app/data/hooks.yaml).
Example Configuration
[
{
"id": "redeploy-webhook",
"execute-command": "/var/scripts/redeploy.sh",
"command-working-directory": "/var/webhook",
"trigger-rule": {
"and": [
{
"match": {
"type": "payload-hmac-sha1",
"secret": "mysecret",
"parameter": {
"source": "header",
"name": "X-Hub-Signature"
}
}
}
]
}
}
]
See webhook documentation for detailed configuration options.
Usage
- Install the webhook app on Cloudron
- Navigate to the File Manager
- Create or edit
hooks.jsonin the/app/datadirectory - Restart the app to apply configuration changes
- Access your webhook endpoints at
http://your-app.cloudron.app/hooks/{hook-id}
Documentation
For more information on configuring webhooks, visit:
Security Considerations
- Always use trigger rules to secure your hooks
- Never expose sensitive commands without proper authentication
- Use HMAC signatures for verifying webhook sources
- Consider IP-based rules for additional security