Sinatra Docs
Self-hosting

10. Install and verify

Run the install flow for Linear and GitHub, then verify the round-trip with a test ticket.

Now that webhooks are pointed at your API, install the apps against your tenant and verify the round-trip.

1. Install Linear

Open the install flow URL in your browser:

<APP_BASE_URL>/install/linear

You'll be redirected to Linear, prompted to authorize the app against your workspace, then sent back. Sinatra creates a Tenant row keyed by your Linear organizationId.

2. Install GitHub

From the same install screen, click Connect GitHub. You'll be redirected to GitHub to install the GitHub App on your account or organization. Pick the repos you want Sinatra to work in.

3. Verify

Two ways to verify the wiring:

Option A — Trigger from a Linear ticket

  1. Create a Linear ticket in your workspace (any title and a one-line description is enough).
  2. Assign it to the agent (or @sinatra in a comment).
  3. Watch the API logs — you should see the webhook arrive, signature verify, and a Temporal workflow start.
  4. Open the Temporal UI (http://localhost:8233 for dev, your Temporal Cloud UI for production) — there should be a new workflow.

Option B — Inspect webhook deliveries

Both GitHub and Linear show delivery history per webhook:

  • GitHub: App settings → Advanced → Recent Deliveries.
  • Linear: App settings → Webhooks → Recent deliveries.

A successful delivery shows 200 OK. A 401 typically means a webhook-secret mismatch. A 404 means the URL is wrong. A 530 from Cloudflare means your tunnel is down.

Where the workflow runs

Once a webhook arrives:

  1. The API verifies the signature.
  2. Looks up the tenant by organizationId.
  3. Emits a Thought activity to Linear (acknowledgement).
  4. Starts a Temporal workflow scoped to tenantId.
  5. The worker picks it up and runs the agent inside a sandbox.
  6. The PR opens; Linear ticket is updated.

You should see a comment from the agent on the Linear ticket within a few seconds, and a PR appear in the target repo within a few minutes.

Done

If you got here, you have a working self-hosted Sinatra. Some next steps:

If something didn't work, check the troubleshooting page →