Designing the ultimate media server for your TV and movie collection can be a challenge. What hardware should you use, what operating system should you install, and what kind of software should you be running?
Rather than waste your time trying to decide, here’s the answer. A Linux server, running all the media software you need, can be set up in less than an hour thanks to Docker. Let’s run through how.
What Is Docker?
Rather than installing software in the traditional manner on your PC, Docker lets you run them in secure containers.
They share the same physical environment as your operating system, but they run independently and separate from your main system, meaning you can test out and install different kinds of software without worrying about conflicts.
It’s the perfect platform for testing new applications, especially on a server, where one bad update or one script change can cause everything to fail. Docker also helps to speed up installing new applications, especially combined with DockSTARTer, a script for installing and updating media software containers using Docker.
Requirements for Installation
To use DockSTARTer (and Docker), you’ll need to prepare a server. DockSTARTer can run on any kind of machine that runs Linux, including a Raspberry Pi, but you should be aware that some software won’t run on ARM-based architecture like the Pi, which might limit your potential here.
While it doesn’t matter which Linux distro you choose as Docker will run on most distributions, the DockSTARTer script doesn’t work with Arch, so you wouldn’t be able to use this guide for that distro.
If you want to keep resource usage down, install server or headless versions of any distro you choose. These will come without a desktop environment and have a smaller resource footprint.
This is a media server installation, so you’ll need a capable CPU for transcoding media, which converts media from one format into others that media players can then play. If you’re planning some heavy usage, a CPU that can cope with multiple transcoded streams will be useful here.
This guide from Plex, the media streaming software, should help you figure out the kind of processor you’ll need.
You’ll also need enough storage space so that your server can also act as DIY network storage for your content if you don’t have a NAS already.
Step 1: Installing Git and Curl
To install Docker with DockSTARTer, you’ll need to open up a terminal window on your server or connect via SSH. You’ll need to install two bits of software first—Git and Curl. Git is version control software that allows developers to share their software, while Curl allows for data transfers from the internet.
To install on a Debian-based OS (Debian, Ubuntu, Raspbian, etc):
sudo apt install curl git
To install on Fedora:
sudo dnf install curl git
To install using Yum:
sudo yum install curl git
Step 2: Installing DockSTARTer
Once you’ve installed Curl and Git, you can proceed with installing DockSTARTer.
You have two options for installing Docker with DockSTARTer—you can install using the script provided by DockSTARTer, or perform a manual installation. Either is fine, but it depends on how paranoid you prefer to be when installing software using a script from the internet.
Installation With Script
To run the installation script for DockSTARTer, run the following at your terminal:
bash -c "$(curl -fsSL https://get.dockstarter.com)"
Once completed, type the following to reboot:
sudo reboot
Manual Installation
If you’d prefer not to use the provided installation script, the following commands will clone the git repository containing DockSTARTer and set it up before rebooting:
git clone https://github.com/GhostWriters/DockSTARTer "/home/${USER}/.docker"
sudo bash /home/${USER}/.docker/main.sh -i
sudo reboot
Step 3: Run DockSTARTer and Select Your Apps
With DockSTARTer installed, you can now begin setting Docker up with your containers. Start by typing sudo ds
in your terminal to begin.
To begin installing your Docker applications, select Configuration and hit enter, then Full Setup. Wait for the script to perform any actions before you’re presented with a list of apps to install.
Each app has a useful description next to it to help you choose. This is where you’ll need to consider what kind of apps you’ll need and want on your server. Do you intend on using it just for media streaming, or are you looking for software that can organize your media?
To help you choose, here are some possibilities:
- Plex, an all-round media server
- Emby, an alternative to Plex
- Airsonic, a media server for music
- CouchPotato, for automatic movie downloads
- Deluge, a BitTorrent client
- Sonarr, for automatic TV media downloads
- HTPC Manager, to manage certain media apps in one dashboard
This list isn’t exhaustive, so look carefully through the apps you have available. Use your keyboard up and down keys to scroll, and hit space to select each of the apps you want to install.
You should also ensure that you select two other apps—Ouroboros and Portainer. These are useful for Docker maintenance once you’ve finished using DockSTARTer. Ouroboros keeps your container apps up-to-date, while Portainer helps you monitor and configure Docker through a web UI.
Once you’re ready to proceed, hit enter.
Step 4: Configure Server Settings
There’ll be pre-configuration questions at this next stage, depending on the app you choose. For example, if you select to install the Deluge BitTorrent client, you’ll have to confirm which port settings you want to use.
Hit enter to confirm the configuration for each app (or select No, if you’d prefer to edit these).
After a few initial app configuration stages, you’ll be able to alter the timezone and hostname of your machine, as well as some default locations for media content. Select No, unless you’re happy with the default settings, and then hit enter.
The first option allows for the configuration of your server’s timezone. Assuming your system timezone is correct, choose Use System at this stage, or select another with Enter New. Edit the hostname in the following menu, either by using the current server hostname (if you’d prefer this, choose Use System again) or selecting Enter New.
The next menu asks you to choose various user ID and group IDs; it’s recommended you select the Use System option here.
You’ll then have to select the correct folder for Docker’s configuration file. Unless you’re planning to alter this, choose Use System. The next menu will ask if you want to set permissions on your Docker config file, select Yes and hit enter.
You can now start to edit folders for various media. You can select your own, but if you want your files to appear in your Linux user home directory, select Use System for each of these, or select Enter New for entirely new locations. If the folders don’t exist, DockSTARTer will ask for permission to create them, so hit Yes and enter.
Once completed, DockSTARTer will confirm changes to your Docker configuration file. At its final stage, it’ll ask whether you want to create the final containers for your apps; select Yes and hit enter and wait for the process to complete.
The apps will download and install in container “sandboxes” created to your specifications. This may take a bit of time, depending on the apps you’ve chosen, the resources of your server, and your internet connection.
Once it’s complete, your apps will install and be ready and running in Docker containers! Some may need further configuration, such as Emby, and may run with web UI’s for configuration. You can configure Emby, for instance, by visiting YourServerIpAddress:8096
with your web browser.
You can also configure and monitor your Docker installation with Portainer. Use your web browser to visit YourServerIpAddress:9000
where you’ll first create an administration account. Choose a username and password, then hit Create User.
A Linux Media Server, Ready in Under One Hour
Docker takes the pain away from installing a media server on Linux. Rather than installing each application separately, using DockSTARTer, you can install Docker and all the container apps you need in an hour or less, depending on how quick your server is (and assuming it’s already pre-built).
There’s no point having a media server, of course, without the right media player (or players!) to match. Build a media player using these Linux media center distros and turn your home into the ultimate media playback powerhouse.
Read the full article: How to Set Up a Linux Media Server in Under One Hour
from MakeUseOf https://ift.tt/2H8XWTp
No comments:
Post a Comment