Skip to content

Plexcache‐R Setup File Guide

StudioNirin edited this page Feb 14, 2026 · 1 revision

The Setup Questions Guide

  1. Enter your plex server address (Example: http://localhost:32400 or https://plex.mydomain.ext):
    The IP or URL for accessing your personal Plex server.

  2. Enter your plex token:
    How to get yourPlex Token

  3. Your plex library name: {library.title}
    The script will now cycle through all of your library names. Select which of them you want to include in the caching process.

  4. How many episodes (digit) do you want fetch from your OnDeck?
    Your OnDeck is the 'continue watching' feed on your Plex Homepage. If an item is a TV Series, then PlexCache-R will cache the current episode, as well as the next few episodes up to your chosen number. Default is 6.

  5. Maximum age of the media onDeck to be fetched?
    Plex usually displays your 'continue watching' Deck for something like 16 weeks by default, before hiding them from the homepage. You can choose in Plex settings to extend that as high as you want. This setting does a similar thing for PlexCache-R, where it will only cache items from your OnDeck that you have had activity on with the last X days. (Default 99)

  6. Do you want to fetch your own watchlist media?
    This will make PlexCache-R grab your personal Watchlist and cache items on it.

  7. How many episodes do you want fetch from your Watchlist?
    Same as OnDeck, but is instead caching X additional episodes for any TV Shows on your watchlist. (Default 1)

  8. Define the watchlist cache expiry duration in hours.
    All items added from your watchlist is also added to a cache file. This means that if you run the script again within X hours of this Watchlist-Cache being created, the script will use the existing Watchlist files instead of scanning and processing them again. This saves on unnecessary processing if you're running PlexCache-R more frequently than you're editing your Watchlist. (Default: 6).

  9. Do you want to fetch onDeck media from other users? [Y/n]
    This will add all other users of your Plex server, both local and remote, to PlexCache-R. (Default: Yes)

  10. Would you like to skip onDeck for some of the users? [y/N]
    Gives you the option of selecting which users you want to cache files for. (Default: No)

  11. Do you want to skip onDeck for this user? {UserName} [y/N]
    The script will cycle through all your users by name, so you can select if you cache OnDeck files for each one. (Default: No)

  12. Do you want to skip watchlist for this local user? {UserName} [y/N]
    The script will now cycle through only your LOCAL users, so you can select if you cache WatchList items for each one. Remote users will be handled in the next step. (Default: No)

  13. Would you like to fetch Watchlist media from ALL remote Plex users? [y/N]
    Remote users Watchlist files are handled via an RSS feed, which is a single feed covering ALL of your remote users. So this is an All-or-Nothing choice unfortunately. However it does work very well in my testing so far (is still a new feature so YMMV) (Default: No)

  14. Go to https://app.plex.tv/desktop/#!/settings/watchlist and activate the Friends' Watchlist. Enter the generated URL here:
    Go to the URL, activate the appropriate Watchlist item, and copy and paste the link.

  15. Do you want to move watched media from the cache back to the array? [y/N]
    PlexCache-R will grab your 'Watched Items' list from plex, and use that to move files out of cache and back to the array. Without this option, items will get removed from the caching list, but won't be automatically moved. Instead the items will just get moved back to the array depending on your own Unraid-Mover settings. (Default: No)

  16. Define the watched cache expiry duration in hours.
    The list of 'watched' files is written to a cache file. If Plexcache-R is run within X hours of the file being created/modified, then it won't scan again and will just use the existing watched-cache list of files. This can be used to group moves back to the array into larger batches. I'd probably recommend looking into the Unraid-Mover-Tuner plugin instead though as it's got many more options and features.

  17. Insert the path of your cache drive:
    The path to your cache drive, including a folder structure if you want files to be cached in it's own directory etc. (default: "/mnt/cache")

  18. Do you want to test the given path? [y/N]
    Checks the path is appropriately formatted. Won't know if it's a legitimate or sensible caching path though.

  19. Insert the path where your media folders are located?:
    The path to your media files on the array. (default: "/mnt/user")

  20. Enter the corresponding NAS/Unraid library folder for the Plex mapped folder:
    This is for mapping files from the Plex 'container' file structure, to the local Unraid file structure. This can be a little complicated but for example on my own server: I have my files in /media/movies/movies-4k and /media/movies/movies-anime on Unraid. So the plex library for movies-4k would be mapped to movies/movies-4k. For movies-anime it would be mapped to movies/movies-anime. I can't think of a better way of setting this up and explaining it, so if you run into trouble let me know. The setup file produced by this script can be edited easily without running the whole script again, so you can correct mistakes later if they arise.

  21. If there is an active session in plex, do you want to exit the script (Yes) or just skip the playing media (No)? [y/N]
    If someone is watching a file, you don't want to interrupt them. So either the script quits, or it skips that file. I think skipping the file is always the best option but you get the option. (Default: No)

  22. How many files do you want to move from the array to the cache at the same time?
    Sets up move operations in batches of X files, for moves into cache. (default: 5)

  23. How many files do you want to move from the cache to the array at the same time?
    Sets up move operations in batches of X files, for moves back to the array. (default: 2)

  24. Do you want to debug the script? No data will actually be moved. [y/N]
    It'll run a test run of the script, but without actually moving or creating any files. I haven't actually tested this, so ironically the debug might be buggy. Let me know!

AND YOU'RE DONE! Man this was a lot of typing. Hope it was worth it.

Congratulations! You have now successfully set up PlexCache-R.

Clone this wiki locally