r/PleX • • 3d ago

Help Migration to Linux

I'm, at a point where I need to migrate my Plex Server from Windows Server to Linux.

Below is what i think needs to happen. If anyone had any guidance or corrections please let me know.

One question I have, Ubuntu or Debian or Fedora?

  1. Ensure that you close the Plex media server from your task bar on your Windows machine. 
  2. On your Linux Server machine, you need to change some settings; first you need to turn of scan your library periodically, next turn off empty trash. 
  3. Ensure that you have copied your media from the external media to the Linux Server and the Plex server running on the Linux Server 
  4. Ensure that you shut down the Plex server on the Linux Server. Go to the package center, select Plex and select stop. 
  5. Delete these folders on your Linux Server device: Under Plex > Library > Application support > Plex Media server, then delete media, metadata, plug-in support, and plugin. 
  6. Now you have to ensure that you can access that Plex directory from another computer on the network. 
  7. Go to control panel > Plex file share click on edit, and under permission, ensure that the admin account has read and write access ticked. 

Back on the windows 

  1. While the Windows computer is connected to the Linux Server, go to your Plex directory on Windows, then Library > Application support > Plex media server 
  2. Now copy the link for where Windows stores Plex Metadata; %LOCALAPPDATA%\Plex Media Server and paste this link in your windows explorer address bar. 
  3. The link should take you to a folder containing folders similar to the ones on the Linux Server machine. 
  4. Now copy all the folders that you deleted from the Linux Server that is still on the Windows server and drag them over to the folder in this link: Library > Application support > Plex media server 
  5. After the copying is done, you can reactivate the Plex server on the Linux Server and you should see all the libraries on the windows server now on the Linux Server server. 

Back on the Linux Server 

  1. Launch the Plex sever on the Linux Server. 
  2. Then open Plex.tv on the Linux Server. 
  3. However, the libraries still need to be repointed library by library because Windows and Linux Server devices store files in different ways. 
  4. Go to manage library then click on 
  5. Click on browse for a new folder. 
  6. Navigate to the media server and to the movies folder then add that. 
  7. Click save changes and you should see everything update. 
  8. Now you can turn back on scan your library periodically, next turn off empty trash. 
13 Upvotes

41 comments sorted by

4

u/azza10 2d ago

Debian and docker. I recently did exactly what you're doing and debian 100%.

I'd also consider proxmox / trunas / hexOS.

I was far more familiar with Debian though so went that way.

1

u/Admin_ontheRocks 2d ago

Have you got any guidance? I’m keeping the old data drives as they are, and will just installing Linux on the OS drive

1

u/azza10 2d ago

Just make sure you have all your configs backed up.

I have 2 hardware raid arrays in NTFS mounted using the ntfs-3g package which has been rock solid. You'll need to play in fstab. Make sure you use uuid's and not paths in fstab (like I did).

If you're planning CLI/headless, Komodo has been really good for managing the docker containers.

Docker everything you can. It can be a little bit of mucking around sometimes compared to baremetal, but you gain so much security and flexibility.

Use ext4 for your main drive. I tried very hard to get btrfs working and stable. It was an absolute nightmare. No idea what I was doing wrong, plenty of people swear by it. But after installing 3 times in a VM and 3 in production I gave up.

11

u/mikevarney 3d ago edited 1d ago

I get much more mileage using a docker image on a NAS. Used to use Linux.

7

u/Old_Preparation2887 3d ago

I did a Windows to Linux migration a few months back and you don’t need to re-import or go through media analysis and thumbnail generation all over again… but you do need to run a handful of SQL queries for updating media locations on disk.

In short,

D:\Media\Television != /mnt/Media/Television

but with a little effort you can rewrite everything in-place for a true migration.

https://spwoodcock.dev/blog/2025-02-plex-windows-migrate/

2

u/J_aB_bA 3d ago

This is the way

1

u/1RedOne 3d ago

Bro are you asking us to double check your ai instructions

1

u/Admin_ontheRocks 2d ago

No. Not AI, I’ve had these instructions sat in a Word document for literally years. But finally, I’m now getting around to using them.

1

u/1RedOne 2d ago

Sorry, the article being written in that tone read like AI to me, my apologies

1

u/AnalystCommon3643 3d ago

I think so haha

1

u/theMezz Tech Snob 3d ago

Are you planning on using the same drives as you did with windows for your media files?

1

u/Admin_ontheRocks 2d ago

Yes, the data drives with the content on will remain the same (don’t have money to buy new ones yet). But the OS driver will be formatted and Linux installed.

1

u/theMezz Tech Snob 2d ago

How will you make the new Plex read the Windows Drives .. I think it will see folders but not files without some complex configuration. Maybe I am wrong.

Someone else posted this too I think:
https://spwoodcock.dev/blog/2025-02-plex-windows-migrate/

1

u/Admin_ontheRocks 2d ago

As far as i know Linux OS’s support NTFS format drives without issue

3

u/Any_Delivery_9158 3d ago

Do you plan on using this machine for anything other than Linux? Have you used Linux before? 

I would consider Ubuntu LTS without knowing more information about you because it "just work" for the average user. If you have more experience with Linux I personally run my server on Debian which is also very stable but might be a little more DIY depending on your hardware and other needs

2

u/Any_Delivery_9158 3d ago

You should also create a .tar file of your directories to preserve you folder permissions. Although these may need to be trouble shooted because windows and Linux have different user privilege provisions 

I would also consider taking the time to setup Plex in a Docker container 

1

u/doeffgek 2d ago

I would suggest using Debian over Ubuntu for every server.

Until recently installing plex on Debian used to be a hassle but plex released an install script that makes it an easy install on any distro.

3

u/FunRutabaga24 3d ago

There is a migration guide. Pretty straightforward and work from my move from Windows to Ubuntu.

https://support.plex.tv/articles/201370363-move-an-install-to-another-system/

2

u/Well_Sorted8173 3d ago

I’ve been running it on Debian for years without issues. So that’s my suggestion.

1

u/Any_Delivery_9158 3d ago

Debian is the answer, unless you have never used Linux before and then Ubuntu LTS would also be a great choice 

1

u/doeffgek 2d ago

IMO for CLI devices Debian is always the way to go. There’s hardly any difference between the 2 in terms of learning curve. But Debian gives a way smaller and better manageable installation. But this is just my opinion.

For desktop users who are new to Linux I would suggest to begin with Ubuntu.

After installing the OS you only need to enter 1 command to install Plex from a script, so you’d hardly have any need for a DE all together.

1

u/Any_Delivery_9158 2d ago

Technically I agree with you. But OP is not using CLI, they used chat to move off Windows

What works best for you, or me, is not that solution for everyone. 

2

u/Rockglen 3d ago

Make sure that the account that Plex Media Server uses owns and has r/w/x access to the folder that you copied over.

You can use the chown command to do this.

I had to do this when restoring from a backup.

2

u/iibergazz_94 2d ago

i just changed my server from windows and installed ubuntu instead.. With the help of claude because i dont know anything about the code...

It works rock solid a week now... with automatic updates and Kometa!

1

u/Logical_Front5304 3d ago

Can’t speak to the steps, but I’d pick Debian or Ubuntu. In that order.

1

u/VTFreggit 3d ago

One question I have, Ubuntu or Debian or Fedora?

Debian is slightly harder to use in the learning curve and you may have to spend more time setting things up. It priorities stability over new features so some software might be behind others. Once you do get it going there isn't much more you will need to do.

Ubuntu is the more user friendly version of Debian. LTS typically updates the core every two years & graphics/kernel updates roughly every 6 months. Could be smaller things here and there that update.

Fedora in the same realm of easy to use as Ubuntu. However core updates can be almost every 6 months with smaller updates in between. Fedora keeps everything fresh and new.

I started with Ubuntu in a desktop environment but ended up moving to a headless Fedora Server. There is more upkeep than say Debian but I also have another computer that is my main desktop that I run Fedora workstation and I wanted the two (desktop and server) the same OS.

Another suggestion would be moving Plex to docker instead of just installing directly in Linux. I moved mine to docker on my Fedora server and its been great.

Whatever linux distro you decide to use there are some Linux permissions you will want to keep in mind. Plex has a support article that goes through some of what you need to do. Just glancing through the steps you posted and they appear correct. When in doubt, just take a look at Plex's move an install support pages as well.

1

u/AndyRH1701 Lifetime PlexPass 3d ago

I am in a Proxmox LXC, but if I was bare metal it would be Debian.

When I moved a while back I simply pointed the Linux build at the Windows data store and configured the Linux server. This gave me a clean new build and plenty of time to make sure the Linux build was correct because the Windows server was still running.

During the testing and learning phase of the Linux build a data copy was running to move the data to the new location.

Once the Linux server was built and I was happy I shutdown Plex on Windows.

For the data move, the Linux build saw both the old store and the new store. (4 days to copy) Once the copy completed I removed the Windows store from the Linux system and did a little library cleanup and I was done. No down time which was important to my most important user...

This method has 2 things that may be important.

  1. Requires 2x storage for a period of time.
  2. If the users do not set the "Sync My watch state and ratings" to active then they will loose the watch state of the media.

1

u/jasno- 3d ago

I gave up. I never could get it to work and ended up buying a windows license 

1

u/Noclahle 3d ago

Tengo exactamente dos meses que migre a Linux y no porque en Windows no funcionará sino que sub utilizaba el equipo, por esa razón me Cambié, sin embargo a pesar de mi biblioteca de años no importe nada, los motores de búsquedas son muy rápidos así que tarde 1 hora en hacer las pequeñas correcciones que tuvo y recrear las colecciones, siento que es más fácil una instalación completamente limpia que migrar. Lo que si hice fue cambiar el formato de los discos a Ext4, eso tardo más tiempo que hacer la instalación limpia, no te compliques no es mucho lo que pierdes más mucho lo que ganas en tranquilidad

1

u/Affectionate_Hawk736 3d ago

Why are you moving off windows?

1

u/akatherder 3d ago

If you're planning to use containers I would use OpenMediaVault, which is based on debian. It's styled (slightly) like a NAS with a web gui to do most of the basics. You can also ssh and do regular debian command line.

If you aren't a Linux expert and you want containers. OpenMediaVault for the os and Portainer helps setup and manage containers. They make Linux and docker much easier to manage and learn for a novice.

1

u/63walker 3d ago

I stopped reading because you listed too many unnecessary or wrong steps.

My video shows how to move from Windows 10 to either a new Windows 11 install or into Ubuntu as a Docker container spun up by Portainer, which makes the video stale because of the later release of Dockhand, which is a better container manager than Portlainer.

If you'd like, I can whip up a fresher tutorial to show moving a test Windows 11 Plex Server to Ubuntu 26.04 using Dockhand to spin up the new Plex server.

https://youtu.be/whmhDhgV9fM

Here's my suggested steps from memory.

  1. Create a small test Plex movie library by copying about a dozen random movies into it to sure it is your Canary in a coal mine to test with once the servers transplanted to make sure you don't lose existing metadata.

With half of those titles, edit in a goofy movie poster from the options that you'd never actually use, to represent custom metadata.

2. Enter the webapp to accomplish the following.

Enter your personal account settings in the webapp to turn on the sync watch history across multiple servers option.

Move to the settings of the webapp and go to the settings area of the left side and click into Library.

Disable the first 5 options if any are enabled, with the last option of automatically emptying the trash a very important one to uncheck.

Drop down the sidebar to select troubleshooting, and for good measure clean bundles and then optimize database.

Slide up the side bar to where your name is and select Authorized Devices and then move to the right to change all to server.

Copy your server name to a scratch pad document in case you need it if the transplanted server doesn't retain its original server name, which isn't likely to happen.

3. Stop the Plex server from running.

4. My video description has the relevant support article to find the Plex application folder, and that info is also in my video.

5. Zip up the Plex application folder and copy the zip file to a known good flashdrive. The server must be stopped, and also stopped as a service to zip it up. You also don't want it to accidentally restart on the next Windows reboot, to then have two servers running with the same name. This is also a critics step.

6. Get your Linux desktop or NAS OS installed.

7. With a Linux Desktop install use terminal to install Dockhand, or with a NAS SSH in to install Dockhand the same way.

8. Follow the way I modify a Docker compose script from Marius hosting to get the Plex server container installed on the new system.

I need to make a fresh video because you can't use the health check anymore and the Marius Hosting guides for a Synology or Ugreen NAS has been updated with a working heath check.

9. Once Plex is up and running use Dockhand to stop the container because all we want to do at this stage is to create the proper application structure.

10. Delete the right sub-folder and contents of the new install.

11. Copy not move the zipped Plex server to the appropriate subfolder on the new system, so that it's extracted files land where you just deleted the other subfolder.

12. Spin the container back up from within Dockhand.

13. Follow my steps in the video to claim the transplanted server via it's direct IP address and if all went well, it will retain it's original server name.

14. In the webapp, enter Manage at the bottom and pick Libraries.

15. To the right hover over that test movie library you created and clock edit library.

Then click add folders on the new side bar.

Leave the old path as a partial visual giid while you add the new path.

When you're sure you've added the correct new path, remove the old path and clock save changes, which will initiate a new library scan.

Enter the newly scanned library to look for evidence that your custom metadata is intact.

If you see any Trash Can icon superimposed on your movie posters something went wrong and your previously scanned test media is now disconnected you haven't lost the metadata but it hasn't connected to wherever you moved your files to.

16. If the test library is properly connected to your media, rinse and repeat step 15 for the remainder of your libraries.

Your success is dependent on each library being pointed at the same structure it was pointed at on the old server.

The actual structural library folders can be changed from a flat structure to a nested structure, but the contents of the actual library folder itself can't change.

I need to put out an updated video on ao move from Windows to Ubuntu because of both Dockhand and the updated container health check script, and will get that accomplished sometime this weekend if you're not in a rush.

Also, my apologies I am not going to go back and look for grammar errors or spelling issues.

1

u/HighSeasArchivist 2d ago

I did this last Saturday on a HP Mini 800 G9 13500T with Ubuntu 24.04LTS, and it works perfectly with QuickSync and all history backed up. I just had Claude do it for me since I absolutely had to have it go flawlessly as quickly as possible. None of my users even noticed it was down for 30mins that morning, but I did a bulk Metadata move earlier in the week to speeds up changeover day. 

1

u/deadGigabyteboard 2d ago

For Headless NAS, I use xpenology. Synology DSM uses Linux.

1

u/geekwithout 2d ago

Its not bad at all. Some sql knowledge is handy. I slapped mine from windows on a proxmox lxc. Best decision ever. Rock solid compared to the junk on windows. Trancoding just works w zero effort. Backups a breeze. Moved rr stack too. Its been working outstanding.

1

u/jlipschitz 2d ago

I run mine in Docker on Unraid. I migrated my Plex Database from windows to Linux. It kept my watched data and saved server data for devices because the computer had the same name as my windows server that I ended up retiring. I used the same media structure and just pointed the libraries at the new path.

1

u/maltesepricklypear 2d ago

Headless and docker

1

u/Away_Candidate_4746 2d ago

Just do Docker images. Assuming you’re also using *arrs and all that. You’ll be much better off putting it all in containers compared to Linux native installs. I went from Windows to Unraid personally.

1

u/Specific-Action-8993 2d ago

You can do a lot of the migration on the same machine by switching to Plex in docker in wsl. That lets you get your directory structure changed over before you fully migrate and you can continue to run the windows install if you screw up and need to roll back.

What I did was have my disks all pooled with stablebit drivepool (e.g. P:\media\movies) and then in Linux the same name for a mergerfs pool (e.g. /mnt/media/movies). So the remapping was just the top directory.

1

u/thefanum 2d ago

Ubuntu LTS is the only way to go

1

u/Djghost1133 10h ago

If you don't need Linux for anything else besides plex I'd recommend either truenas or proxmox