Media server setup on Fedora Workstation
May 27, 2022
Overview
I purchased a lifetime license for Plex Pass several years ago, and Plex is still my go-to media server. This will be a very short post on how I setup the Plex media server using Podman on Fedora Workstation. I will also briefly mention SABnzbd, Sonarr, and Radarr for educational purposes.
Plex server
Installing the Plex server is fairly straightforward. A claim code can be acquired from plex.tv/claim. UDP port 1900 is required for the Plex DLNA server. I don’t use this port with Plex though since I don’t use the DLNA server, and it interferes with my Unifi Controller which I also run on the same server.
# Create a directory for the configuration
mkdir ~/.config/plex-container
# Create the Podman container
podman run --detach --name plex -e PLEX_CLAIM=claim-code -p 32400:32400 -p 3005:3005 -p 8324:8324 -p 32410:32410/udp -p 32412-32414:32412-32414/udp -p 32469:32469 -v ~/.config/plex-container:/config:Z -v /storage/tv:/tv:z -v /storage/movies:/movies:z docker.io/linuxserver/plex
# Create a systemd service
podman generate systemd --restart-policy=always plex > ~/.config/systemd/user/plex-container.service
# Enable the service
systemctl --user enable plex-container.service
Once the service has been enabled and started, you can visit localhost:32400/web to begin configuration. On Fedora Workstation, high level ports are allowed through the firewall by default. In other cases, you may need to specifically allow the ports required by Plex. There are only a few settings that I change on the Plex server. The first is under “Library”. I enable the option for periodic library scans and usually set it to every 2 hours. The other setting is under “Network”. I add my local subnet (x.x.x.0/255.255.255.0) as IP addresses that are allowed without authentication. This allows me to still access the Plex server at home even if my internet is out. That’s basically it. Easy.
If you happen to have a HDHomeRun tuner, as I do, it works perfectly with the Plex server. I have the basic TV tuner and use my Plex server to interface with it. This allows the TV channels to be available anywhere I have a Plex client. The Plex server will also act as a DVR. This is all very easy to configure, and I have had no issues at all.
SABnzbd
It is also fairly easy to setup SABnzbd with Podman. In the example below, I’m mapping internal port 8080 to external port 8181. I’m doing this because port 8080 is already in use for my Unifi Controller.
# Create directories for the configuration and downloads
mkdir ~/.config/sabnzbd-container
mkdir ~/.local/share/downloads-container
# Create the Podman container
podman run --detach --name sabnzbd -e TZ=America/New_York -p 8181:8080 -v ~/.config/sabnzbd-container:/config:Z -v ~/.local/share/downloads-container:/downloads:z docker.io/linuxserver/sabnzbd
# Create a systemd service
podman generate systemd --restart-policy=always sabnzbd > ~/.config/systemd/user/sabnzbd-container.service
# Enable the service
systemctl --user enable sabnzbd-container.service
There are many settings (be sure to show advanced settings) that can be tweaked. Some that may be of particular interest are: SABnzbd host IP address, launch browser on startup, max line speed, percentage of line speed, permissions for completed downloads, and check before download. Once the container is up and running, “complete” and “incomplete” subfolders can be created inside ~/.local/share/downloads-container
. These folders will need to have their user and group changed to match the parent “downloads-container” folder. They can then be specified in the SABnzbd settings which are located at localhost:8181.
Sonarr
Running Sonarr with Podman follows a similar process.
# Create a directory for the configuration
mkdir ~/.config/sonarr-container
# Create the Podman container
podman run --detach --name sonarr -e TZ=America/New_York -p 8989:8989 -v ~/.config/sonarr-container:/config:Z -v /storage/tv:/tv:z -v ~/.local/share/downloads-container:/downloads:z docker.io/linuxserver/sonarr
# Create a systemd service
podman generate systemd --restart-policy=always sonarr > ~/.config/systemd/user/sonarr-container.service
# Enable the service
systemctl --user enable sonarr-container.service
The folder where Sonarr will be storing files must allow Sonarr full access. An easy way to do this is simply to allow write access to everyone. This is not the most secure, but it typically doesn’t matter for the files Sonarr deals with. Configuration can be completed by visiting localhost:8989.
Radarr
More of the same for running Radarr with Podman.
# Create directory for the configuration
mkdir ~/.config/radarr-container
# Create the Podman container
podman run --detach --name radarr -e TZ=America/New_York -p 7878:7878 -v ~/.config/radarr-container:/config:Z -v /storage/movies:/movies:z -v /home/john/.local/share/downloads-container:/downloads:z docker.io/linuxserver/radarr
# Create a systemd service
podman generate systemd --restart-policy=always radarr > ~/.config/systemd/user/radarr-container.service
# Enable the service
systemctl --user enable radarr-container.service
Make sure your movies folder allows writing by the Podman container before importing movies in Radarr. This is especially true if you enabled the metadata option and don’t currently have metadata. When you import movies, Radarr will automatically add metadata based on settings. Configuration can be completed by visiting localhost:7878.
Start user services at boot
One last thing to mention. If you want your systemd user service to start at boot instead of at login, this can be enabled with # loginctl enable-linger username
. This will also keep the service from exiting when you log out.
Conclusion
Nice, short article. Maybe this was helpful or sparked some ideas.