A bot for posting RSS feed updates to Bluesky using Node.js or Docker.
- Fetches RSS feeds and posts new updates to a Bluesky account.
- Avoids duplicates by locally tracking previously published links.
- Retrieves metadata (title, description, thumbnail) for embedded links.
- Adheres to Bluesky's API rate limits.
- Configurable settings for frequency, duplicate-checking, and relevance.
Choose your preferred setup method:
- Standard Node.js Installation: If you're comfortable with Node.js.
- Docker Installation: Recommended to avoid dependency issues.
git clone https://github.com/cgillinger/Blueskybot.git
cd Blueskybot
Install all required packages:
npm install
- Locate the
.env.example
file in the repository and rename it to.env
:
mv .env.example .env
- Open the
.env
file and replace the placeholder values with your Bluesky credentials:
BLUESKY_USERNAME=your_email@provider.com
BLUESKY_PASSWORD=your_secure_password
Note: The
.env
file must remain in the project directory for the bot to function.
- Open
bot.mjs
in a text editor. - Update the
RSS_FEEDS
array with the RSS feeds you want to monitor:
const RSS_FEEDS = [
{ url: 'https://example.com/rss-feed-1.xml', title: 'Example Feed 1' },
{ url: 'https://example.com/rss-feed-2.xml', title: 'Example Feed 2' },
];
- Ensure every URL is valid and points to an active RSS feed.
- Titles are optional but help you identify each feed.
- Do not add extra fields beyond
url
andtitle
.
Run the bot:
npm start
Docker simplifies setup and avoids dependency issues. Here’s how to get started:
-
Windows:
- Download and install Docker Desktop for Windows.
- Ensure WSL2 is enabled if you are using Windows 10 or later.
-
MacOS:
- Download and install Docker Desktop for Mac.
- Supports macOS Catalina and later.
-
Linux:
Note: Verify that Docker and Docker Compose are working correctly by running
docker --version
anddocker compose version
.
Navigate to the project directory in the terminal (the folder where the Dockerfile
is located). Run:
docker build -t blueskybot .
Ensure your .env
file is updated with valid Bluesky credentials.
Start the container:
docker run --env-file .env -d --name blueskybot-container blueskybot
Check the logs to verify the bot is running:
docker logs blueskybot-container
To stop the container:
docker stop blueskybot-container
To remove the container:
docker rm blueskybot-container
bot.mjs
: The main script performing all bot functions.package.json
: Lists the project’s dependencies.Dockerfile
: Instructions for building the Docker image..env
: Contains environment variables used by the bot.
/
├── bot.mjs # Main script
├── Dockerfile # Docker configuration
├── docker-compose.yml # Alternative Docker configuration (optional)
├── LICENSE # Project license (MIT)
├── package.json # Dependencies
├── README.md # Documentation
If you see Invalid identifier or password
:
- Verify that your
.env
file contains correct credentials. - Ensure your Bluesky account is active.
If API rate limits are encountered (status code 429
), the bot automatically waits until the limit resets.
If modules are missing, reinstall them:
npm install
Contributions are welcome! Open an issue or submit a pull request to improve this project.
This project is licensed under the MIT License.