Home Docker Server

As per the norm, I will skip the bumf and jump straight in to the process I used as you should know what you are doing, if not go off learn and come back

  1. Install Ubuntu Server 18.04 LTS:
    1. Download here: https://www.ubuntu.com
  2. If not installed during Setup, Install the following:
    1. OpenSSH Server: Instructions here
    2. Samba: Instructions here
    3. Standard Utilities: sudo apt-get install standard
    4. Udev (required for Plex & LiveTV: sudo apt-get install udev
  3. Install Docker:
    1. sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
    2. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
    3. sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable”
    4. sudo apt-get update
    5. sudo apt-get install docker-ce
    6. sudo docker run hello-world
  4. Install Docker Compose:
    1. Check latest version here – https://github.com/docker/compose/releases and change version in next step
    2. sudo curl -L https://github.com/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
    3. sudo chmod +x /usr/local/bin/docker-compose
    4. sudo usermod -aG docker ${USER}
    5. type “id” hit enter and note the uid of your user & gid of docker
    6. type “cd ~ ; pwd” hit enter and note location of user directory
    7. sudo nano /etc/environment
    8. Replace/Configure “PUID” & “PGID” as listed above, “TZ” as listed here, “USERDIR” of the docker user & “MYSQL_ROOT_PASSWORD” for MariaDB and phpMyAdmin
    1. Type “exit” hit enter and log back in
  1. Basic Docker & Docker Composer
    1. mkdir ~/docker
    2. sudo setfacl -Rdm g:docker:rwx ~/docker
    3. sudo chmod -R 775 ~/docker
  2. Create basic Docker Compose File
    1. nano ~/docker/docker-compose.yml
    2. Add the following:
version: "3.6"

Why not check out my docker-compose.yaml here. I highly suggest installing the following:

      • Portainer – Container Management
      • Organizr – Tabbed web interface for all your container
      • NGINX – Reverse proxy
      • Watchtower – Automatic Container updating

You may also want to check out this article here on mounting external storage if you are using Plex, ZoneMinder etc

  1. Starting docker compose
    1. docker-compose -f ~/docker/docker-compose.yml up -d