Since the filesystem has no concept of user namespaces, we have to rely on these user and group id mappings to control access across namespaces. Output of `ls -al /media` by the end of this guide. This is because Podman has set the owner of that directory to the user id of media within to the Podman namespace. If you now run ls -al on the /media directory you should see an id in the hundred of thousands, e.g. # assign id of `media` user to MEDIA_UID MEDIA_UID=$(id -u media) # assign id of `media` group to MEDIA_GID MEDIA_GID=$(id -g media) # change ownership in podman namespace podman unshare chown $ MEDIA_UID:$ MEDIA_GID /media To enter the Podman namespace, we use the podman unshare command. This namespace has its own set of user and group ids that map to your user session ids. However, Podman runs in a different user namespace then your user session. In order to run this container rootless, we need to set ownership of this directory to the media user and group. # create directory sudo mkdir /media # make yourself the owner sudo chown $(id -u -n):$(id -g -n) /media If you prefer, you can use a container volume which might simplify the setup but I find it less convenient for managing my files directly from my host machine. Note: in this guide, we are setting up a bind mount. This is where both the application configurations and downloaded files will be stored. We’ll create a directory at the root of the filesystem called /media. Now that we have a new user and group, we need to create a place for this user and group to store files. # create user, `-M` prevents home directory creation for this user sudo useradd -M media # create group sudo groupadd media # add user to group sudo usermod -a -G media media We then add it to a new a group, also called media. For this guide, we create a user called media. This is recommended to limit the service privileges in the event that someone malicious gains access to them. Next, we need to create a user and group to run your media services from. For example, to see your running containers, run: # same as running `docker ps -a` podman ps -s As mentioned before, podman commands are compatible with docker commands. Verify your install by running podman version. sudo dnf install -y podmanīy installing with sudo both root and regular users will have access to Podman. The first thing we want to do is install Podman. Please check out the links I’ve provided throughout this guide to familiarize yourself with the technologies involved. I created this guide after stumbling through getting these media services setup on my own and am in no way a Linux or containerization expert. This article is intended for educational purposes. HTPC Guides has very detailed guides about installing and setting up both Sonarr and NZBGet.The goal of this guide is to get the above services running in containers Disclaimer Install Sonarr and NZBGet on your Raspberry Pi A good place to start is the subreddit /r/usenetinvites. Most paid indexers are invite-only platforms, so it might take a little bit of work to get an invite. Free services are less reliable when it comes to that. The other thing you might need is to sign up at one or two paid indexers which cost around $10 a year. The advantage of those is that you usually don’t have problems with finding new episodes. ![]() You’ll need the account details of such a provider while setting up NZBGet. ![]() ![]() To access Usenet’s file-sharing service, you need to sign up at one of the many Usenet providers such as Supernews or UsenetServer. Sonarr checks the NZBGet’s process and marks the episode as downloaded.NZBGet downloads the episode, extracts it and moves it to a specified folder.As soon as Sonarr finds a new or missing episode in the quality you want, it sends an instruction to NZBGet to download it.Sonarr keeps quering the indexer’s “feed” looking for episodes which are still missing.You add a TV show to the Sonarr database.Below is a basic example of how they work together: Although NZBGet and Sonarr are two separate programs, they are connected and communicate with each other. NZBGet is a robust and lightweight Usenet downloader which, as the name already says, is responsible for downloading the episodes that Sonarr finds.
0 Comments
Leave a Reply. |