Delivers highly-customized news feeds to Discord!
To use the publicly hosted instance for free, visit https://monitorss.xyz!
Docker is required to easily coordinate and run multiple services at once.
Note
General knowledge of how Docker, Docker volumes, and docker compose works is highly recommended to avoid accidental data loss
Note
Request history and delivery logs stored in PostgreSQL are not meant to be persistent forever. They may be removed when PostgreSQL versions are upgraded.
- Install Docker Engine
- Install Docker Compose
- Clone this repo's
main(the default) branch -git clone https://github.com/synzen/MonitoRSS.git - Create a Discord application through Discord's developer portal if you do not already have one
- Create a copy of the existing
.env.examplefile and rename it to.env - Replace all relevant values in the
.envfile with your own values- If you have your own MongoDB instance, set
BACKEND_API_MONGODB_URIto your MongoDB URI - Add your email at the end of
FEED_REQUESTS_FEED_REQUEST_DEFAULT_USER_AGENTfor feed hosts to be able to contact you if you violate their usage policies. For example,MonitoRSS [Self-Hosted]/1.0 [email protected]. - Replace all instances of "BOT_TOKEN_HERE" with your Discord bot application token
- Replace all instances of "BOT_CLIENT_ID_HERE" with your Discord bot application ID
- Replace all instances of "BOT_CLIENT_SECRET_HERE" with your Discord bot application secret
- Set
BACKEND_API_SESSION_SECRETto a random 64-character string - Set
BACKEND_API_SESSION_SALTto a random 16-character string - Add
http://localhost:8000/api/v1/discord/callback-v2to the list of redirect URIs in your Discord application in the OAuth2 page
- If you have your own MongoDB instance, set
- Run
docker compose up -d. Make sure all containers, except those with "migration" in it, are running viadocker ps.- If you run into issues with network timeouts, pass the parallel flag to only build 1 container at once:
docker compose --parallel 1 up -d - Any containers ending in
-migrationdo not need to be running - If any containers are failing to start, troubleshoot by getting the last few logs for the container with
docker logs <container_name or ID> --tail 100
- If you run into issues with network timeouts, pass the parallel flag to only build 1 container at once:
- Access the control panel via http://localhost:8000
- Set up your domain to point to the server running the control panel on localhost
- Update all references to
http://localhost:8000in your.envto your desired domain. For example,https://mynewdomain.com. - Add
{DOMAIN_HERE}/api/v1/discord/callback-v2to the list of redirect URIs in your Discord application in the OAuth2 page, replacing{DOMAIN_HERE}with the value you set in step 1
While email notifications are available so that you may get notified when feeds are disabled for various reasons (permission erorrs, request errors, etc), credentials must be set to be able to send them out. Set the three variables below with your email provider's SMTP settings in your env file:
BACKEND_API_SMTP_HOSTBACKEND_API_SMTP_USERNAMEBACKEND_API_SMTP_PASSWORDBACKEND_API_SMTP_FROM
Make sure to opt into email notifications in the control panel's user settings page afterwards.
- Create a Reddit application at https://www.reddit.com/prefs/apps as a "web app".
- Add
{DOMAIN_HERE}/api/v1/reddit/callbackto the list of redirect URIs in your Reddit application settings, replacing{DOMAIN_HERE}with your domain that you're using to access the control panel. - Copy the redirect URI you just added and set it as
BACKEND_API_REDDIT_REDIRECT_URIin your.envfile. - Copy the Reddit application's client ID (under "web app" label) and set it as
BACKEND_API_REDDIT_CLIENT_IDin your.envfile. - Copy the Reddit application's secret and set it as
BACKEND_API_REDDIT_CLIENT_SECRETin your.envfile. - Generate a random 64-digit hexadecimal string and set it as
BACKEND_API_ENCRYPTION_KEY_HEXin your.envfile. One option is to use an online generator such as this one.
Releases follow semantic versioning and are published on the Releases page. To update:
- Back up your MongoDB data as a precaution (regular backups are a good idea regardless)
- Stop containers with
docker compose rm --stop -f - Set your desired version in the
.envfile by updatingMONITORSS_VERSION(e.g.,MONITORSS_VERSION=7for version 7) - Pull latest images with
docker compose pull - Start containers with
docker compose up -d
Breaking changes to either the application and Docker compose files may happen between major versions. Check the Releases page for instructons on upgrading major versions.
If you've been using MonitoRSS v6 (used by the repo https://github.com/synzen/MonitoRSS-Clone), then these are instructions to migrate off of that repo to use the latest changes.
It's recommended that you don't delete your v6 files until you've confirmed that all your feeds are working as expected post-migration.
- Follow the instructions above to self host. Be sure to clone this repo - the clone repo is no longer used or maintained.
- In your
.envfile, setBACKEND_API_MONGODB_URIto your MongoDB URI - Run
docker compose --parallel 1 up -d --build- If you run into issues with network timeouts, pass the parallel flag to only build 1 container at once:
docker compose --parallel 1 up -d
- If you run into issues with network timeouts, pass the parallel flag to only build 1 container at once:
- Convert legacy feeds to personal feeds using the migration script below. Legacy feed articles will not be fetched/delivered until they are converted.
- After verifying that all is working as expected, you may delete your v6 files.
Legacy feeds must be converted to personal feeds before they will deliver articles. After starting up all containers, run the migration script:
# Enter the monolith container
docker compose exec monolith sh
# Dry run first to preview (replace YOUR_DISCORD_USER_ID)
node dist/scripts/migrate-all-legacy-feeds.js --user YOUR_DISCORD_USER_ID --guild "*" --dry-run
# Run the actual migration
node dist/scripts/migrate-all-legacy-feeds.js --user YOUR_DISCORD_USER_ID --guild "*"| Option | Required | Description |
|---|---|---|
--user <id> |
Yes | Discord user ID to own all converted feeds |
--guild <ids> |
Yes | Comma-separated guild IDs, or * for all guilds |
--dry-run |
No | Preview without database changes |