Skip to content

Setup Guides

I-am-PUID-0 edited this page Jun 28, 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: 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.

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:
      - /DMB/config:/config
      - /DMB/log:/log
      - /DMB/cache:/cache
      - /DMB/Zurg/RD:/zurg/RD
      - /DMB/Zurg/AD:/zurg/AD    
      - /DMB/Zurg/mnt:/data:shared       
    environment:
      - TZ=
      - 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:
      - /DMB/config:/config
      - /DMB/log:/log
      - /DMB/Riven/data:/riven/data
      - /DMB/Riven/mnt:/mnt
      - /Your/Zurg/mnt:/data # location of Zurg toplevel directories for media files to be symlinked
    environment:
      - TZ=
      - 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:
      - /DMB/config:/config
      - /DMB/log:/log
      - /DMB/Zurg/RD:/zurg/RD   
      - /DMB/Zurg/AD:/zurg/AD   
      - /DMB/Zurg/mnt:/data:shared  
      - /DMB/Riven/data:/riven/data
      - /DMB/Riven/mnt:/mnt 
    environment:
      - TZ=
      - 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

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 #etc...
    stdin_open: true # docker run -i
    tty: true        # docker run -t    
    volumes:
      ## 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. 
      - /DMB/config:/config
      ## Location for logs
      - /DMB/log:/log
      ## Location for Zurg RealDebrid active configuration
      - /DMB/Zurg/RD:/zurg/RD
      ## Location for Zurg AllDebrid active configuration - Riven does not currently support AllDebrid   
      - /DMB/Zurg/AD:/zurg/AD   
      ## Location for rclone mount to host
      - /DMB/Zurg/mnt:/data:shared  
      ## Location for Riven data
      - /DMB/Riven/data:/riven/data
      ## Location for Riven symlinks
      - /DMB/Riven/mnt:/mnt
    environment:
      - TZ=
      ## Zurg Required Settings
      - ZURG_ENABLED=true      
      - RD_API_KEY=
      ## Zurg Optional Settings
     # - ZURG_LOG_LEVEL=DEBUG
     # - GITHUB_TOKEN=       #Use with private Zurg repo
     # - ZURG_VERSION=v0.9.2-hotfix.4
     # - ZURG_UPDATE=true
     # - ZURG_USER=
     # - ZURG_PASS=
     # - ZURG_PORT=8800
      ## Rclone Required Settings
      - RCLONE_MOUNT_NAME=DMB
      ## Rclone Optional Settings - See rclone docs for full list
     # - RCLONE_UID=1000
     # - RCLONE_GID=1000
     # - NFS_ENABLED=true
     # - NFS_PORT=8000
     # - RCLONE_LOG_LEVEL=DEBUG
     # - RCLONE_CACHE_DIR=/cache
     # - RCLONE_DIR_CACHE_TIME=10s
     # - RCLONE_VFS_CACHE_MODE=full
     # - RCLONE_VFS_CACHE_MAX_SIZE=100G
     # - RCLONE_BUFFER_SIZE=32M
     # - RCLONE_VFS_CACHE_MAX_AGE=4h
      ## Riven Required Settings
      - RIVEN_ENABLED=true
      - ORIGIN=http://0.0.0.0:3000 # See Riven documentation for more details
      ## Riven Optional Settings
     # - PLEX_TOKEN=
     # - PLEX_ADDRESS=
     # - RIVEN_UPDATE=true 
     # - RIVEN_BRANCH=main
     # - RIVEN_LOG_LEVEL=DEBUG
     # - SEERR_API_KEY=
     # - SEERR_ADDRESS=
      ## Special Features
     # - AUTO_UPDATE_INTERVAL=12
     # - DUPLICATE_CLEANUP=true
     # - CLEANUP_INTERVAL=1
     # - DMB_LOG_LEVEL=DEBUG  # Master log level for all program logs in DMB
     # - DMB_LOG_COUNT=2
    # Example to attach to gluetun vpn container if realdebrid blocks IP address 
    # network_mode: container:gluetun 
    ports:
      - "3000:3000"    
    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:
      - /plex/library:/config
      - /plex/transcode:/transcode
      - /DMB/zurg:/data # rclone mount location from DMB must be shared to Plex container. Don't add to plex library
      - /DMB/mnt:/mnt  # Riven symlink location from DMB must be shared to Plex container. Add to plex library    
    environment:
      - TZ=${TZ}
    ports:
      - "32400:32400"

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 addtional configuration options and information related to Riven, see the DMB Riven wiki

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

Clone this wiki locally