A FUSE filesystem that takes directories containing RAR archives and presents the files within those archives as if there were no RAR files.
- Present RAR archive contents as a transparent virtual filesystem
- Support for split RAR archives:
- New style:
.part1.rar,.part2.rar, etc. - Old style:
.rar,.r00,.r01, etc.
- New style:
- Support for RAR5 format
- Read-only access to archive contents
- Pass-through for non-RAR files (files that aren't RAR archives are accessible in the mounted filesystem)
- Efficient file caching for repeated reads
- Automatic change detection: Uses inotify to watch for changes in the source directory and automatically updates the mounted filesystem when any files or directories are added, removed, renamed, or modified
- Linux with FUSE support
- FUSE libraries installed on your system
Debian/Ubuntu:
sudo apt-get install fuse libfuse2Fedora/RHEL/CentOS:
sudo dnf install fuse fuse-libsArch Linux:
sudo pacman -S fuse2- Go 1.25 or later
- FUSE development headers (for building)
Debian/Ubuntu:
sudo apt-get install libfuse-devFedora/RHEL/CentOS:
sudo dnf install fuse-develArch Linux:
sudo pacman -S fuse2go install github.com/yamatt/roar/cmd/roar@latestgit clone https://github.com/yamatt/roar.git
cd roar
go build -o roar ./cmd/roarPre-built Docker images are available on GitHub Container Registry:
docker pull ghcr.io/yamatt/roar:latestroar [options] <source_directory> <mount_point>-v,--version: Show version and exit--allow-other: Allow other users to access the mounted filesystem (requiresuser_allow_otherin/etc/fuse.conf)
ROAR_LOG_LEVEL: Set the log level (debug, info, warn, error). Default: info
Suppose you have a directory structure like this:
/data/archives/
βββ archive1/
β βββ compressed-1.rar
β βββ compressed-1.r00
β βββ compressed-1.r01
βββ archive2/
β βββ compressed-2.part1.rar
β βββ compressed-2.part2.rar
β βββ compressed-2.part3.rar
βββ archive3/
βββ compressed-3.rar
βββ info.txt
Mount it with roar:
mkdir /mnt/unarchived
roar /data/archives /mnt/unarchivedNow you can access the contents directly:
/mnt/unarchived/
βββ archive1/
β βββ home-movie.mkv
βββ archive2/
β βββ video.mp4
βββ archive3/
βββ my-project.avi
βββ info.txt # Non-RAR files are passed through
To unmount:
fusermount -u /mnt/movies
# or press Ctrl+C if running in foregroundWhen running roar as a system service (e.g., with systemd, Horust, or similar), you'll typically need to use the --allow-other flag to allow users other than the service user to access the mounted filesystem.
First, ensure that /etc/fuse.conf has user_allow_other enabled:
sudo nano /etc/fuse.confUncomment or add this line:
user_allow_other
When starting roar as a service, include the --allow-other flag:
roar --allow-other /data/archives /mnt/moviesWithout this flag, only the user running the service will be able to see the mounted filesystem contents. Other users (including when you SSH in) will see an empty directory.
roar uses the FUSE (Filesystem in Userspace) interface to present a virtual filesystem. When you mount a source directory:
- roar discovers only the immediate children of the source directory (lazy loading)
- Subdirectories are discovered lazily when you navigate into them
- RAR archives are scanned only when their containing directory is accessed
- File reads are serviced by extracting the requested portion from the archive
- Non-RAR files in the source directories are passed through and accessible directly
This lazy loading approach means roar starts quickly even with large directory structures containing many subdirectories.
The filesystem is read-only to protect your archive data.
Run the test suite:
go test ./...Run tests with verbose output:
go test ./internal/rarfs -vThe test suite includes:
- Unit tests for RAR file detection and archive scanning
- Integration tests with real RAR archives (in
tests/data/) - Filesystem watcher tests for inotify functionality
- Lazy loading and concurrent access tests
MIT