Skip to content

rapejim/emby-plexdrive-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emby Server and Plexdrive 🐳

Combine the power of Emby Server (hereinafter Emby) with the media files of your Google Drive account (or a Shared Drive) mounted it by Plexdrive.

Based on Linuxserver Emby image for Docker and installed inside Plexdrive v.5.1.0
Inspired on my other repository https://github.com/rapejim/pms-plexdrive-docker.
IMPORTANT: All options are inherited from the Linuxserver Emby container. Refer to Linuxserver documentation for more info.


Prerequisites


You must have your own Client ID & Client Secret to configure plexdrive. If you don't have it, you can follow any internet guide, for example:

Or you can use the configuration files from a previous plexdrive installation (the config.json and token.json files, preferably not reusing the cache.bolt, it is better that this installation generates a new one).


Example run commands


Command line host network
docker run --name emby -d \
    --net=host \
    -e TZ="Europe/Madrid" \
    -e PUID=${UID} \
    -e PGID=$(id -g) \
    -v /docker/emby/config:/config \
    # -v /opt/vc/lib:/opt/vc/lib \ # Optional
    --privileged \
    --cap-add MKNOD \
    --cap-add SYS_ADMIN \
    --device /dev/fuse \
    --restart=unless-stopped \
    rapejim/emby-plexdrive-docker
Command line bridge network
docker run --name emby -h Emby -d \
    -p 8096:8096/tcp \
    # -p 8920:8920/tcp \ # Optional HTTPS
    # -p 1900:1900/udp \ # Optional DLNA
    # -p 7359:7359/udp \ # Optional LAN discovery
    -e TZ="Europe/Madrid" \
    -e PUID=${UID} \
    -e PGID=$(id -g) \
    -v /docker/emby/config:/config \
    # -v /opt/vc/lib:/opt/vc/lib \ # Optional
    --privileged \
    --cap-add MKNOD \
    --cap-add SYS_ADMIN \
    --device /dev/fuse \
    --restart=unless-stopped \
    rapejim/emby-plexdrive-docker
Docker-compose host network
version: '3.5'
services:
  emby:
    container_name: emby
    image: rapejim/emby-plexdrive-docker # https://hub.docker.com/r/rapejim/emby-plexdrive-docker
    restart: unless-stopped
    privileged: true
    network_mode: host
    volumes:
      - /docker/emby/config:/config
      # - /opt/vc/lib:/opt/vc/lib # Optional
    environment:
      TZ: Europe/Madrid
      PUID: '1000'
      PGID: '1000'
    cap_add:
      - MKNOD
      - SYS_ADMIN
    devices:
      - "/dev/fuse"
Docker-compose bridge network
version: '3.5'
services:
  emby:
    container_name: emby
    hostname: Emby
    image: rapejim/emby-plexdrive-docker # https://hub.docker.com/r/rapejim/emby-plexdrive-docker
    restart: unless-stopped
    privileged: true
    network_mode: bridge
    ports:
      - 8096:8096
    #   - 8920:8920 # Optional HTTPS
    #   - 7359:7359/udp # Optional LAN discovery
    #   - 1900:1900/udp # Optional DLNA
    volumes:
      - /docker/emby/config:/config
      # - /opt/vc/lib:/opt/vc/lib # Optional
    environment:
      TZ: Europe/Madrid
      PUID: '1000'
      PGID: '1000'
    cap_add:
      - MKNOD
      - SYS_ADMIN
    devices:
      - "/dev/fuse"

NOTE: You must replace Europe/Madrid for your time zone and /docker/emby-plexdrive/... for your own path (if not use this folder structure). If you have config files (config.json and token.json) from previous installation of plexdrive, place it on /docker/emby-plexdrive/config/.plexdrive folder before.


First usage and initial config


On the first run of container (without config files of previous installation) you must enter inside container console, copy-paste and run this command:

plexdrive mount -c ${HOME}/${PLEXDRIVE_CONFIG_DIR} --cache-file=${HOME}/${PLEXDRIVE_CONFIG_DIR}/cache.bolt -o allow_other ${PLEXDRIVE_MOUNT_POINT} {EXTRA_PARAMS}

This command start a config wizzard:

  • First, it asks you for your Client ID and Client Secret
  • Shows you a link to log in using your Google Drive account (which you used to get that Client ID and Client Secret).
  • The web show you a token that you must copy it and paste on terminal.
  • When you complete it, Plexdrive start caching your Google Drive account files on second plane, no need to wait for Plexdrive to complete its initial cache building process on this console, now you have the config.json and token.json created and can exit from terminal (Cntrl + C and exit).



Parameters


Those are not required unless you want to preserve your current folder structure or maintain special file permissions.

  • PLEXDRIVE_CONFIG_DIR Sets the name of Plexdrive config folder found within PMS config folder. Default is .plexdrive.
  • PLEXDRIVE_MOUNT_POINT Sets the name of internal Plexdrive mount point. Default is /home/Plex.
  • CHANGE_PLEXDRIVE_CONFIG_DIR_OWNERSHIP Defines if the container should attempt to correct permissions of existing Plexdrive config files.
  • PUID and PGID Sets user ID and group ID for Emby user. Useful if you want them to match those of your own user on the host.
  • EXTRA_PARAMS Add more advanced parameters for plexdrive to mount initial command. You can use, for example:
    • --drive-id=ABC123qwerty987 for Team Drive with id ABC123qwerty987
    • --root-node-id=DCBAqwerty987654321_ASDF123456789 for a mount only the sub directory with id DCBAqwerty987654321_ASDF123456789
    • ... plexdrive documentation for more info ...
    • IMPORTANT: Not allowed "-v --verbosity", "-c --config", "--cache-file" or "-o --fuse-options" parameters, because are already used.


REMEMBER: All options from the Linuxserver Emby container are inherited. Refer to Linuxserver documentation for more info.


Tags


Tags correspond to those of the Emby Linuxserver docker image:

  • beta — Beta Emby releases - beta linuxserver baseimage.
  • latest — Stable Emby releases - latest linuxserver baseimage.

About

Combine the power of Emby Server with the media files of your Google Drive account (or a Shared/Team Drive) mounted it by Plexdrive. All in one (container)!!

Topics

Resources

License

Stars

Watchers

Forks