Plex migration: TrueNAS Core -> Scale

I've found myself in a bit of a pickle. I want to upgrade my TrueNAS server from Core to Scale, but I'm currently using the Plex jail install on Core that isn't compatible with Scale.
So I've decided to write up this short tutorial about how I did move my Plex install from the "jail" kind of install over to the "app" install while retaining all my settings/config.
If all this sounds interesting to you, follow along.
This is not a tutorial on upgrading from TrueNAS Core to TrueNAS Scale., fyi.
The upgrade can be tricky and may break stuff. Make sure you have a backup of your data and of your TrueNAS config. Follow the official TrueNAS docs.
Pre Upgrade Steps
First things first, make a new dataset in TrueNAS. This will be the home of our Plex config. In my case it's /mnt/PlexData/plex_config/
Stop the Plex jail so there are not additional changes to your config (your users will be fine).
Copy the contents from the current Plex config to the new dataset that our Plex container will eventually reference . For me, this is at:
/mnt/<dataset>/iocage/jails/<jailname>/root/Plex Media Server
The below command will copy the current contents of the Plex config jail to the new dataset using rsync
.
rsync -a --progress --info=stats2 "/mnt/<dataset>/iocage/jails/<jailname>/root/Plex Media Server" /mnt/PlexData/plex_config/
Once that completes, we need to make sure permissions are correct on the new config dataset. Plex will need permissions to be UID/GID 1000:1000
so it can read/write to this new dataset. Below is the command to do so.
chown -R 1000:1000 /mnt/PlexData/plex_config/
You're basically ready to upgrade now. But before you do, be sure to take backup of your TrueNAS config.
I'm not going to give steps on how to do the upgrade because the official TrueNAS doc is great. For me it'll be Dragonfish-24.04.2.5
for now to match my backup server.
However you do it, I'll see you on TrueNAS Scale.
Plex Setup
With your TrueNAS server migrated to Scale it might be a good idea to confirm everything looks okay in your settings and that the migration didn't break anything. This isn't a tutorial on that so I'm going to keep moving.
Start by going to Apps on the left hand bar and search for "Plex". Once you find it, install it. You'll need to choose the correct pool to install the app to.
You'll then be presented with the setup of your new Plex app.
If you're migrating from a previous Plex install, don't forget to get your claim code and enter that in the config using https://www.plex.tv/claim.
Now, this next part took a little bit of learning on my end, so hopefully I can help you out. The goal here is to point Plex to both the storage dataset (i.e. movies, tv shows, etc.) and config dataset we created earlier. Below is my setup for reference, but really it's important to make sure that Plex is able to find:
media -> "Storage Configuration"
config -> "Plex Configuration Storage"


I used this reddit post to make sure my permissions were correct on both datasets. The first two photos are the important ones here, as they give you a template to use for the datasets. Very important to have the below options set on the dataset as Read/Write/Execute.
User - apps
Group - apps
Also, something I had to figure out the hard way was that my previous Plex install inside a jail didn't have the correct folder structure for what Plex was looking for in this installation. If you're coming from a jail install, it may be the same for you. Check this page for reference.
See, it's looking for Library/Application Support
in the new setup but my jail didn't have this. The link above shows that the "FreeNAS 11.3 or newer" location is:
${JAIL_ROOT}/Plex Media Server/
So what I ended up doing was creating said structure within my plex_config
dataset and moving the Plex Media Server
directory under it. So it ended up like:
/plex_config/Library/Application Support/Plex Media Server
Once I did that, Plex recognized my previous configuration files.
Lastly, because this tripped me up too. This new install mounts the media to the /data
directory. This is not where I had the actual Plex application pointing within the app itself, because previously the media was mounted at a /mnt
location. So I had to go to
Settings -> Manage - Libraries -> library_name -> Edit Library -> Add Folders
and change the library location to the new media mount starting with /data
. You'll need to do this for each library.

Final thoughts
You're done! Hopefully you have a running your Plex server on TrueNAS Scale.