π¦ Portable Plex Media Server
Easily run Plex Media Server from a USB stick without leaving traces on the host system. This setup ensures all Plex data, configurations, and metadata are stored on the USB drive, allowing you to use Plex on any Windows PC.
π Features
Fully Portable β Runs Plex directly from a USB stick.
No Registry Footprint β Saves and restores registry values dynamically.
Data Persistence β Keeps metadata, libraries, and settings on the USB stick.
Automatic Cleanup β Ensures no Plex data remains on the host PC after use.
Symlink Setup β Redirects Plexβs local app data to the USB drive.
π οΈ Installation & Usage
1οΈβ£ Prepare Your USB Stick
Install Plex Media Server directly onto your USB stick or copy an existing installation.
Ensure your Plex data is stored in:
USBDrive:\Plex\PlexData\
2οΈβ£ Setup & Execution
Clone this repository or download the plex_launcher.bat and plex_cleanup.bat scripts.
Place both scripts in the root directory of your USB stick.
To start Plex, double-click plex_launcher.bat.
To clean up after use, run plex_cleanup.bat.
3οΈβ£ Registry Handling
On first execution, plex_launcher.bat backs up existing registry values if no backup is stored on the USB.
If no registry entries are stored on the system either, Plex will think there is no media server configured and prompt you to create a new one.
When Plex starts, it restores saved registry values from the USB stick.
When finished, plex_cleanup.bat ensures no registry traces remain on the PC.
π File Structure
X:\ (USB Stick)
βββ Plex
β βββ Plex Media Server
β βββ PlexData\ (Metadata, Preferences, Cache)
βββ plex_launcher.bat
βββ plex_cleanup.bat
βββ README.md
π₯οΈ How It Works
Detects USB Drive: Identifies the correct USB stick location.
Handles Registry: Saves, deletes, and restores Plex registry settings.
Creates Symlink: Redirects AppData\Local\Plex Media Server to the USB stick.
Starts Plex Media Server from the USB stick with the correct paths.
Ensures Cleanup: After executing the plex_cleanup.bat, no local files, registry entries, or symlinks remain.
π Notes
Ensure your Plex account is logged in on the new PC to access remote servers.
You may need to manually approve network access for Plex on new PCs.
The script automatically adjusts drive letters when used on different machines.
π§ Troubleshooting
β Plex Does Not Start?
Try running plex_launcher.bat as Administrator.
Check if the Plex Media Server.exe path is correct in the script.
π‘ Enjoy your portable Plex setup! π