Skip to content

Instantly share code, notes, and snippets.

@emilyst
Last active February 9, 2025 20:46
Show Gist options
  • Save emilyst/72f6d8a91bc96aaa576de5bc65a27cce to your computer and use it in GitHub Desktop.
Save emilyst/72f6d8a91bc96aaa576de5bc65a27cce 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.
@emilyst
Copy link
Author

emilyst commented Sep 1, 2024

Based on what I'm seeing, it seems as if there's some kind of hardware error spinning up the drive. If MakeMKV can see the drive and start using it, it has permission to access it.

@m-a-r-m-i-c
Copy link

Ok, it's a thing between my Synology and the drive then...
I'll google how to fix it, thank you!

@GoingOffRoading
Copy link

Emilyst, I'm trying to help a friend get MakeMKV working on his Synology DS224+, and had a couple questions.

Is Docker installed with Synology's Container Manager?

Do I need to define the idVendor or idProduct when setting:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="", ATTRS{idProduct}=="", GROUP="cdrom", MODE="0666"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment