Package: podarr
What it ispodarr is a Python application to easily manage Plex Media Server and some of other applications through podman rootless containers. Other than the requirements and podarr itself, no other application is required in the user's system.It is basically a collection of knowledge to make everything works the easier and safer way possible.Available servicesFor now, these are the supported services, but more could easily be added.RcloneMergerFSPlex Media ServerRadarrSonarrLidarrBazarrProwlarrSABnzbdqBittorrentAuto BackupAuto UploadWeb interfaceRequirementsTo enable podman rootless functionalities, afew tweaks are necessary(not necessary on Fedora):touch/etc/subuid/etc/subgid
chmod644/etc/subuid/etc/subgid
usermod--add-subuids100000-165535--add-subgids100000-165535$USERpodarr relies on user's systemd services to control the applications. So, in order to allow user systemd services to run when it's not logged in, user lingering must be enabled. To check if linger is enabled for the current user, typels /var/lib/systemd/lingerin the terminal and check if the user is in the list. To enable lingering for the current user:loginctlenable-linger$USERFor now, if your Linux distribution is shipped with SELinux, it must be set to permissive or disabled. I'm looking for a workaround on this (let me know if you can help). To set SELinux to permissivesudo nano /etc/selinux/configand changeSELINUX=enforcingtoSELINUX=permissiveorSELINUX=disabled. A reboot is required.podman: podarr is basically a wrapper for podman. So, in order for it to work, podman must be installed in the system. Podman comes out of box with many Linux distributions, mainly Fedora). You can checktheir official websitefor further instructions.To install podman on Fedora:sudo dnf install podmanTo install podman on Debian and Ubuntu:sudo apt-get install podmanTo install podman on Arch Linux and Manjaro:sudo pacman -S podmanTo install podman on Alpine:sudo apk add podmanRclone: it's required if you plan to use Rclone. Since it's version 1.58, Rclone is required to get authorization code of a remote. I'm working on a way to use the container to avoid the need to install this package. You can checktheir official websitefor further instructions.To install Rclone on Fedora:sudo dnf install rcloneTo install Rclone on Debian and Ubuntu:sudo apt-get install rcloneTo install Rclone on Arch Linux and Manjaro:sudo pacman -S rcloneTo install Rclone on Alpine:sudo apk add rclonePython3 and Pip: podarr is an Python application, so it requires the latest version of Python to work. You will also need Pip if you want easily install it.To install Python3 and Pip on Fedora:sudo dnf install python3 python3-pipTo install Python3 and Pip on Debian and Ubuntu:sudo apt-get install python3 python3-pipTo install Python3 and Pip on Arch Linux and Manjaro:sudo pacman -S python python-pipTo install Python3 and Pip on Alpine:sudo apk add python3 py3-pipWhen it comes down to podarr itself, as of the Python application, it requires the following Python modules to work, which are automatically installed when installed through Pip:inquirerfastapiuvicornconfigobjSQLAlchemypydanticpsutilrequestsfastapi-utilsIf you'd like to see a podarr command to automatically set up the requirements,let me know.InstallationOnce requirements are met:pipinstallpodarrSetting upTypepodarr installto choose the desired services and to continue to the installation process. Things should be self explanatory from there. Use space to select services and enter to continue.Typepodarr helpfor further instructions.Setting up RcloneRclone can be used to mount a remote directory locally, allowing it to be used by the other services.I plan to add more flexibility on how Rclone works inside podarr. For now, the remote directory (/media) has the following structure (safely created during setup):├── backups
└── media
    ├── movies
    ├── music
    └── tvIf you choose Rclone during the setup, it will prompt you to configure Rclone. In the processes, it will be asked you to run a Rclone command to get the authorization code, which should be pasted back. I'm working on a way to allow the usage of an existing Rclone config. The config has the following structure and is located at~/.podarr/rclone/rclone.conf:[remote]
type = drive
stop_on_download_limit = true
client_id = ...
client_secret = ...
team_drive = ...
scope = drive
token = ...

[remote-crypt]
type = crypt
password = ...
directory_name_encryption = true
filename_encryption = ...
remote = remote:The media directory will be mounted at~/.podarr/rclone/remote/library, which will make a part of the MergerFS pool, as explained below.The Auto Upload service will use Rclone to upload content.How it worksAll data, settings and container configuration files are stored in the folder.podarr, located in the user's home directory:podarr uses aMergerFScontainer to center all files (local or remote) in a single folder:~/.podarr/data/pool. Therefore, a MergerFS container will always start prior other services (except Rclone).For atomic move to work, Radarr, Sonarr and Lidarr requires Remote Path Mappings (planning to automatically set this up):Remote Path: /data/local/usenet/complete/Local Path: /data/pool/usenet/complete/The containers of all services will have the correct permissions to read or read and write on that directory.While services are running, user cannot perform write operation on most of~/.podarrsubdirectories. This happens because the ownership of these folders are given to the user namespace. Once the service is stopped, ownership is revoked back to the user.The web service/interfaceIt's a work in progress.I'm not good at design. Any help is welcome.Works to doFuturely, port this application to Rust.For now:Allow usage of existing Rclone config.Workaround for SELinux.Perhaps, use Rclone and podman precompiled binaries.Single container with all available services.Bug fixes.