s3fs-fuse
s3fs-fuse is a FUSE-based filesystem that mounts an S3 bucket as a local directory. Once mounted, ordinary tools (cp, rsync, your IDE) read and write through to the bucket.
Install
| Platform | Command |
|---|---|
| macOS | brew install macfuse s3fs |
| Debian/Ubuntu | sudo apt install s3fs |
| Fedora/RHEL | sudo dnf install s3fs-fuse |
Configure credentials
Create a credentials file with your access key:
echo "YOUR_FILEBASE_KEY:YOUR_FILEBASE_SECRET" > ~/.passwd-s3fs
chmod 600 ~/.passwd-s3fs
Mount a bucket
mkdir -p ~/mount/my-bucket
s3fs my-bucket ~/mount/my-bucket \
-o passwd_file=~/.passwd-s3fs \
-o url=https://s3.filebase.io \
-o use_path_request_style \
-o sigv4 \
-o endpoint=auto
The bucket is now reachable at ~/mount/my-bucket as a regular directory:
cp ./photo.jpg ~/mount/my-bucket/
ls ~/mount/my-bucket/
Auto-mount on boot
Add to /etc/fstab:
my-bucket /mnt/my-bucket fuse.s3fs _netdev,allow_other,passwd_file=/etc/passwd-s3fs,url=https://s3.filebase.io,use_path_request_style,sigv4,endpoint=auto 0 0
The credentials file at /etc/passwd-s3fs must be chmod 600 and owned by root.
Performance notes
s3fs is convenient but not fast. Each filesystem operation translates to one or more S3 API calls. For workloads that:
- Read many small files repeatedly → use a real filesystem and sync to/from Filebase.
- Need high throughput → use the AWS CLI or rclone directly.
- Need POSIX semantics (locking, atomic rename) → s3fs is a poor fit.
Use s3fs for legacy applications that expect a filesystem and you can't change.
Caching
To improve repeat-read performance:
s3fs my-bucket ~/mount/my-bucket \
-o passwd_file=~/.passwd-s3fs \
-o url=https://s3.filebase.io \
-o use_path_request_style \
-o sigv4 \
-o use_cache=/var/cache/s3fs \
-o ensure_diskfree=1024
use_cache keeps a local copy of read files; ensure_diskfree ensures at least 1 GB of free disk before extending the cache.