Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Portal

Project Homepage | Repository | Become a supporter

Portal is a Nostr-based authentication and payment SDK allowing applications to authenticate users and process payments through Nostr and Lightning Network.

What is Portal?

Portal uses Nostr and the Lightning Network to provide:

  • Decentralized authentication — Users sign in with Nostr keys; no passwords or email.
  • Lightning payments — Single and recurring payments, real-time status.
  • Privacy-first — No third parties, no data collection; direct peer-to-peer where possible.
  • Tickets & vouchers — Issue Cashu ecash tokens to authenticated users.

How to use Portal

Portal exposes a standard HTTP REST API — you can integrate from any language or platform.

  1. Run the Portal daemon — self-host or develop locally: run getportal/sdk-daemon with Docker (see Quick Start).
  2. Call the REST API — use any HTTP client (curl, Python, Go, Ruby, PHP…), or use the official SDKs for JavaScript/TypeScript and Java.
  3. Auth, payments, tickets — generate auth URLs (users approve with Nostr wallet), request single or recurring Lightning payments, issue Cashu tokens.

Integration options

OptionWhen to use
HTTP / RESTAny language — Python, Go, Ruby, PHP, Rust, etc. No SDK needed.
JavaScript / TypeScript SDKNode.js and browser apps. Handles polling and webhooks automatically.
Java SDKJVM apps. Same capabilities as the JS SDK.

All options talk to the same REST API under the hood. The SDKs just add typed wrappers and auto-polling.

Key features

  • Authentication — Nostr key handshake, main keys and subkeys, no passwords.
  • Payments — Single and recurring Lightning; Cashu mint/burn/request/send.
  • Profiles — Fetch and set Nostr profiles; NIP-05.
  • Sessions — Issue and verify JWTs for API access.
  • REST API — Standard HTTP, OpenAPI spec, any HTTP client.

Getting started

  • Quick Start — Get going in minutes with Docker + HTTP or an SDK.
  • REST API — Use Portal from any language over HTTP.
  • OpenAPI Reference — Full interactive API reference.
  • SDK — Install the JavaScript or Java SDK.
  • Docker — Run the Portal daemon with Docker.
  • Guides — Auth flow, payments, profiles, Cashu, JWT, relays.

Docs overview

SectionFor
Getting StartedQuick Start, Docker, env vars, building from source.
SDK & REST APIREST API, SDK install, usage, config, errors, OpenAPI reference.
GuidesAuth, payments, profiles, Cashu, JWT, relays — with curl, JS, and Java examples.
ResourcesFAQ, glossary, troubleshooting, contributing.

Open source

Portal is open source (MIT where noted). Contributions are welcome.

Next: Quick Start