Sinatra Docs
Self-hosting

3. Create the Linear App

Create the Linear OAuth application that Sinatra uses to read tickets, post comments, and receive webhooks.

Sinatra connects to Linear via a workspace-scoped OAuth application with agent session events enabled.

Create it

Go to https://linear.app/<your-workspace>/settings/api/applications/new.

Fill in:

  • Application name: e.g. Sinatra (Acme).
  • Description: anything sensible (this is shown to users authorizing the app).
  • Developer URL, Callback URL, Webhook URL: described below.

Callback URL

The callback URL handles the OAuth redirect. Set it to:

https://YOUR_PUBLIC_API/install/linear/callback

(use your eventual public URL — see step 8).

Webhooks

Toggle Webhooks ON and:

  • Webhook URL: https://YOUR_PUBLIC_API/webhooks/linear.
  • Events: subscribe to Agent session events and Comment. (Agent session events is required for the main work loop; Comment is required for users to reply to Sinatra's brainstorm and plan comment threads directly. Issue change is optional.)

Capture the credentials

After saving, the application page shows:

Env varWhere it came from
LINEAR_CLIENT_IDShown on the app page
LINEAR_CLIENT_SECRETShown on the app page (one-time reveal — copy it now)
LINEAR_WEBHOOK_SECRETWebhook signing secret

GitHub username field

Once your GitHub App from step 2 is created, come back here and fill in the GitHub username field with <your-github-app-slug>[bot]. This is how Linear knows which GitHub account is doing the work the agent ships.

Install it on your workspace

The OAuth install flow happens through the Sinatra API once the stack is running — see step 10 for the install URL.

Continue to Choose a sandbox provider →