Automate DVD, Blu-ray, and CD Ripping to Your NAS with Automatic Ripping Machine
If you have a stack of DVDs and Blu-rays sitting in a closet, ripping them one by one on your desktop gets old fast. You insert a disc, wait for MakeMKV to scan it, pick the tracks, wait for it to finish, and repeat that process until you lose your mind. It feels like filling out TPS reports in Office Space, except nobody is even paying you for it.
Streaming services aren’t helping either. They keep raising prices, splitting libraries across six different apps, and pulling movies whenever licensing deals expire. If you already own the physical discs, putting them on your own Plex server means nobody can take them away from you.
That is where Automatic Ripping Machine (ARM) comes in. I built a dedicated Ubuntu box with four Blu-ray drives that automatically rips whatever I drop into the trays and sends the finished files straight to my TrueNAS server.
Before You Begin
You’ll want these pieces ready before you start:
- A dedicated Linux PC with one or more optical drives (Ubuntu Server works well here)
- A local SSD for staging active rips
- A Network File System (NFS) share on your NAS for completed files
- A free Open Movie Database (OMDb) API key for title lookups
- An optional MakeMKV license key (ARM falls back to the rotating beta key if you don’t have one)
- Optional Radarr, Sonarr, or Lidarr instances for organizing your library, plus a free OpenSubtitles.com account if you want automatic TV episode matching
Why Plain Ubuntu Beats TrueNAS on the Ripping Box
I originally planned to run TrueNAS on the ripping PC too, since my main storage server already runs it. While you can work around TrueNAS overwriting /etc/fstab by using a Post-Init startup script or mounting NFS shares directly into a Docker container, host udev rules for auto-detecting disc insertions still don’t persist cleanly across TrueNAS updates.
Switching the ripping PC to plain Ubuntu Server avoided all of that friction. I put the OS on one SSD and mounted a second SSD at /home/ so all four drives can stage raw rips locally at full speed without bottlenecking the network.
Mounting Your NAS Share for Completed Rips
You shouldn’t point ARM’s config, database, or raw rip folder at an NFS share. ARM uses a SQLite database under the hood, and SQLite over NFS is a quick way to run into file-locking errors. Instead, keep /home/arm/ on your local SSD and mount your NAS share only for the final completed folder.
Before mounting anything on Ubuntu, check your TrueNAS NFS share settings. Restrict Authorized Hosts to the Ubuntu PC’s static IP, and set Mapall User and Mapall Group to the same user your Plex or Tdarr containers use. That way, any file ARM drops onto the NAS already has the right ownership.
Install the NFS client and lsscsi on Ubuntu so you can mount the share and inspect your optical drives later.
sudo apt update && sudo apt install -y nfs-common lsscsi wget
Code language: Bash (bash)
Create a local mount point, test-mount your TrueNAS export, and verify you can write to it.
sudo mkdir -p /mnt/nas/arm-completed
sudo mount -t nfs <NAS_IP>:/mnt/<pool>/<dataset> /mnt/nas/arm-completed
touch /mnt/nas/arm-completed/.test && rm /mnt/nas/arm-completed/.test
Code language: Bash (bash)
If the test file succeeds without a permission error, add the mount to /etc/fstab with _netdev so Ubuntu waits for the network before mounting on boot.
echo "<NAS_IP>:/mnt/<pool>/<dataset> /mnt/nas/arm-completed nfs defaults,_netdev 0 0" | sudo tee -a /etc/fstab
sudo systemctl daemon-reload
Code language: Bash (bash)
Mapping Your Optical Drives
Run lsscsi -g to see how Ubuntu named your optical drives.
lsscsi -g
Code language: Bash (bash)
On my box, /dev/sr0 through /dev/sr3 are the four Blu-ray drives. Because ARM’s container runs with --privileged, passing /dev/sr0 through /dev/sr3 alone was enough for ARM to detect disc insertions and rip without issue. If you decide to drop --privileged for tighter container isolation, you’ll also need to map each drive’s paired generic SCSI device (/dev/sg2 through /dev/sg5 on my box, since the two SSDs took sg0 and sg1) so MakeMKV can run low-level decryption commands.
Installing the ARM Container
ARM’s GitHub repository includes a docker-setup.sh script that installs Docker if needed, creates the arm user, sets up host udev rules for disc detection, and generates a starter script. Do not install Docker from Ubuntu’s Snap menu during OS setup, because Snap confinement can get in the way of hardware passthrough and bind mounts.
Download and run the setup script.
wget https://raw.githubusercontent.com/automatic-ripping-machine/automatic-ripping-machine/main/scripts/installers/docker-setup.sh
chmod +x docker-setup.sh
sudo ./docker-setup.sh
Code language: Bash (bash)
Inspect /home/arm/start_arm_container.sh before you run it. The generated template leaves <placeholder> strings and includes a placeholder --cpuset-cpus flag that will break docker run.
Create the local folders under /home/arm and replace /home/arm/start_arm_container.sh with your actual drive mappings and the NFS bind mount for completed.
sudo -u arm mkdir -p /home/arm/{music,logs,media/raw,media/transcode,media/completed,config}
sudo tee /home/arm/start_arm_container.sh > /dev/null << 'EOF'
#!/bin/bash
docker run -d \
-p "8080:8080" \
-e ARM_UID="$(id -u arm)" \
-e ARM_GID="$(id -g arm)" \
-e TZ="$(timedatectl show -p Timezone --value)" \
-v "/home/arm:/home/arm" \
-v "/home/arm/music:/home/arm/music" \
-v "/home/arm/logs:/home/arm/logs" \
-v "/home/arm/media:/home/arm/media" \
-v "/mnt/nas/arm-completed:/home/arm/media/completed" \
-v "/home/arm/config:/etc/arm/config" \
--device="/dev/sr0:/dev/sr0" \
--device="/dev/sr1:/dev/sr1" \
--device="/dev/sr2:/dev/sr2" \
--device="/dev/sr3:/dev/sr3" \
--privileged \
--restart "always" \
--name "arm-rippers" \
automaticrippingmachine/automatic-ripping-machine:latest
EOF
sudo chmod +x /home/arm/start_arm_container.sh
Code language: Bash (bash)
Before launching the container, make sure the arm user owns /home/arm. On my box, arm was UID 1001, and the container entered a reboot loop on first start because /home/arm/config was owned by root.
sudo chown -R 1001:1001 /home/arm
sudo /home/arm/start_arm_container.sh
Code language: Bash (bash)
Once the container boots, it generates arm.yaml, abcde.conf, and apprise.yaml inside /home/arm/config. If the Web UI tells you arm.yaml is read-only, run chown on the config folder one more time and restart the container.
sudo chown -R 1001:1001 /home/arm/config
docker restart arm-rippers
Code language: Bash (bash)
Configuring ARM for Movies, TV, and CDs
Open http://<ubuntu-ip>:8080 in your browser and log in with admin and password. Change the default password right away, then go to Settings > Drives > Scan for Drives to label each bay so you know which tray to swap when a job finishes.
If you already run Tdarr on your NAS like I do, there is no reason to burn CPU cycles encoding on the ripping box. In arm.yaml, set RIPMETHOD to "mkv" and SKIP_TRANSCODE to true so ARM drops raw MKV files straight onto your NFS share.
RIPMETHOD: "mkv"
SKIP_TRANSCODE: true
RAW_PATH: "/home/arm/media/raw/"
COMPLETED_PATH: "/home/arm/media/completed/"
Code language: YAML (yaml)
ARM won’t name TV tracks with S01E01 format because optical discs don’t store episode metadata. Out of the box, you have to point Sonarr > Manual Import at your completed folder and map each track by hand, unless you pair ARM with the post-rip automation and TV matcher below.
For audio CDs, ARM hands the disc off to abcde. In the abcde Config tab (or /home/arm/config/abcde.conf), OUTPUTDIR already points to /home/arm/media/completed/Music/. Uncomment OUTPUTTYPE=flac so you get lossless files instead of the default Ogg format, add replaygain to the ACTIONS list before clean, and drop playlist so abcde doesn’t leave .m3u files behind.
OUTPUTTYPE=flac
FLACENCODERSYNTAX=flac
FLACOPTS="--silent -8"
ACTIONS=musicbrainz,read,encode,tag,move,replaygain,getalbumart,embedalbumart,clean
Code language: YAML (yaml)
I verified metaflac is included in the container for ReplayGain tagging, though I haven’t run a test audio CD through it yet.
Automatically Adding and Importing Rips
By default, ARM drops your finished files onto the NAS and stops there. Instead of writing a separate folder watcher, you can use ARM’s built-in BASH_SCRIPT hook in arm.yaml to trigger a script right after each rip finishes.
I wrote a zero-dependency Python script (arm_post_rip.py) wrapped by a small launcher (post_rip.sh) that detaches the work in the background so ARM ejects the disc right away. The script reads job details from ARM’s SQLite database in read-only mode, cleans up extra files, adds the title to the matching app, and triggers an import where it makes sense.
| Media Type | Cleanup Action | Library Action |
|---|---|---|
| Movies (Radarr) | Deletes extras and non-video files, keeps largest MKV, adds [Bluray-1080p] or [DVD] tag | Adds movie without searching, then triggers ManualImport or DownloadedMoviesScan |
| TV Shows (Sonarr) | Deletes extras and non-video files, keeps all episode tracks | Adds series without searching, runs hybrid episode matching, imports high-confidence tracks |
| Audio CDs (Lidarr) | Keeps audio tracks only, deletes .m3u, .jpg, .cue, and .log files | Resolves MusicBrainz IDs, adds artist if missing, triggers DownloadedAlbumsScan (untested with a physical CD) |
1. Open /home/arm/config/arm.yaml and enable the notification hook settings so ARM fires your script after moving files to completed and passes the job ID in the title. Set EXTRAS_SUB to "None" too, so ARM doesn’t waste time copying movie extras over NFS when the script is just going to delete them.
BASH_SCRIPT: "/etc/arm/config/scripts/post_rip.sh"
NOTIFY_JOBID: true
NOTIFY_TRANSCODE: true
EXTRAS_SUB: "None"
Code language: YAML (yaml)
2. Create /home/arm/config/scripts/ on the Ubuntu host and copy post_rip.sh, arm_post_rip.py, and post_rip.ini into it. Because /home/arm/config is already mounted at /etc/arm/config inside the container, you don’t need to recreate arm-rippers for ARM to see them.
3. Edit /home/arm/config/scripts/post_rip.ini with your URLs, API keys, root folders, and exact quality profile names. Any service left without a url or api_key is skipped automatically, so you only have to fill in the apps you actually run.
[radarr]
enabled = true
url = http://<NAS_IP>:7878
api_key = <YOUR_RADARR_KEY>
root_folder = /data/Movies
quality_profile = Any
completed_prefix = /import
Code language: TOML, also INI (ini)
4. Mount your ARM completed share read/write into your Radarr, Sonarr, and Lidarr containers (for example at /import), then set completed_prefix to /import in post_rip.ini. Point completed_prefix to the root mount (/import) rather than /import/movies or /import/tv, because ARM already creates movies/, tv/, and Music/ underneath it, and adding a subfolder doubles the path.
5. Lock down permissions on your config file so other local users can’t read your API keys, make the scripts executable, and give ownership back to the arm user.
chmod +x /home/arm/config/scripts/post_rip.sh /home/arm/config/scripts/arm_post_rip.py
chmod 600 /home/arm/config/scripts/post_rip.ini
sudo chown -R 1001:1001 /home/arm/config/scripts
Code language: Bash (bash)
6. Run a dry run against a finished job ID from ARM’s database to verify path mapping and API lookups before letting it move any files.
docker exec arm-rippers python3 /etc/arm/config/scripts/arm_post_rip.py --job-id <id> --dry-run
Code language: Bash (bash)
Automatically Identifying TV Episodes
TV discs are a headache because MakeMKV dumps generic track names like B1_t00.mkv and studios often put episodes out of order. To handle that without guessing, the script uses a two-layer approach for TV rips.
First, it checks TheDiscDB and compares each ripped track’s runtime, file size, and track index against known box-set layouts. If the disc isn’t in TheDiscDB or the track lengths are too close to call, it falls back to a local tv-matcher Docker container that listens to three minutes of dialogue with faster-whisper on CPU (or pulls embedded text subtitles if the disc has them) and matches them against reference .srt files from OpenSubtitles.com.
1. Create /home/arm/tv-matcher/cache on your Ubuntu box, copy Dockerfile, docker-compose.yml, and app.py into /home/arm/tv-matcher, and set ownership to UID 1001 so the non-root container can write cached subtitles and Whisper models.
mkdir -p /home/arm/tv-matcher/cache
sudo chown -R 1001:1001 /home/arm/tv-matcher
Code language: Bash (bash)
2. Create a free account at OpenSubtitles.com (not opensubtitles.org, whose old XML-RPC API was retired) and generate a consumer key under API Consumers. Put your OPENSUBTITLES_API_KEY, OPENSUBTITLES_USERNAME, and OPENSUBTITLES_PASSWORD into /home/arm/tv-matcher/docker-compose.yml, mount /mnt/nas/arm-completed read-only at /arm-completed:ro, and lock down the file with chmod 600.
chmod 600 /home/arm/tv-matcher/docker-compose.yml
Code language: Bash (bash)
Keep OpenSubtitles’ daily download limits in mind when ripping multi-disc box sets: an API key alone gives you five downloads a day, a free account gives you 20 a day, and VIP bumps that to 1,000 a day. Everything downloaded gets saved under ./cache/subtitles/<imdb_id>/S01E01.srt so each episode is only pulled once, and you can also drop .srt files in that folder manually.
3. Build and start the tv-matcher container, then hit the /health endpoint to make sure it came up clean.
cd /home/arm/tv-matcher
docker compose up -d --build
curl http://localhost:8095/health
Code language: Bash (bash)
4. Back in /home/arm/config/scripts/post_rip.ini, set matcher_url under [sonarr] to your Ubuntu box’s LAN IP (never localhost, because arm-rippers runs in its own container network).
matcher_url = http://<ubuntu-ip>:8095
matcher_completed_prefix = /arm-completed
min_confidence = 0.85
Code language: Bash (bash)
Anything that matches at or above min_confidence gets renamed to <Show> - S01E01 [DVD].mkv (or [Bluray-1080p]) and sent straight to Sonarr’s ManualImport API. Any track that scores below 0.85 stays untouched in completed/tv/ so you can double-check just that file in Sonarr > Manual Import.
Let ‘er Rip
Instead of feeding random discs into the drives, rip like media types in batches. Start with your movies, move on to TV shows, and finish with your music CDs.
Grouping by media type lets you dial in the Min Length and Max Length values in ARM’s ripper settings once per batch so only the titles you actually want get ripped.
- Movies: Leave
MAINFEATUREset tofalseand keepRIPMETHODset to"mkv", then raiseMINLENGTH(in seconds) close to a typical movie runtime. This skips trailers and short bonus clips without switching to a full-discbackuprip, which keeps things faster. - TV Shows: Keep
MAINFEATUREset tofalse, setMINLENGTHjust under a single episode’s runtime, and setMAXLENGTHjust above it so ARM skips the combined “Play All” track on the disc. Temporarily setVIDEOTYPEto"series"during TV batches too, because OMDb can sometimes confuse a show with a similarly named movie (like matching Bones to the 2010 film The Lovely Bones). - Music CDs: Once your video discs are done, run your CD stack through
abcdewithout worrying about video length filters.
Wrapping Up
Once everything was configured, dropping DVDs into the trays ripped them automatically, pulled the metadata, added the titles to Radarr and Sonarr, and matched Bones tracks to S01E05, S01E06, S01E19, and S01E20 via tv-matcher. With four drives running in parallel and post-rip scripts handling the handoff, working through a stack of physical media turns into a background chore instead of a weekend project.