AutoExtract
Docker app from Energen's Repository
Overview
Readme
View on GitHubAutoExtract
A Docker container for Unraid (or any Docker host) that scans a folder on a schedule and automatically:
- extracts
zip,rar,7zandtararchives (incl..tar.gz/.tgz/.tar.bz2/.tar.xz) into the folder they are in, - extracts archives found inside those archives, as many levels deep as needed,
- moves the processed archives and junk files such as
*.dizto the share's Recycle Bin, deletes them, or moves them to a trash folder, - optionally sets permissions and ownership on everything it processed.
Multi-part sets are handled and cleaned up together: name.part1.rar…, name.rar + .r00…, name.zip + .z01…, name.7z.001…. An archive is only deleted or moved after it extracted successfully; anything that fails is left in place and listed with the reason.
Everything is set up in the web UI, which has a live status page, a settings page, scan history, statistics and themes.
Created entirely by AI (Claude). It has been tested, but not in every situation. Try a Dry run first, keep backups of data you can't replace, and do your own due diligence before exposing the web UI to the internet.
Install (Unraid)
Install AutoExtract from the Apps tab, or download the template by hand:
wget -O /boot/config/plugins/dockerMan/templates-user/my-AutoExtract.xml \
https://raw.githubusercontent.com/rcodehub/Unraid-CA-Apps/main/templates/autoextract.xml
then Docker → Add Container → Template: my-AutoExtract.
Keep only
my-AutoExtract.xmlintemplates-user. If you also have another copy, such asautoextract.xml, Unraid may load it when you edit or update the container, and your paths go back to the defaults.
Template settings
| Setting | Container path / variable | Description |
|---|---|---|
| Web UI port | 8080 (host default 8844) |
Web interface |
| App data | /data |
Settings, history, statistics, logs. e.g. /mnt/user/appdata/autoextract |
| Folder to scan | /downloads |
The share to scan, read/write. e.g. /mnt/user/downloads |
| Trash folder (optional) | /trash |
If set, processed archives and junk are moved here. Must be a separate folder, not inside the scan folder or a parent of it. Use the same kind of path as the scan folder (both /mnt/user/… or both /mnt/diskN/…) |
| All shares (optional, advanced) | /mnt/user |
Lets Extract folder… and the folder pickers reach any share, and finds the Recycle Bin when the scan folder is a folder inside a share. Gives the container access to all shares - leave empty unless needed |
| Timezone | TZ |
For times in the logs |
| UI username | UI_USERNAME |
Login name, default admin |
| UI password | UI_PASSWORD |
Turns on the login page. Leave blank for no login (then anyone who can reach the port can use the UI) |
Only change the Host Path side of the paths. On first start /downloads is set as the folder to scan, and if /trash is mapped, archives and junk are set to be moved there. Everything else is configured in the web UI and saved in /data.
Web UI
- Status – next/last scan, progress, what each thread is extracting (with a Cancel button per archive: stops just that one and leaves it untouched; scheduled scans skip it until it changes, Run now retries it), failed archives, folders waiting because their archives changed too recently (with when they'll be picked up) and a live log. Buttons: Run now, Dry run (shows what would happen without changing anything), Extract folder… (a one-off job on any folder you pick, with or without sub-folders; you choose for that run whether the archives go to the Recycle Bin, are deleted, moved or kept), Stop.
- Settings – all options below, with a folder picker and live checks that show each folder's real location on the server. Folder pickers only show the folders mapped into the container.
- History – every scan with counts, data size and failures.
- Stats – lifetime totals (data and files extracted, space freed, success rate, speed), a 30-day chart, archive types and records.
- Theme – 11 colour themes with light and dark versions, plus corner rounding, spacing, font, shadows and page width. Use ☾/☀ to switch light/dark for your browser.
Settings (web UI)
| Setting | Default | Description |
|---|---|---|
| Source folders | /downloads |
Folders to scan, including sub-folders. Use container paths (/downloads, not /mnt/user/…) |
| Scan automatically / interval | off / 60 min | Interval counts from the end of the previous scan |
| Also scan at container start | off | |
| Threads | 4 | Archives extracted at the same time in one folder. 2–4 suits spinning disks |
| Skip archives newer than | 5 min | Leaves archives that changed recently for a later scan, so downloads still in progress aren't touched. Archives that came out of other archives are never skipped. 0 = off |
| Max nested levels | 25 | Safety limit for archives inside archives |
| Overwrite existing files | on | Off keeps existing files |
| Folder per archive | Smart | Smart: an archive whose contents have no single top folder is extracted into a folder named after the archive (name.part1.rar, name.tar.gz → name/), so archives of loose files in one folder don't get mixed. An archive that holds one folder, or sits alone in a folder named like it, is extracted as is (a scanned source folder itself never counts). Always: every archive gets its own folder (unless it holds one folder with that name). Never: extract next to the archive. In Smart and Always, an archive that only holds archive pieces (.rar, .partN.rar, .rNN, .zip, .7z, .001 ... plus .nfo/.diz/junk files) is extracted in place, so the pieces from many zips end up together and the RAR set extracts as one |
| Archives that extracted fine | Recycle Bin* | Move to the share's Recycle Bin, delete, or move to the move folder |
| Junk files | Recycle Bin* | Same choices |
| Move folder | /trash if mapped |
Keeps the folder layout: <move folder>/<source name>/<path>; name clashes get .1, .2 |
| Junk file patterns | *.diz |
One per line, case-insensitive wildcards (*.nfo, Thumbs.db, *sample*). Applies to every scanned folder, so keep them specific |
| Folders to skip | @eaDir, .Recycle.Bin, #recycle, .Trash* |
Folder names to ignore |
| Set permissions | on, 666 / 777 | File and folder modes for processed files and folders |
| Also set the owner | off, 99:100 | nobody:users on Unraid |
* On a fresh install: move if /trash is mapped, otherwise the Recycle Bin if the share's root can be reached, otherwise delete.
Recycle Bin: files go to <share>/.Recycle.Bin/<same folders>, the folder the Unraid Recycle Bin plugin uses for files deleted over SMB, so you can browse and empty them there. The share's root must be reachable inside the container: map the share itself (/mnt/user/downloads → /downloads), or also map All shares if you map a folder inside a share. Settings shows where each source's Recycle Bin is. .Recycle.Bin folders are never scanned.
How it works
Each source folder is processed one directory at a time. AutoExtract extracts every archive in the directory, cleans junk and rescans the same directory for newly extracted archives. When the directory is clean it moves on to the sub-folders.
Archives in a directory are extracted in parallel. Each one goes into its own hidden work folder (.autoextract-…) and is then moved into place, so parallel extractions never collide. Zip, 7z and tar files go before RAR files, because they often contain the RAR parts.
Extractors are RarLab unrar for RAR, 7-Zip for 7z and split archives, unzip for zip and GNU tar for tarballs. If one fails, 7-Zip tries next. If an archive still fails, it is retried once on its own, then left in place and listed with the reason (damaged, missing part, wrong password, …).
Versions
The build number (top left of the web UI, and in the container log at start) goes up with every published image. Hover it to see the commit and build time. What changed is in CHANGELOG.md, and the newest entries are also shown in Community Applications. Images are tagged latest and build-N, so you can pin a specific build by setting the repository to ghcr.io/rcodehub/autoextract:build-N.
Docker Compose
See docker-compose.yml.
License
MIT – see LICENSE.
Categories
Related apps
Explore more like this
Explore allDetails
ghcr.io/rcodehub/autoextract:latestRuntime arguments
- Web UI
http://[IP]:[PORT:8080]/- Network
bridge- Shell
sh- Privileged
- false
- Extra Params
--security-opt=no-new-privileges:true
Template configuration
Port for the web UI.
- Target
- 8080
- Default
- 8844
- Value
- 8844
Settings, history, statistics and logs. Keep the Container Path /data.
- Target
- /data
- Default
- /mnt/user/appdata/autoextract
- Value
- /mnt/user/appdata/autoextract
The share to scan (read/write), e.g. /mnt/user/downloads. Keep the Container Path /downloads.
- Target
- /downloads
- Default
- /mnt/user/downloads
- Value
- /mnt/user/downloads
Optional, e.g. /mnt/user/trash. If set, processed archives and junk are moved here. Otherwise they go to the share's .Recycle.Bin (Unraid Recycle Bin plugin) or are deleted - see Settings. Must not be inside the folder to scan (or a parent of it). Keep the Container Path /trash.
- Target
- /trash
Optional, e.g. /mnt/user. Lets the web UI browse and extract any share (Extract folder button, folder pickers) and reach each share's .Recycle.Bin. Gives the container read/write access to all your shares, so leave it empty unless you need it. Keep the Container Path /mnt/user.
- Target
- /mnt/user
Timezone for the times shown in logs.
- Target
- TZ
- Default
- America/New_York
- Value
- America/New_York
Login name for the web UI (only used when a password is set). Default admin.
- Target
- UI_USERNAME
- Default
- admin
- Value
- admin
Set a password to require a login for the web UI. Blank = no login.
- Target
- UI_PASSWORD