Self-host

Same Paperkey. Your servers.

MIT, single Docker compose, zero telemetry.
Drop the SaaS dependency the day a customer asks.

  • MIT licensed
  • Same SDK & API
  • Zero telemetry
  • Unlimited licenses

What you get

Three things that matter on day one

  • Parity with managed

    Same SDK, same REST API, same dashboard. Code written against paperkey.dev runs against your self-hosted instance with one env var changed.

  • MIT, zero telemetry

    Full source on GitHub. No phone-home, no usage pings, no license check. Fork it, audit it, run it airgapped. Your VPS, your DB, your logs.

  • Built for solo operators

    First registered user becomes owner automatically. Flip PAPERKEY_REGISTRATION_CLOSED=true to lock /register. Tier UI is hidden. Unlimited active licenses out of the box.

Side by side

Managed vs self-host

Same product. Different operational tradeoffs.

  • Price

    Managed (paperkey.dev)
    From $0/mo, paid tiers above limits
    Self-host
    Free (MIT). Your VPS, your bill.
  • Hosting

    Managed (paperkey.dev)
    Not open yet
    Self-host
    You run it. Anywhere.
  • Active licenses

    Managed (paperkey.dev)
    Tier-limited
    Self-host
    Unlimited
  • Updates

    Managed (paperkey.dev)
    Automatic
    Self-host
    git pull + docker compose up -d
  • Billing (Stripe)

    Managed (paperkey.dev)
    Included
    Self-host
    Not included. Sell your code elsewhere.
  • Backups

    Managed (paperkey.dev)
    Daily, retained 30 days
    Self-host
    Your job. pg_dump works.
  • Telemetry

    Managed (paperkey.dev)
    Product analytics on dashboard
    Self-host
    None.
  • Support

    Managed (paperkey.dev)
    Email, best effort
    Self-host
    GitHub issues, best effort

What you ship

Everything in the repo

The repo is a pnpm monorepo. Self-host runs two apps:

  • apps/api

    Hono + Prisma REST API. Dashboard JWT + public pk_ keys.

  • apps/dashboard

    Next.js 14 control panel.

  • packages/db

    Prisma schema, migrations, seed.

  • packages/shared

    Zod schemas, types.

  • @paperkeyhq/sdk

    TypeScript SDK, MIT, published on npm.

  • docker-compose.yml

    Postgres + API + dashboard + Caddy (TLS auto).

  • SELFHOST.md

    Five-minute quick start + ops notes.

Not included: marketing site, Stripe integration, billing UI.

Quick start

Live in 5 minutes

Five minutes on a fresh VPS with Docker installed.

  1. 1

    Clone.

    git clone https://github.com/paperkeyhq/paperkey && cd paperkey

  2. 2

    Configure.

    cp .env.example .env, set AUTH_SECRET, DATABASE_URL, your domain.

  3. 3

    Boot.

    docker compose up -d. Caddy provisions TLS, Prisma runs migrations.

  4. 4

    Claim ownership.

    Open https://your-domain/register, create the first account (auto-owner), then set PAPERKEY_REGISTRATION_CLOSED=true and restart.

Full guide in SELFHOST.md

FAQ

Questions you probably have

Is there a license check?

No. MIT, no key server, no callback. Run forks, modify it, resell embedded copies. Attribution appreciated, not enforced.

Can I migrate from managed later?

Yes. Same DB schema, same API. Export from managed, restore with pg_dump/pg_restore, point your SDK at the new URL. One env var.

Does it scale beyond one VPS?

The compose ships a single instance per service. For HA, run Postgres managed (Neon, RDS, Crunchy), and scale apps/api horizontally behind your load balancer. Stateless by design.

How do I bill customers?

Self-host has no Stripe code. Use Lemon Squeezy, Paddle, Stripe Checkout, Gumroad, whatever. Paperkey issues the license after your checkout webhook fires.

Sustainability

Why self-host comes first

Paperkey is solo-maintained by one developer. Self-host is MIT because licensing software shouldn't be a vendor lock-in. A managed edition is planned to fund the maintenance, but it is not open yet and has no date. Until then, self-host is the way to run Paperkey.

Run it on your box.

Clone, configure, ship. The managed edition is not open yet, the waitlist tells you when it is.