#
Getting Started
This guide will help you get started with Nostr Mail depending on your use case.
#
Choose Your Path
Use the Flutter Client or build your own app with the Dart SDK.
Deploy the Bridge to connect legacy email with Nostr.
Read the Protocol Specification to learn how it works.
#
For End Users
#
Use the Flutter Client
- Open the web client or download the app
- Generate or import your Nostr keys
- Start sending and receiving emails!
#
For Developers
#
Using the Dart SDK
Install the package:
dart pub add nostr_mail
Basic usage:
import 'package:nostr_mail/nostr_mail.dart';
import 'package:ndk/ndk.dart';
import 'package:sembast/sembast_io.dart';
// Initialize NDK with your keys
final ndk = Ndk(NdkConfig(
eventSigner: Bip340EventSigner(privateKey: 'your-hex-key'),
bootstrapRelays: ['wss://relay.damus.io', 'wss://nos.lol'],
));
// Open local database
final db = await databaseFactoryIo.openDatabase('emails.db');
// Create client
final client = NostrMailClient(ndk: ndk, db: db);
// Send an email
await client.send(
to: 'recipient@example.com',
subject: 'Hello from Nostr!',
body: 'This email was sent over the Nostr protocol.',
from: 'me@bridge.mail',
);
// Listen for incoming emails
await for (final email in client.watchInbox()) {
print('New email from: ${email.from}');
print('Subject: ${email.subject}');
}
#
For Bridge Operators
#
Prerequisites
- A server with Docker (recommended) or Node.js
- A domain with MX records configured
- Nostr private key (hex format)
#
Quick Start with Docker
git clone https://github.com/nogringo/nostr-mail-bridge
cd nostr-mail-bridge
cp .env.example .env
# Edit .env with your configuration
docker-compose up -d
#
Email Address Formats
Nostr Mail supports multiple address formats:
Note
The npub@nostr format is not routable by legacy email servers. Use it only for Nostr-to-Nostr communication.