Running Plex server in a container in Silverblue

I want to run Plex server in a container in Silverblue. When I used docker I simply just used docker-compose is there a way to use Podman to create a container with plex server inside. I used this site https://hub.docker.com/r/linuxserver/plex/ to set up with docker and docker-compose how can I do it with Podman?

Thank you,

Gordy

Maybe try podman-compose. I haven’t used it myself, but maybe it will work for you.

We should get that packaged into an rpm. cc @alsadi

You could try and see if this works for you. It’s works on Fedora, CentOS, and RedHat.

If I’m reading the docs on the first docker hub link correctly, that docker-compose.yml file is only running one service anyway, so it doesn’t serve much of a purpose when a oneliner would suffice. I would ditch the compose step entirely. It should be easy to bypass it using podman run the first time (and then podman start plex subsequent times).

I don’t use Plex, so this is untested, but converted to podman run it would be something like this:

podman run -it \
  --name=plex \
  --net=host \
  -e PUID=1000 \
  -e PGID=1000 \
  -e VERSION=docker \
  -e UMASK_SET=022 \
  -v /path/to/library:/config \
  -v path/to/tvseries:/tv \
  -v /path/to/movies:/movies \
  -v /path for transcoding:/transcode \
  --restart unless-stopped \
  -d linuxserver/plex

I would probably try without the UMASK, PUID and PGID variables first, since you might not need it in a rootless container like podman. But I’m not sure, try with them if you can’t make it work. Also, I’m not sure what the restart flag does. Do you need this? (The plexinc/pms-docker container has a couple of different flags, you could modify that instead.)

If you need to access the file system after creation, you can use podman exec -it plex bash.

I’m glad someone is developing the podman-compose tool for simple existing docker-compose.yml setups, but when you need a multi-container setup, I would research the podman pod command to chain two or more containers together instead. It’s more powerful, and since it’s a part of core podman, it will be less buggy than podman-compose (absolutely no offence intended to the devs).

In this case, though, you shouldn’t need any of them.

I run linuxserver/plex in a Docker container on Silverblue (non-docker compose).

What advantage would Podman have over Docker? I understand that Podman doesn’t have a daemon and that it runs the container in user mode, is that important?

According to the documentation, it looks like I would simply have to replace the word docker with podman to all my used commands:

To pull the image for docker.io.
podman pull linuxserver/plex

To create the container from the image:

podman create \
--name=plex \
--net=host \
--restart=always \
-e VERSION=latest \
-e PUID=1000 \
-e PGID=1001 \
-e TZ=America/New_York \
-v /var/lib/docker/plex/config:/config \
-v /mnt/data/TV\ Shows:/data/TV\ Shows \
-v /mnt/data/Movies:/data/Movies \
-v /mnt/data/Music:/data/Music \
-v /mnt/data/Documentaries:/data/Documentaries \
-v /mnt/data/Anime:/data/Anime \
-v /mnt/data/Youtube:/data/Youtube \
-v /var/lib/docker/plex/transcode:/transcode \
linuxserver/plex

Currently I transcode in the /var/lib/docker/plex/transcode/ directory. I imagine that should be changed to a non-docker specific location. Perhaps /tmp/transcode.

To Start the server:
podman start plex

To view the images, and prune the images.

podman image ls
podman image prune

To stop and remove the container,

podman stop plex
podman rm plex

Finally to remove the image;

podman rmi 59634fd16d38

What I am not sure is how to insure that podman stays on, even during reboots. Currently the Fedora-toolbox:30 is aways on, so I suppose once it’s started the “restart=always” will take care of it remaining on.