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.
- Run the Portal daemon — self-host or develop locally: run
getportal/sdk-daemonwith Docker (see Quick Start). - Call the REST API — use any HTTP client (curl, Python, Go, Ruby, PHP…), or use the official SDKs for JavaScript/TypeScript and Java.
- Auth, payments, tickets — generate auth URLs (users approve with Nostr wallet), request single or recurring Lightning payments, issue Cashu tokens.
Integration options
| Option | When to use |
|---|---|
| HTTP / REST | Any language — Python, Go, Ruby, PHP, Rust, etc. No SDK needed. |
| JavaScript / TypeScript SDK | Node.js and browser apps. Handles polling and webhooks automatically. |
| Java SDK | JVM 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
| Section | For |
|---|---|
| Getting Started | Quick Start, Docker, env vars, building from source. |
| SDK & REST API | REST API, SDK install, usage, config, errors, OpenAPI reference. |
| Guides | Auth, payments, profiles, Cashu, JWT, relays — with curl, JS, and Java examples. |
| Resources | FAQ, glossary, troubleshooting, contributing. |
Open source
Portal is open source (MIT where noted). Contributions are welcome.
Next: Quick Start