/Docker-Scripts

One script to install Docker and Docker Compose, along with a curated list of applications for setting up a Media Server or other containers.

Primary LanguageShell

Home Media Server Setup

This script helps you install the latest version of Docker and Docker Compose in Ubuntu/Debian and some essential applications for setting up your home media library.

The list of apps that will be automatically installed are:

Prerequisites

  1. You need to have an Ubuntu/Debian-based machine.

  2. Your instance should have the updated version of 'git' installed. You can check if you have git installed or not by running the command git version and looking at the output.

    git version

    If you do not have git installed, you can use the command sudo apt update && sudo apt install git to install the latest version of git in your system.

  3. You need to know the PUID and PGID values for the current user. You can get that by running id and looking at the first two values. It will most likely be 1000,1000 or 1001,1001 unless you have some special purpose distros.

    id

Installation

Open Putty or any ssh tool that you use to connect to your instance. Clone this repository to any directory.

git clone https://github.com/Jayavel-S/Docker-Scripts and cd into the parent directory cd Docker-Scripts.


Here, you'll have three files

  • .env (Most likely hidden by the system, used to declare the environment variables and the volume mappings)

  • docker-compose.yml (the compose stack to install Portainer, Sonarr, Radarr, Sabnzbd, Deluge, Overseerr, Jackett, Tautulli, Plex, and Watchtower)

  • setup.sh (the script to install the docker engine and to set up the dependencies)


Before proceeding further, we need to update the environment variables (PUID, PGID, and the Time Zone) and the volume mappings as per your preference. This example uses the 'nano' editor, but you can use any text editor of your choice.

Type in nano .env and edit the values as required. You need to update the download directory's path and the directory in which the media resides.

env

Once you have made the necessary changes, you can press "ctrl+o" and "Enter" and "ctrl+x" to exit the editor. Alternatively, you can also press "ctrl+x" directly and choose 'Yes’.

This will update the .env file with the necessary values. Now, we can start to execute the script.

Executing the Script:

The script is named as install.sh. Run the script with elevated privileges.

sudo sh install.sh

This will pull the latest version of docker according to the platform you are using (x86/x64/ARM) and install the docker-compose relevant to that binary using python. Depending on your network speed and device specifications, this will take a few minutes.

Once the installation is complete, it is always suggested to reboot the system and check for the status.

sudo reboot now, and once the machine is back up, you can go to your Portainer GUI. It defaults to the port 9443.

Go to https://(your device's IP address):9443 (Portainer generates an SSL certificate by default in the new version, that's why we use https:// instead of http://)

Once logged in, you need to set up your admin account, and you'll be presented with the dashboard.

portainer

The system has successfully processed the docker installation if you see this page. You can now play with your new setup and configure the applications as per your liking.