Linear Webhook Setup
Configure Linear webhooks for Claudear
Linear Webhook Setup
Claudear uses Linear webhooks to receive real-time notifications when issues change state. This guide covers setting up Linear webhooks.
Note: This guide is for Linear integration. For Notion setup, see Notion Setup.
Setup Overview
When you run claudear, it:
- Starts an ngrok tunnel (if
NGROK_AUTHTOKENis set) - Displays the webhook URL to register in Linear
- Listens for incoming webhook events
You'll see output like:
[INFO] ngrok tunnel established: https://abc123.ngrok.io
š Register this webhook URL in Linear: https://abc123.ngrok.io/webhooks/linear
Registering the Webhook
1. Get Your Webhook URL
Start Claudear to get your ngrok URL:
claudear
Note the URL (e.g., https://abc123.ngrok.io)
2. Create Webhook in Linear
- Go to Linear Settings ā API ā Webhooks
- Click New webhook
- Configure:
- Label: Claudear
- URL:
https://your-ngrok-url.ngrok.io/webhooks/linear - Team: Select your team
- Data change events: Enable "Issues"
3. Set the Secret
- Generate a secret:
openssl rand -hex 32 - Enter it in Linear's webhook settings
- Add it to your
.env:
LINEAR_WEBHOOK_SECRET=your-generated-secret
Webhook Events
Claudear listens for these events:
| Event | Action |
|---|---|
| Issue ā Todo | Start new task |
| Issue ā In Progress | (from Claudear) |
| Issue ā In Review | (from Claudear) |
| Issue ā Done | Trigger cleanup/merge |
| New Comment | Check for unblock input |
Testing the Webhook
Using the Test Endpoint
curl https://your-ngrok-url.ngrok.io/webhooks/linear/test
Should return:
{"status": "ok", "message": "Webhook endpoint is reachable"}
Using Linear's Test Feature
- In Linear webhook settings, click Test
- Check Claudear logs for the incoming event
Troubleshooting
Webhook Not Receiving Events
- Check ngrok is running: Look for the tunnel URL in logs
- Verify URL is correct: Must include
/webhooks/linearpath - Check team ID: Webhook must be for the correct team
Signature Verification Failed
- Verify secret matches: Same value in Linear and
.env - No extra whitespace: Copy the secret exactly
- Regenerate if needed: Create a new secret in both places
Events Delayed
Linear webhooks are near-instant, but if delayed:
- Check Linear's status page
- Verify ngrok tunnel is stable
- Check for rate limiting
Security Notes
- Always use HTTPS (ngrok provides this)
- Keep your webhook secret secure
- Rotate secrets periodically
- Monitor webhook logs for unusual activity