Skip to content

AzuraCast Nostr Bot is a Node.js bot that broadcasts AzuraCast's 'Now Playing' information to a set of Nostr relays in real-time.

License

Notifications You must be signed in to change notification settings

saulteafarmer/azuracast-nostr-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AzuraCast Nostr Bot

AzuraCast Nostr Bot is a Node.js bot that broadcasts AzuraCast's 'Now Playing' information to a set of Nostr relays in real-time.

Broadcast Now Playing Information on the Nostr Network

The bot listens for incoming webhooks from AzuraCast and publishes real-time "Now Playing" information about the currently playing song or podcast episode on your radio station to the defined Nostr relays. Listeners and followers on Nostr can stay updated about what's currently playing on your station and join the live broadcast with a single click.

Key Features

  • Real-time publication of "Now Playing" information to Nostr.
  • Supports broadcasting to multiple Nostr relays for increased visibility.
  • Configurable webhook endpoint and SSL support for secure communication.
  • Easy integration with AzuraCast stations.

Prerequisites

  • Node.js and npm installed on your system.
  • AzuraCast instance with webhook integration enabled.
  • SSL certificate and key for secure communication (e.g., Let's Encrypt).
  • A Nostr private key (hex format) to be specified in the configuration file.

Setup and Configuration

  1. Clone this repository or download the source code.
git clone https://github.com/patrickulrich/azuracast-nostr-bot.git
cd azuracast-nostr-bot
  1. Install the required npm packages.
npm install
  1. Configure the bot by editing the config.js file. Specify the following information:
  • privateKey: Your pre-existing Nostr private key (hex string).
  • stationWebpageUrl: The URL of your AzuraCast station's public webpage.
  • sslOptions: The file paths for your SSL certificate and key.
  • relayUrls: An array of Nostr relay URLs to which you want to publish events.
  1. Start the bot.
node anb.js

The bot will start listening for incoming webhooks on port 3000.

  1. Configure the webhook integration in your AzuraCast instance. Set the webhook URL to https://your-domain:3000/webhook.

Usage

Once the bot is running and the webhook is configured, it will automatically publish "Now Playing" information to the specified Nostr relays whenever a new song or podcast episode starts playing on your AzuraCast station. The published event will include the title, artist, station name, and a link to the station's webpage.

Contributing

Contributions, issues, and feature requests are welcome. Feel free to check the Issues page if you want to contribute.

License

This project is licensed under the MIT License.

Contact

Acknowledgements

About

AzuraCast Nostr Bot is a Node.js bot that broadcasts AzuraCast's 'Now Playing' information to a set of Nostr relays in real-time.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published