I think this should work? I used this method when migrating my plex server to a lxc container.
If you're planning to mount the data directories on the host for your docker setup it should be relatively straight forward I think, docker volumes a little less so. Thinking through it, you'll need to run the container first time with the volumes mounted wherever you like so the container will populate the host mounted data directory with the folder structure, initial database, config file(s) logs, cache, etc. Then it should be as simple as backing up the initial data files just in case, swapping in a copy of the database you've got already got running, the config .xml? I believe, the cache directory, and the logs if you'd like. It's been a while since I've had Plex deployed so I could certainly be missing something though.
Edit: create -> run
You can just copy over the Library folder, that should do it. Then set up the plex Docker to use bind mounts instead of volumes and place your old library into that bind mount.
I usually do ~/docker/plex/Library
and have the Docker compose file in the ~/docker/plex
folder
I accomplished this and found it was pretty easy. Like everyone else said, just point the volumes to the right directories. Backup your Plex data (not the media) a few times in case you screw up and it starts to index existing files as if it were old files.
Probably the hardest part for me was 'claiming' the server using their startup token. And even then that was fairly easy.
You're hosting on Ubuntu so this isn't a problem, but PMS basically requires its own IP on your intranet (not the Docker internal subnet) so Mac's Docker implementation fails to provide this capability.
If you use hardware transcoding or similar features, you'll have to find out how to pass the necessary devices through into the docker container!
This tutorial does this (if I read the compose fole right). https://drfrankenstein.co.uk/2021/12/06/plex-in-docker-on-a-synology-nas-hardware-transcoding/
Not sure if it is any good, I haven't tried it.
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!