A Joplin plugin that allows you to publish your notes to the Nostr network.
Nostr (Notes and Other Stuff Transmitted by Relays) is a simple, open protocol that enables global, decentralized, and censorship-resistant social media. It allows users to publish content to multiple relays, which then distribute that content to other users.
- Publish Joplin notes to one or more Nostr relays
- Configure your NSEC private key for signing notes
- Specify multiple relays to publish to
- Upload embedded images to Blossom media servers
- Support for both regular notes and long-form articles (NIP-23)
- Simple one-click publishing from the editor toolbar
- Detailed success/failure reporting
Currently just one relay atm- The popup dialog for publishing should go away after send, but its not. Click cancel for now.
Not sure if I should .gitignore the api directory- Have to add the nsec locally into the plugin settings, need to understand more Apps (not in a browser apps using a bunker or plugin or something 🤷♀️ )
- excessive console logging
- Polish it to submit to the Joplin plugins directory
- Anything from the bugs above
No images to blossom yet✅ Implemented in latest versionIf the note is longer than 256 characters, then prompt the option to be NIP-23 long-form content (blog post) so kind 1 stream is not polluted✅ Implemented in latest version
- Open Joplin
- Go to Tools > Options > Plugins or on MacOS Settings > Plugins
Search for "jp2n"(not really, you have to build this locally and then add the .jpl file yourself, this will comelater if I get it submitted to the Joplin plugins directory)- Click Install
- Restart Joplin
Before you can publish notes to Nostr, you need to configure the plugin:
- Go to Tools > Options > JP2N Settings
- Enter your NSEC private key
- This is your Nostr private key, which starts with "nsec1"
- If you don't have one, you can create one using a Nostr client like Damus, Amethyst, or Iris
- IMPORTANT: Keep your NSEC private key secure. Anyone with this key can post as you on Nostr.
- After entering a valid NSEC, your public key (npub) will be automatically derived and displayed
- Choose your relay source:
- Manual Relays: Enter a comma-separated list of relays in the Manual Relay List field
- Example:
wss://relay.damus.io,wss://relay.nostr.info,wss://nos.lol
- These are the servers your note will be published to
- You can find popular relays at nostr.watch
- Example:
- NIP-65 Relays: Use default relays (currently wss://relay.damus.io and wss://nos.lol)
- In future versions, this will fetch your relay list from your NIP-65 metadata
- Manual Relays: Enter a comma-separated list of relays in the Manual Relay List field
- Configure image upload settings (optional):
- Enable Image Upload: Toggle this option to enable uploading images to Blossom servers
- Blossom Server URL: Enter the URL of the Blossom server to use for image uploads
- Default:
https://blossom.nostr.wine/upload
- You can use other Blossom-compatible servers if preferred
- Default:
- Open a note you want to publish to Nostr
- Click the "Publish to Nostr" button in the editor toolbar (bullhorn icon)
- Confirm that you want to publish the note
- If your note contains images and image upload is enabled, you'll see how many images will be uploaded
- If your note is longer than 256 characters, you'll be given the option to publish as:
- Regular Note: Standard Nostr post (kind 1)
- Long-form Article: NIP-23 blog post format (kind 30023)
- Wait for the publishing process to complete
- If any image uploads fail, you'll be given the option to proceed without those images or cancel
- You can cancel the loading dialog if you want, and the publishing will continue in the background
- View the results showing which relays successfully received your note and how many images were uploaded
When publishing to Nostr, your note will be formatted as follows:
[Note Title]
[Note Body]
Regular notes will include any embedded images as direct URLs for maximum client compatibility.
Long-form articles follow the NIP-23 format with:
- A unique slug derived from the title
- The note title as the article title
- The first paragraph or first 100 characters as the summary
- The full note content with embedded images in Markdown format
Both formats include a client tag identifying the note as published from the jp2n plugin.
If you receive an "Invalid NSEC" error:
- Make sure your private key starts with "nsec1"
- Verify that you've copied the entire key without any extra spaces
- Try generating a new key if problems persist
If you have trouble connecting to relays:
- Check that the relay URLs are correct and include the "wss://" prefix
- Verify that the relays are online using nostr.watch
- Try using more established relays like
wss://relay.damus.io
orwss://nos.lol
If publishing fails:
- Check your internet connection
- Verify that your NSEC key is valid
- Try publishing to different relays
- Check the detailed error messages in the result dialog
If image uploads fail:
- Verify that the "Enable Image Upload" option is enabled in settings
- Check that the Blossom Server URL is correct and accessible
- Ensure your NSEC key has permission to upload to the Blossom server
- Try a different Blossom server if the current one is unavailable
- For large images, be patient as uploads may take longer
- Your NSEC private key is stored in Joplin's settings and never sent anywhere except to sign Nostr events
- Notes are published publicly to the Nostr network - anyone can read them
- Consider the content carefully before publishing, as Nostr posts are permanent and difficult to remove once published to relays
This plugin is released under the MIT license.
For information on how to build or modify the plugin, please see GENERATOR_DOC.md