# Introduction

What Keyrail does, the moving parts, and where to start.

Keyrail is a hosted licensing service for desktop software. It sits between your payment provider and your app:

1. Your customer buys through **Paddle Billing** or **Lemon Squeezy**. The provider sends a webhook to Keyrail.
2. Keyrail creates (or renews, suspends, refunds…) a **license** and emails the **license key** to your customer.
3. Your app sends the key once to the **client API**. Keyrail records a machine **activation** and returns a **certificate**: a small statement signed with your product’s Ed25519 key.
4. Your app verifies the certificate **offline** at every launch, and refreshes it silently when the network is available.

There is no secret in your app and no server for you to run. If Keyrail is unreachable, apps that activated once keep working for the certificate’s offline window (30 days by default).

## The pieces

| Piece | Used by | Auth | Docs |
|---|---|---|---|
| Client API (`https://api.keyrail.tech/v1/licenses/…`) | Your app, through an SDK | None (public product ID) | [Client API](/docs/client-api/) |
| Vendor API (`https://api.keyrail.tech/v1/…`) | Your backend, scripts, the dashboard | `Bearer kr_sk_…` secret key | [Vendor API](/docs/vendor-api/) |
| Webhook endpoints | Paddle, Lemon Squeezy | Provider signature | [Webhooks](/docs/webhooks/) |
| Dashboard (`https://keyrail.tech/app`) | You and your team | Email sign-in link | [Dashboard guide](/docs/dashboard/) |
| Customer portal (`https://keyrail.tech/portal/{accountSlug}`) | Your customers | Email sign-in link | [Customer portal](/docs/customer-portal/) |
| SDKs | Your app | — | Quickstarts below |

## SDKs

| Stack | Packages | License |
|---|---|---|
| Tauri 2 | `tauri-plugin-keyrail` (crate) + `@keyrail/tauri-plugin` (npm) | MIT or Apache-2.0 |
| Electron, Node | `@keyrail/client` (npm, zero runtime dependency) | MIT |
| Rust, native | `keyrail` (crate) | MIT or Apache-2.0 |
| .NET | Planned | — |

Another language? The [client API](/docs/client-api/) is three JSON endpoints, and the [certificate format](/docs/offline-certificates/) is documented with test vectors, so you can write a verifier in an afternoon.

> [!NOTE]
> Keyrail is in private development. The SDK snippets in these docs are compile-checked against the SDK sources; package versions will be confirmed at release.

## Where to start

- **New here?** Follow the quickstart for your stack ([Tauri](/docs/quickstart-tauri/), [Electron](/docs/quickstart-electron/), [Rust](/docs/quickstart-rust/)), with the **Get started** checklist of the dashboard open next to it. The [dashboard guide](/docs/dashboard/) explains every screen.
- **Selling soon?** Connect [Paddle Billing](/docs/paddle/) or [Lemon Squeezy](/docs/lemon-squeezy/), then go through the [going-live checklist](/docs/going-live/).
- **Something not working?** [Troubleshooting](/docs/troubleshooting/) lists every error code and the usual fixes. To search the docs, press `/` or Ctrl+K (⌘K on a Mac).

<div class="doc-cards"><a class="doc-card" href="/docs/quickstart-tauri/"><span class="doc-card-group">Get started</span><span class="doc-card-title">Quickstart for Tauri</span><span class="doc-card-desc">Add license keys and offline activation to a Tauri 2 app with tauri-plugin-keyrail.</span></a><a class="doc-card" href="/docs/quickstart-electron/"><span class="doc-card-group">Get started</span><span class="doc-card-title">Quickstart for Electron</span><span class="doc-card-desc">License an Electron app with @keyrail/client in the main process, exposed to the renderer over IPC.</span></a><a class="doc-card" href="/docs/quickstart-rust/"><span class="doc-card-group">Get started</span><span class="doc-card-title">Quickstart for Rust</span><span class="doc-card-desc">Use the keyrail crate in any Rust desktop app or CLI: the License helper, or verification only.</span></a><a class="doc-card" href="/docs/concepts/"><span class="doc-card-group">Concepts</span><span class="doc-card-title">Concepts</span><span class="doc-card-desc">Products, plans, licenses, activations, statuses and the grace period: the vocabulary of every API and SDK.</span></a><a class="doc-card" href="/docs/offline-certificates/"><span class="doc-card-group">Concepts</span><span class="doc-card-title">Offline certificates</span><span class="doc-card-desc">The KR1 certificate format, the verification rules every SDK applies, key rotation and the public test vectors.</span></a><a class="doc-card" href="/docs/paddle/"><span class="doc-card-group">Payments</span><span class="doc-card-title">Connect Paddle Billing</span><span class="doc-card-desc">Create licenses automatically from Paddle Billing transactions, subscriptions and refunds.</span></a><a class="doc-card" href="/docs/lemon-squeezy/"><span class="doc-card-group">Payments</span><span class="doc-card-title">Connect Lemon Squeezy</span><span class="doc-card-desc">Create licenses automatically from Lemon Squeezy orders and subscriptions, with offline certificates.</span></a><a class="doc-card" href="/docs/webhooks/"><span class="doc-card-group">Payments</span><span class="doc-card-title">Webhooks</span><span class="doc-card-desc">How Keyrail receives, verifies and processes payment provider webhooks, and what it answers.</span></a><a class="doc-card" href="/docs/dashboard/"><span class="doc-card-group">Guides</span><span class="doc-card-title">Dashboard guide</span><span class="doc-card-desc">Every screen of the Keyrail dashboard, what it is for, what you can do there and what each setting means.</span></a><a class="doc-card" href="/docs/going-live/"><span class="doc-card-group">Guides</span><span class="doc-card-title">Going-live checklist</span><span class="doc-card-desc">Everything to check before real customers pay: from sandbox and test mode to a live integration, a tested purchase and your customer emails.</span></a><a class="doc-card" href="/docs/troubleshooting/"><span class="doc-card-group">Guides</span><span class="doc-card-title">Troubleshooting and error codes</span><span class="doc-card-desc">Every client API, SDK and vendor API error code, what to tell your customer, and fixes for the most common problems.</span></a><a class="doc-card" href="/docs/client-api/"><span class="doc-card-group">Reference</span><span class="doc-card-title">Client API reference</span><span class="doc-card-desc">The three public endpoints your app calls to activate, validate and deactivate a license. No secret needed.</span></a><a class="doc-card" href="/docs/vendor-api/"><span class="doc-card-group">Reference</span><span class="doc-card-title">Vendor API reference</span><span class="doc-card-desc">Manage products, plans, licenses, activations, customers, integrations and API keys with a secret key.</span></a><a class="doc-card" href="/docs/customer-portal/"><span class="doc-card-group">More</span><span class="doc-card-title">Customer portal</span><span class="doc-card-desc">A hosted page, on your own domain and under your brand, where your customers find their license keys and free their machines without emailing you.</span></a><a class="doc-card" href="/docs/license-page/"><span class="doc-card-group">More</span><span class="doc-card-title">License page on your website</span><span class="doc-card-desc">A &quot;My license&quot; page inside your own website, where customers sign in with an email link, see their licenses and free a computer. Two lines to paste.</span></a><a class="doc-card" href="/docs/custom-sender/"><span class="doc-card-group">More</span><span class="doc-card-title">Custom sender and languages</span><span class="doc-card-desc">Send license keys from your own address, in your customers' language, with or without the Keyrail portal.</span></a><a class="doc-card" href="/docs/security/"><span class="doc-card-group">More</span><span class="doc-card-title">Security</span><span class="doc-card-desc">The threat model behind Keyrail licensing, what each part protects against, and how to integrate it safely.</span></a><a class="doc-card" href="/docs/faq/"><span class="doc-card-group">More</span><span class="doc-card-title">FAQ</span><span class="doc-card-desc">Short answers to common integration questions: offline use, virtual machines, reinstalls, trials, upgrades and more.</span></a></div>
