I will be using Ubuntuserver in this guide. You can select whatever linux distro you prefer.
Download ubuntu server from https://ubuntu.com/download/server. Create a bootable USB drive using rufus or any other software(I prefer ventoy). Plug the usb on your computer, and select the usb drive from the boot menu and install ubuntu server. Follow the steps to install and configure ubuntu, and make sure to check "Install OpenSSH server". Don't install docker during the setup as the snap version is installed.
Once installation finishes you can now reboot and connect to your machine remotely using ssh.
ssh username@server-ip
# username you selected during installation
# Type ip a to find out the ip address of your server. Will be present against device like **enp4s0** prefixed with 192.168.
Create the directories for audiobooks, books, movies, music and tv.
I keep all my media at ~/server/media. If you will be using multiple drives you can look up how to mount drives.
We will be using hardlinks so once the torrents are downloaded they are linked to media directory as well as torrents directory without using double storage space. Read up the trash-guides to have a better understanding.
mkdir ~/server
mkdir ~/server/media # Media directory
mkdir ~/server/torrents # Torrents
# Creating the directories for torrents
cd ~/server/torrents
mkdir audiobooks books incomplete movies music tv
cd ~/server/media
mkdir audiobooks books movies music tv
Jackett is where you define all your torrent indexers. All the *arr apps use the tornzab feed provided by jackett to search torrents.
There is now an *arr app called prowlarr that is meant to be the replacement for jackett. But the flaresolverr(used for auto solving captchas) support was added very recently and doesn't work that well as compared to jackett, so I am still sticking with jackett for meantime. You can instead use prowlarr if none of your indexers use captcha.
Sonarr is a TV show scheduling and searching download program. It will take a list of shows you enjoy, search via Jackett, and add them to the qbittorrent downloads queue.
I personally only use jellyfin because it's completely free. I still have plex installed because overseerr which is used to request movies and tv shows require plex. But that's the only role plex has in my setup.
I will talk about the devices section later on.
For the media volume you only need to provide access to the /data/media directory instead of /data as jellyfin doesn't need to know about the torrents.
As I mentioned in the jellyfin section there is a section in the conmpose file as "devices". It is used for transcoding. If you don't include that section, whenever transcoding happens it will only use CPU. In order to utilise your gpu the devices must be passed on to the container.
The default username is admin and password adminadmin. You can change the user and password by going to Tools → Options → WebUI
Change "Default Save Path" in WebUI section to /data/torrents/ and "Keep incomplete torrents in" to /data/torrents/incomplete/
Create categories by right clicking on sidebar under category. Type category as TV and path as tv. Path needs to be same as the folder you created to store your media. Similarly for movies type Movies as category and path as movies. This will enable to automatically move the media to its correct folder.
Sonarr
Navigate to YOUR_SERVER_IP:8989
Under "Download Clients" add qbittorrent. Enter the host as YOUR_SERVER_IP port as **8080,** and the username and password you used for qbittorrent. In category type TV (or whatever you selected as categoryname(not path) on qbittorent). Test the connection and then save.
Under indexers, for each indexer you added in Jackett
Click on add button
Select Torzab
Copy the tornzab feed for the indexer from jackett
Copy the api key from jackett
Select the categories you want
Test and save
Under general, define the root folder as /data/media/tv
Repeat this process for Radarr, Lidarr and readarr.
Use /data/media/movies as root for Radarr and so on.
The setup for ombi/overseerr is super simple. Just hit the url and follow the on screen instructions.
Bazarr
Navigate to YOUR_SERVER_IP:6767
Go to settings and then sonarr. Enter the host as YOUR_SERVER_IP port as 8989. Copy the api key from sonarr settings→general.
Similarly for radarr, enter the host as YOUR_SERVER_IP port as 7878. Copy the api key from radarr settings→general.
Jellyfin
Go to YOUR_SERVER_IP:8096
Add all the libraries by selecting content type and then giving a name for that library. Select the particular library location from /data/media. Repeat this for movies, tv, music, books and audiobooks.
Go to dashboard→playback, and enable transcoding by selecting as VAAPI and enter the device as /dev/dri/renderD128
Monitor GPU usage while playing content using
sudo intel_gpu_top
Heimdall
Navigate to YOUR_SERVER_IP:8090
Setup all the services you use so you don't need to remember the ports like I showed in the first screenshot.
Updating docker images
With docker compose updates are very easy.
Navigate to the compose file directory ~/server/compose/media-server.
Then docker-compose pull to download the latest images.
And finally docker-compose up -d to use the latest images.
Remove old images by docker system prune -a
What's next
You can setup VPN if torrents are blocked by your ISP/Country. I wanted to keep this guide simple and I don't use VPN for my server, so I have left out the VPN part.
You can read about port forwarding to access your server over the internet.
Is it possible to do this all on Raspberry Pi OS? I purchased an 8GB RPi 4 and it came with Buster pre-installed. I don’t have any other computer. I have no way of writing Ubuntu onto a micro SD. :/
Yes, you can use a Pi4 to accomplish the results of this guide, I used a Pi3B+ for a few years without any major issues. However, you will not be able to follow this guide to get it set up, as Pi's are a different architecture and so you need different images for the initial setup regarding Ubuntu. Mostly everything after that will be the same though.
Just keep some spare copies of your setup mirror imaged to another SD card once you're all done and you are golden. Configure your download settings in Sonarr/Radarr to avoid 4k content, that's the only real limitation of the Pi's, outside of the SD card lifespan (solved mostly by just not logging).
@spacecowboy - not being able to write an image will make the Pi4 as a server a biiit more difficult. Do you have an android phone? There's etchdroid or Pi SD Card imager, which materials to use for can cost under $10 (you'd want the SD card reader that can plug into your phones port, for example). It's fleeting otherwise, chances are high that you will get it set up and then the SD card will die and you'd be out of luck regardless.. If the Pi is your only computer for now, then I'd keep it that way. Either way, I do highly suggest some backup SD cards, they are cheap and you rarely need more than 32gb for the operating system and basic usage - anything with heavy logging or storage should be kept on an external hard drive.
While it's possible with an android device, even maybe a library computer with permission for USB devices and temporary downloads would be a good option. It's really nice to be able to get your server all setup and then make a duplicate of the SD card, which I don't believe is possible on android. It's imperative to have a backup since SD cards do have a lifespan, using it as a main server with no backups is putting all your eggs in one basket. All it takes is forgetting to disable logging and the clock starts ticking.
It's also nice to be able to test out different operating systems, as you might find that Buster has more overhead than something like DietPi, a command line based OS, as well as being slightly less straightforward for your needs if the Pi is going to be a headless server. But like I said, if you're using the Pi as a regular computer, DietPi won't be a viable option since it has no GUI.
Thank you for this detailed response. I was able to buy a USB-stick-style SD/mSD reader/writer and a couple of 128gb cards to go with it. I have ubuntu up and running now and a backup as well. I tried following this guide but I keep running into issues around the docker compose part. I think I am in over my head at this point and will just make a local setup the way I know how and try again in the future.
Thanks for the tips about saving my bacon with multiple SD cards.
Yes it is possible, Ive been running simmilar setup on 4 gb model. Raspberry pi is too weak to transcode so you are stuck with direct play - aka you have to download (set in radarr/sonarr) quality that your player supports, but thats easy task for *arr stack.
You can probably use PC in local library, but you might need to bring your SD card reader. Its good to have option to start over if something goes wrong like SD card dying