Skip to content

Setup Guides

I-am-PUID-0 edited this page Nov 27, 2024 · 18 revisions

Note

🚧 This page is a Work In Progress. Please check back later for updates.

Complete Beginners Guide

Note

This guide will use Ubuntu, so the commands used may differ if using a different Linux distro.

Install Docker

From Ubuntu, install Docker by pasting the following into the Ubuntu Command Line Interface (CLI); follow the prompts.

curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

If you receive the following prompt during the Docker install, then follow the steps here: Windows Setup Guide (Docker/WSL)

WSL DETECTED: We recommend using Docker Desktop for Windows.
Please get Docker Desktop from https://www.docker.com/products/docker-desktop/

With docker now installed, enter the following command:

docker compose version

If the output is similar to the below, then docker and docker compose were successfully installed:

ubuntu@DMB:~$ docker compose version
Docker Compose version v2.24.2

Define the directory structure

Note

Note: If you already have a directory structure you'd like to use, then you can skip this step.

Create a directory for docker in your user directory and change directories to docker.

cd ~ && mkdir docker && cd docker

Create the DMB directories.

mkdir -p DMB/config DMB/log DMB/cache DMB/Riven/mnt DMB/Riven/data DMB/Zurg/mnt DMB/Zurg/AD DMB/Zurg/RD

Download and edit the docker-compose.yml

Download the latest docker-compose.yml from the GitHub repository with the following:

curl -O https://raw.githubusercontent.com/I-am-PUID-0/DMB/master/docker-compose.yml

Important

The docker-compose.yml file will need to be edited to include the necessary environment variable values.

Note

🚧 The docker-compose updater script is currently in development and will be available soon. Download the docker-compose updater from the GitHub repository with the following:

curl -O https://raw.githubusercontent.com/I-am-PUID-0/DMB/master/update_docker_compose.sh && chmod +x update_docker_compose.sh

Execute the update_docker_compose.sh and follow the prompts:

./update_docker_compose.sh

Start up the docker compose

sudo docker compose up -d
ubuntu@DMB:~/docker$ sudo docker compose up -d
[+] Running 1/2
 ⠋ Network docker_default  Created                                                                                                                                                       1.1s 
 ✔ Container DMB       Started  

Addtional useful commands

Attaching to the container

sudo docker attach DMB

Detach from the running container

Press Ctrl + P followed by Ctrl + Q. This sequence sends a signal to Docker to detach from the container while leaving it running in the background. \

Important

Use this sequence rather than simply closing the terminal window or using Ctrl + C, as those actions might stop the container.

Remember, Ctrl + P + Ctrl + Q must be pressed in quick succession.
You press Ctrl + P first, and while holding Ctrl, press Q.
After this, you will be returned to your host terminal, and the container will continue to run in the background.

View docker container logs

To view the container logs, enter the following:

sudo docker container logs DMB

Shutdown docker compose

sudo docker compose down
ubuntu@DMB:~/docker$ sudo docker compose down
[+] Running 2/2
 ✔ Container DMB       Removed                                                                                                                                                      10.4s 
 ✔ Network docker_default  Removed     

More to come!

Windows Setup Guide (Docker/WSL)

Note

Ensure that Docker Desktop is not installed; if so, uninstall and reboot before proceeding.

From the Microsoft store, install Windows Subsystem for Linux (WSL) \

From the Microsoft store, install Ubuntu 22.04 LTS \

Follow the setup to create your Ubuntu username and password.

From a Windows command prompt, paste the following:

cd C:\WINDOWS\system32

Then paste:

wsl --setdefault Ubuntu-22.04

From Windows apps, start Ubuntu 22.04, and paste the following inside the terminal:

sudo apt update
sudo apt upgrade -y 
sudo mount --make-rshared / 

Note

sudo mount --make-rshared does not persist reboots, so it will need to be run each time WSL2 or Windows is restarted. Alternatively, see the Ubuntu systemd service guide for automatically executing the command on startup for Ubuntu.

Follow the Docker install guide.

Follow the standard docker process for creating the container or follow the Define the directory structure and the remainder of the Complete Beginners Guide

To access the mount on Windows: From the Ubuntu terminal, paste the following, including the punctuation:

explorer.exe .

A new file explorer window will appear; you’re now inside the Ubuntu directory structure

Navigate to the mount location and copy the full path from the explore window

From another file explorer window, click "This PC," then right-click in the space below the listed drives and select add a network location

In the pop-up, click next twice and past the mount location.

Follow the remaining prompted steps

Extra credit: install Portainer.

Deployment Options

DMB allows for the simultaneous or individual deployment of Riven and/or Zurg w/ rclone.

The below are provided as examples of the various deployment options.

Note

The below examples are not exhaustive and are intended to provide a starting point for deployment. Additionally, the host directories used in the examples are based on Define the directory structure and provided for illustrative purposes and can be changed to suit your needs.

Zurg w/ rclone standalone deployment

version: "3.8"

services:
  DMB:
    container_name: DMB
    image: iampuid0/dmb:latest
    ## Optionally, specify a specific version of DMB
    # image: iampuid0/dmb:2.0.0
    stdin_open: true # docker run -i
    tty: true        # docker run -t
    volumes:
      - /home/username/docker/DMB/config:/config
      - /home/username/docker/DMB/log:/log
      - /home/username/docker/DMB/cache:/cache
      - /home/username/docker/DMB/Zurg/RD:/zurg/RD
      - /home/username/docker/DMB/Zurg/AD:/zurg/AD    
      - /home/username/docker/DMB/Zurg/mnt:/data:shared       
    environment:
      - TZ=
      - PUID=
      - PGID=
      - ZURG_ENABLED=true      
      - RD_API_KEY=
      - RCLONE_MOUNT_NAME=DMB
    devices:
      - /dev/fuse:/dev/fuse:rwm
    cap_add:
      - SYS_ADMIN     
    security_opt:
      - apparmor:unconfined    
      - no-new-privileges

Riven standalone deployment

version: "3.8"

services:
  DMB:
    container_name: DMB
    image: iampuid0/dmb:latest
    ## Optionally, specify a specific version of DMB
    # image: iampuid0/dmb:2.0.0
    stdin_open: true # docker run -i
    tty: true        # docker run -t
    volumes:
      - /home/username/docker/DMB/config:/config
      - /home/username/docker/DMB/log:/log
      - /home/username/docker/DMB/Riven/data:/riven/backend/data
      - /home/username/docker/DMB/Riven/mnt:/mnt
      - /home/username/docker/DMB/PostgreSQL/data:/postgres_data
      - /Your/Zurg/mnt:/data # location of Zurg toplevel directories for media files to be symlinked
    environment:
      - TZ=
      - PUID=
      - PGID=
      - RIVEN_ENABLED=true
      - ORIGIN=http://0.0.0.0:3000 # See Riven documentation for more details
    ports:
      - "3000:3000"

Riven and Zurg w/ rclone deployment

version: "3.8"

services:
  DMB:
    container_name: DMB
    image: iampuid0/dmb:latest
    ## Optionally, specify a specific version of DMB
    # image: iampuid0/dmb:2.0.0
    stdin_open: true # docker run -i
    tty: true        # docker run -t
    volumes:
      - /home/username/docker/DMB/config:/config
      - /home/username/docker/DMB/log:/log
      - /home/username/docker/DMB/Zurg/RD:/zurg/RD   
      - /home/username/docker/DMB/Zurg/AD:/zurg/AD   
      - /home/username/docker/DMB/Zurg/mnt:/data:shared  
      - /home/username/docker/DMB/Riven/data:/riven/backend/data
      - /home/username/docker/DMB/Riven/mnt:/mnt 
      - /home/username/docker/DMB/PostgreSQL/data:/postgres_data
    environment:
      - TZ=
      - PUID=
      - PGID=
      - ZURG_ENABLED=true      
      - RD_API_KEY=
      - RCLONE_MOUNT_NAME=DMB
      - RIVEN_ENABLED=true
      - ORIGIN=http://0.0.0.0:3000 # See Riven documentation for more details
    ports:
      - "3000:3000"
    devices:
      - /dev/fuse:/dev/fuse:rwm
    cap_add:
      - SYS_ADMIN     
    security_opt:
      - apparmor:unconfined    
      - no-new-privileges

Example to access the debrid service rclone mount from Plex

services:
  DMB:
    container_name: DMB
    image: iampuid0/dmb:latest                                       ## Optionally, specify a specific version of DMB w/ image: iampuid0/dmb:2.0.0 
    stop_grace_period: 30s                                           ## Adjust as need to allow for graceful shutdown of the container
    stdin_open: true                                                 ## docker run -i
    tty: true                                                        ## docker run -t    
    volumes:   
      - /home/username/docker/DMB/config:/config                     ## Location of configuration files. If a Zurg config.yml and/or Zurg app is placed here, it will be used to override the default configuration and/or app used at startup. 
      - /home/username/docker/DMB/log:/log                           ## Location for logs
      - /home/username/docker/DMB/Zurg/RD:/zurg/RD                   ## Location for Zurg RealDebrid active configuration  
      - /home/username/docker/DMB/Zurg/mnt:/data:shared              ## Location for rclone mount to host
      - /home/username/docker/DMB/Riven/data:/riven/backend/data     ## Location for Riven backend data
      - /home/username/docker/DMB/Riven/mnt:/mnt                     ## Location for Riven symlinks
      - /home/username/docker/DMB/PostgreSQL/data:/postgres_data     ## Location for PostgreSQL database
      - /home/username/docker/DMB/pgAdmin4/data:/pgadmin/data        ## Location for pgAdmin 4 data
      - /home/username/docker/DMB/Zilean/data:/zilean/app/data       ## Location for Zilean data
    environment:
      - TZ=
      - PUID=
      - PGID=
      - ZURG_ENABLED=true      
      - RD_API_KEY=
      - RCLONE_MOUNT_NAME=DMB
      - ZILEAN_ENABLED=true
      - RIVEN_ENABLED=true
      - ORIGIN=http://0.0.0.0:3000                                  ## See Riven documentation for more details
      - PGADMIN_SETUP_EMAIL=                                        ## Set if using pgAdmin 4 - Ex. [email protected]
      - PGADMIN_SETUP_PASSWORD=                                     ## Set if using pgAdmin 4
    # network_mode: container:gluetun                               ## Example to attach to gluetun vpn container if realdebrid blocks IP address 
    ports:
      - "3000:3000"                                                 ## Riven frontend
      - "5050:5050"                                                 ## pgAdmin 4
    devices:
      - /dev/fuse:/dev/fuse:rwm
    cap_add:
      - SYS_ADMIN     
    security_opt:
      - apparmor:unconfined    
      - no-new-privileges

  plex:
    image: plexinc/pms-docker:latest
    container_name: plex
    devices:
      - /dev/dri:/dev/dri    
    volumes:
      - /home/username/docker/plex/library:/config
      - /home/username/docker/plex/transcode:/transcode
      - /home/username/docker/DMB/Zurg/mnt:/data            ## rclone mount location from DMB must be shared to Plex container. Don't add to plex library
      - /home/username/docker/DMB/Riven/mnt:/mnt            ## Riven symlink location from DMB must be shared to Plex container. Add to plex library    
    environment:
      - TZ=${TZ}
      - PLEX_UID=                                           ## Same as PUID
      - PLEX_GID=                                           ## Same as PGID
      - PLEX_CLAIM=claimToken                               ## Need for the first run of Plex - get claimToken here https://www.plex.tv/claim/
    ports:
      - "32400:32400"
    healthcheck:
      test: curl --connect-timeout 15 --silent --show-error --fail http://localhost:32400/identity
      interval: 1m00s
      timeout: 15s
      retries: 3
      start_period: 1m00s
    depends_on:                                            ## Used to delay the startup of plex to ensure the rclone mount is available.
      DMB:                                                 ## set to the name of the container running rclone
        condition: service_healthy 
        restart: true                                      ## Will automatically restart the plex container if the DMB container restarts

Riven Configuration

Note

Currently, the Riven user interface is in development and may not have all the features available in the settings.json file.

For additional configuration options and information related to Riven, see the DMB Riven wiki

Below are some of the available settings for the Riven user interface.