A minimal LNurl/Nostr/Zap-receipt server in Rust using SQLite.
- LNURL-pay endpoint with NWC (Nostr Wallet Connect) integration
- NIP-05 endpoint for Nostr identity verification
- NIP-57 (zaps receipts publishing)
- Web-based admin dashboard for user management
- Multi-domain support
- Secure authentication system
/lnurlp/:username- LNURL-pay endpoint/.well-known/lnurlp/:username- Well-known LNURL-pay endpoint/.well-known/nostr.json- NIP-05 verification/lnurlp/:username/callback- LNURL-pay callback/lnurlp/:username/verify/:payment_hash- Payment verification
/admin- Admin interface (requires authentication)/admin/login(POST) - Admin authentication/admin/users(GET) - List all users/admin/add(POST) - Add user via admin interface/admin/:username(DELETE) - Delete user via admin interface
The admin dashboard provides a web-based interface for managing users and Lightning addresses.
- Secure password-based authentication using randomly generated admin passwords
- Admin password is generated on server startup and printed to console/logs
- Session-based authentication with HTTP-only cookies
- 24-hour session timeout
- Add Users: Create new users with Lightning addresses
- View Users: List all registered users with their details
- Delete Users: Remove users from the system
- Multi-domain Support: Each user can have different domains
When adding users, you can configure:
- Username (optional): Custom username or auto-generated if not provided
- Domain (required): The domain for the Lightning address (e.g.,
example.com) - Nostr Public Key (optional): For NIP-05 verification support
- Accepts both npub format (
npub1...) and hex format - Enables Nostr identity verification at
username@domain
- Accepts both npub format (
- NWC Connection String (optional): For LNURL-pay functionality
- Nostr Wallet Connect URI (
nostr+walletconnect://...) - Enables Lightning payments to
username@domain - Security Note: Only use read-only connections with
make_invoicepermission only
- Nostr Wallet Connect URI (
- Admin password displayed only on server startup
- NWC connection strings stored securely (for invoice generation only)
- Session-based authentication with automatic expiration
- Input validation for all user data
- CSRF protection through session cookies
At least one of the following must be provided when creating a user:
- Nostr Public Key: Enables NIP-05 verification
- NWC Connection String: Enables LNURL-pay functionality
Both can be provided to enable full Lightning + Nostr functionality.
# Build the project
cargo build
# Run the server
cargo run- Start the server and note the admin password printed to console
- Navigate to
http://localhost:8080/admin - Enter the admin password to access the dashboard
- Use the interface to manage users and Lightning addresses
BIND_ADDRESS- Server bind address (default:127.0.0.1)NIP57_PRIVATE_KEY- Private key for signing zap receipts (required for NIP-57)
- Uses SQLite for storage
- Automatic migrations on startup
- Stores users, invoices, and payment metadata