Skip to content

Instantly share code, notes, and snippets.

@tobiaswx
Forked from emilyst/99-usb-cdrom.rules
Created September 25, 2022 07:45
Show Gist options
  • Save tobiaswx/32b736c34c0ca86cf2eb0392960ee9a5 to your computer and use it in GitHub Desktop.
Save tobiaswx/32b736c34c0ca86cf2eb0392960ee9a5 to your computer and use it in GitHub Desktop.
Description for getting MakeMKV working on Synology with DSM 7 using jlesage/makemkv via Docker Compose
SUBSYSTEMS=="usb", ATTRS{idVendor}=="", ATTRS{idProduct}=="", GROUP="cdrom", MODE="0666"
version: '3'
services:
makemkv:
image: jlesage/makemkv:latest
container_name: makemkv
restart: unless-stopped
network_mode: bridge
ports:
- "5800:5800"
environment:
MAKEMKV_KEY: <redacted>
USER_ID: 1026
GROUP_ID: 101
AUTO_DISC_RIPPER: 1
APP_NICENESS: 19
volumes:
- "/volume1/Docker/makemkv/config:/config:rw"
- "/volume1/Downloads:/storage:ro"
- "/volume1/Media:/output:rw"
devices:
- "/dev/sg6:/dev/sg6"

These are the steps I used to get MakeMKV working from Docker on my Synology NAS (DS1520+).

In my setup, I have a shared folder for Media, for Downloads, and for Docker-related files. Amend these steps for your own purposes by using directories which exist on your NAS. My USB Blu-ray drive is a Pioneer BDR-XD05B.

  1. Enable SSH if needed.
  2. SSH to the Synology NAS.
  3. Connect USB CD-ROM drive to the physical NAS.
  4. Use dmesg to see which SCSI device was created.
    • In my case, it was sg6, so I knew that the device was created at /dev/sg6. Adjust as needed for your own purposes.
  5. Create the needed directories: mkdir -p /volume1/Docker/makemkv/config
  6. Copy docker-compose.yml from below to /volume1/Docker/makemkv.
    • Adjust any directory names if needed.
    • Adjust the name of the SCSI device if needed.
    • Adjust the MAKEMKV_KEY environment variable value to contain your key.
    • Adjust any other environment variables needed. See documentation.
  7. Copy 99-usb-cdrom.rules from below to /lib/udev/rules.d/. (Requires root permissions with sudo.)
    • At this time, you should also chmod 0666 /dev/sg6 (or whichever device you have) so that you don't have to reboot to apply the necessary permissions. (Requires root permissions with sudo.)
  8. Change directory: cd /volume1/Docker/makemkv.
  9. Create the container: docker-compose up -d.
  10. Access MakeMKV on your Synology unit at http://<synology>:5800/.
    • You can either open up port 5800 in the firewall settings in DSM, or you can set up a reverse proxy configuration to access it securely. Both methods are outside the scope of this procedure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment