harassarr

harassarr

Docker app from mtrogman's Repository

Overview

harassarr is a discord bot that allows you to notify (cough... harass) users that their Plex/Emby/JellyFin subscription is almost up.

harassarr

A Discord bot to automate notifications to users on your media server that their subscription is about to end.

Release Docker Licence

logo

Flags

  • Add additional Plex servers python harassarr.py -add plex

Features

harassarr uses discord and email to notify (harass) users that their subscription is due for a renewal. If the subscription lapses then the user will automatically be removed from plex and the discord role.

Installation and setup

Requirements

  • Plex
  • Email Account (For sending users reminders)
  • A Discord server
  • Docker
  • A Discord bot token
    • Permissions required:
      • Manage Channels
      • View Channels
      • Send Messages
      • Manage Messages
      • Read Message History
      • Add Reactions
      • Manage Emojis

harassarr runs as a Docker container. The Dockerfile is included in this repository, or can be pulled from Docker Hub or GitHub Packages.

Volumes

You will need to map the following volumes:

Host Path Container Path Reason
/path/to/config/folder /config Required, path to the folder containing the configuration file

You can also set these variables via a configuration file:

  1. Map the /config directory (see volumes above)
  2. Enter the mapped directory on your host machine
  3. Rename the config.yml.example file in the path to config.yml
  4. Complete the variables in config.yml

User import (CSV)

  • primaryDiscord = String value, optional, This is the discord user assoicated with the access
  • primaryDiscordId = 16 Digit Discord User ID
  • secondaryDiscord = String value, optional, This is the secondary discord user assoicated with the access
  • secondaryDiscordId = 16 Digit Discord User ID
  • primaryEmail = String value, required, This is the email address plex has granted access to.
  • secondaryEmail = String value, optional, This is the secondary email address associated with the access (maybe someone manages access for them)
  • notifyDiscord = This is who will get communication via discord.
    • Options: - Primary = only primaryDiscord user will get communicated with - Secondary = only secondaryDiscord user will get communicated with - Both = both primary and secondary discord users will get communicated with - None = no discord communication will occur
  • notifyEmail = This is who will get communication via email.
    • Options:
      • Primary = only primaryEmail will get communicated with
      • Secondary = only secondaryEmail will get communicated with
      • Both = both primary and secondary email addresses will get communicated with
      • None = no email communication will occur
  • status =
    • Options:
      • Active = User has active shares
      • Inactive = User has no active shares
  • server = String value, required, This is the friendly name of the plex server.
  • 4K = Optional libraries shared out to user (default for me is no 4K, so if you want 4K its another set of libraries shared out.)
    • Options:
      • Yes = Has access to 4K libraries
      • No = Does not have access to 4K libraries
  • paidAmount = Integer, optional, This is the amount of $$$ this person has paid you (Total)
  • paymentMethod = String, optional, This is how the user paid you (examples: PayPal, Venmo, CashApp, Cash)
  • paymentPerson = String, optional, This is the name of the person who paid via paymentMethod (helps with tracking random payment in and tying it back to plex user)
  • startDate = Date format (MM/DD/YYYY), This is when their service started.
  • endDate = Date format (MM/DD/YYYY), This is when their service ends.
  • joinDate = Date format (MM/DD/YYYY), This is their first start date (keep track of how long they have been a customer).

Email Setup

  • smtp_server: smtp.gmail.com (if using google this is smtp server)
  • smtp_port: 587 (this is the default smtp port)
  • smtp_username: your_email@gmail.com
  • smtp_password: your_email_password

NOTE YOU SHOULD NOT BE USING YOUR PASSWORD BUT RATHER SETUP AN APP PASSWORD!!! https://support.google.com/accounts/answer/185833?visit_id=638392976627567214-395874003&p=InvalidSecondFactor&rd=1

Development

This bot is still a work in progress. If you have any ideas for improving or adding to harassarr, please open an issue or a pull request.

Contact

Please leave a pull request if you would like to contribute.

Feel free to check out my other projects here on GitHub or join my Discord server below.

Contributors ✨

Thanks goes to these wonderful people:

Contributors

trog/
trog
K0nsun/
K0nsun

Install Harassarr on Unraid in a few clicks.

Find Harassarr in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for Harassarr Review the template variables and paths Click Install

Download Statistics

2,083
Total Downloads

Related apps

Details

Repository
mtrogman/harassarr:latest
Last Updated2025-08-28
First Seen2023-12-20

Runtime arguments

Network
host
Shell
bash
Privileged
false

Template configuration

Config PathPathrw

Where config file will be stored

Target
/config
Default
/mnt/user/appdata/harassarr/config
Value
/mnt/user/appdata/harassarr/config
Notification TimeVariable

Time for notifications in HH:MM format

Target
TIME
Default
08:00
Value
08:00
Dry RunVariable

Enable dry-run mode

Target
DRYRUN
Default
False
Value
False