Skip to content

rar2fs: Mount RAR Archives as File Systems

rar2fs is a FUSE based file system that can mount a source RAR archive/volume or a directory containing any number of RAR archives and read the contents as regular files on-the-fly. Non-archived files located in the source directory are handled transparently.


Recommendation use

  • noatime — This is a must for performance. It prevents the system from writing to disk every time a file in the virtual filesystem is read. Since you prioritize performance over power‑saving, this is an obvious choice.
  • warmup — This flag makes rar2fs load the archive structure into memory at startup. For your use case, with thousands of small files or large Blu‑ray remuxes, this makes file listing (ls) in the terminal significantly faster.
  • auto_unmount — Ensures the filesystem is properly cleaned up if the process dies, saving you time when troubleshooting in your OpenRC environment.
  • seek_limit — If you notice that heavy files (like 1080p remuxes) lag during streaming, you can experiment with this to control how much data is cached when seeking within the file.
rar2fs -o allow_other,noatime,auto_unmount,warmup /mnt/usb/glftpd/site /mnt/rar2fs

rar2fs Installation (ubuntu)

apt install libfuse-dev
git clone https://github.com/hasse69/rar2fs.git /tmp/rar2fs
wget -q http://www.rarlab.com/rar/unrarsrc-5.4.5.tar.gz -P /tmp/rar2fs/
tar -zxf /tmp/rar2fs/unrarsrc-5.4.5.tar.gz -C  /tmp/rar2fs
make -j$(($(nproc)+1)) -l$(($(nproc)+2)) -C  /tmp/rar2fs/unrar
make install-lib -C  /tmp/rar2fs/unrar
autoreconf -f -i /tmp/rar2fs/unrar
cd /tmp/rar2fs/; ./configure --with-unrar-lib=/tmp/rar2fs/unrar
make -j$(($(nproc)+1)) -l$(($(nproc)+2)) -C  /tmp/rar2fs
make install -C  /tmp/rar2fs
rm -rf /tmp/rar2fs

Install rar2fs - Recent Version (2025)

#!/bin/bash
# Author: wuseman

# Install necessary dependencies
apt install wget2 libfuse libfuse-dev signify meson python3-looseversion python3-pytest -y

# Download and install rar
wget2 https://www.rarlab.com/rar/rarlinux-x64-701.tar.gz -P /tmp/
tar -xvzf /tmp/rarlinux-x64-701.tar.gz -C /tmp/
cd /tmp/rar
make -j$(($(nproc)+1)) -l$(($(nproc)+2)) -f makefile

# Download and install unrar
wget2 https://www.rarlab.com/rar/unrarsrc-7.0.8.tar.gz -P /tmp/
tar -xvzf /tmp/unrarsrc-7.0.8.tar.gz -C /tmp/
cd /tmp/unrar
make lib -j$(($(nproc) + 1)) -l$(($(nproc) + 2))
make install-lib -f makefile

# Clone, configure, and install rar2fs
git clone https://github.com/hasse69/rar2fs.git /tmp/rar2fs
cd /tmp/rar2fs
autoreconf -f -i
CONFIG_SHELL=/bin/bash ./configure --with-unrar=/tmp/unrar/
make -j$(($(nproc)+1)) -l$(($(nproc)+2))
make install

# Clone, configure, and install libfuse
wget2 https://github.com/libfuse/libfuse/releases/download/fuse-3.16.2/fuse-3.16.2.tar.gz -P /tmp/
tar -xvzf /tmp/fuse-3.16.2.tar.gz -C /tmp/
cd /tmp/fuse-3.16.2
mkdir build
cd $_
meson configure -D disable-mtab=true
meson setup --reconfigure ../
ninja
python3 -m pytest test/
ninja install

Mount rar-archives

mkdir ~/rar2fs
rar2fs -o allow_other ~/downloads ~/rar2fs

Unmount rar2fs

fusermount -u ~/rar2fs

Automount rar folders

printf '\n%s\n'	fuse allow_other,--seek-length=1    0 0"

Enable users to fusermount

sed -i 's/#user_allow_other/user_allow_other/g' /etc/fuse.conf