s3fs-fuse
Mount an XNS bucket as a folder on Linux or macOS with s3fs-fuse.
Overview
s3fs-fuse (s3fs) mounts an S3 bucket as a local file system through FUSE. Once mounted, any program can read and write the bucket’s objects as ordinary files, which suits scripts, file-based tools and simple shares. With XNS, you point s3fs at your Relayer’s endpoint and turn on path-style requests.
Tested with s3fs-fuse 1.93 (the Ubuntu 24.04 package) on 2026-10-18 against Relayer build 59a37e64.
Each run, over HTTP on port 9000 and over HTTPS on port 9443, mounted the bucket and copied in 205 files (including a 64 MiB file, an empty file, nested folders, and names with spaces and accented characters). It then remounted, copied the files back out and compared every file by SHA-256, also downloaded the objects with the AWS CLI and compared them, and deleted the files through the mount. A boot-time mount from /etc/fstab was also tested over HTTPS.
Connect to XNS
Every S3 tool connects to your Relayer with the same settings. Enter them exactly as shown; the notes below the table cover the two that most tools get wrong by default.
| Setting | Value |
|---|---|
| Endpoint (HTTP) | http://<relayer-host>:9000, where <relayer-host> is the address of the machine running your Relayer. Always available. |
| Endpoint (HTTPS) | https://<relayer-host>:9443, available only after a certificate is installed on the Relayer. Port 9000 never serves HTTPS. |
| Region | us-east-1 |
| Addressing | Path-style. In tools that ask, turn on force path style or path-style access, and turn off virtual-hosted style. |
| Signature | Signature Version 4 (V4). Version 2 is refused. |
| Access key and secret key | For a tool, create a scoped key: IAM → Create IAM User in the Relayer UI. The secret is shown once, so copy it then. The install’s root pair is on Configure → Credentials; keep it for administration. |
| Bucket | Create it first: Files → Create Bucket in the Relayer UI, or let the tool create it. Names are 3-63 characters of lowercase letters, digits, hyphens and periods. |
HTTPS and certificates. The Relayer UI offers two certificates for port 9443: Let’s Encrypt, which needs a domain managed in Cloudflare and a Cloudflare API token, or self-signed. Most tools refuse a self-signed certificate unless certificate verification is turned off in the tool. On a private network, plain HTTP on port 9000 avoids the question.
Path-style. A tool left on virtual-hosted style (often labeled Amazon S3 or AWS) sends the bucket name in the hostname, and the Relayer cannot find the bucket. Choose the tool’s S3 compatible or generic S3 option and set path-style.
Not supported: server-side encryption with customer-provided keys (SSE-C) or KMS keys (SSE-KMS), bucket website hosting and bucket replication. Server-side encryption with AES256 is accepted. See Encryption at the Gateway, Identity and Access and Configure.
Prerequisites
- s3fs-fuse:
sudo apt install s3fson Debian and Ubuntu,sudo dnf install s3fs-fuseon Fedora, or see the s3fs-fuse project for other systems and macOS. - A bucket and a scoped key on your Relayer (see the table above). A key with the ReadWrite policy is enough.
Step 1: Store the key
s3fs reads the key from a password file in the form access-key:secret-key, and refuses the file unless only its owner can read it.
echo '<access key>:<secret key>' > ~/.passwd-s3fs
chmod 600 ~/.passwd-s3fsStep 2: Mount the bucket
mkdir -p ~/xns
s3fs <bucket> ~/xns \
-o passwd_file=$HOME/.passwd-s3fs \
-o url=http://<relayer-host>:9000 \
-o use_path_request_style \
-o endpoint=us-east-1For HTTPS, use -o url=https://<relayer-host>:9443. use_path_request_style is required; endpoint=us-east-1 sets the signing region.
Step 3: Copy files in and out
cp -r ./data ~/xns/data
ls -la ~/xns/data
cp -r ~/xns/data ./restore
# compare
(cd ./data && find . -type f -exec sha256sum {} + | sort -k2) > /tmp/a
(cd ./restore && find . -type f -exec sha256sum {} + | sort -k2) > /tmp/b
diff /tmp/a /tmp/b && echo identicalUnmount with fusermount -u ~/xns (on macOS, umount ~/xns).
Step 4: Mount at boot (optional)
Put the password file at /etc/passwd-s3fs (mode 600, owned by root) and add a line to /etc/fstab:
<bucket> /mnt/xns fuse.s3fs _netdev,allow_other,passwd_file=/etc/passwd-s3fs,url=https://<relayer-host>:9443,use_path_request_style,endpoint=us-east-1 0 0Then run sudo mkdir -p /mnt/xns && sudo mount /mnt/xns to check it without rebooting.
Known limits
use_path_request_styleis required. Without it, the mount is refused withCheck bucket failed.- Folders become marker objects.
s3fsstores each folder as an empty object whose key ends in/, so the bucket holds more keys than there are files (210 keys for 205 files in the test). Other S3 tools show these as empty folders. - It is not a local disk. Changing part of a file rewrites the whole object, renames copy and delete each object, and there is no file locking between machines. Use it for whole-file reads and writes, not databases or virtual machine images.
- Self-signed certificates on port 9443 were not tested; the test used a trusted certificate.
- Not supported by the Relayer: SSE-C and SSE-KMS server-side encryption (the
use_sse=customanduse_sse=kmsidoptions).
