---
title: "Mount a Bucket on Linux with s3fs"
description: "Mount an Exoscale SOS bucket on Linux with s3fs: install s3fs-fuse, configure IAM credentials, mount manually, then persist via `/etc/fstab` with the SOS endpoint."
url: https://community.exoscale.com/product/storage/object-storage/recipes/s3fs/
product: "Object Storage"
section: product
last_updated: 2026-10-26
---
> For AI agents: the documentation index is at https://community.exoscale.com/llms.txt. Every page is available as markdown at `<page URL>index.md` or with `Accept: text/markdown`.

# Mount a Bucket on Linux with s3fs

This guide is provided for informational purposes. Because it involves third party tooling we cannot guarantee things still work exactly as described here.

Linux brings the advantage of having a large number of open source solutions to
access the Simple Object Storage. One of these is S3FS.

> [!WARNING]
> The Object Storage is not a disk drive! Using it as a storage backend with
> a database or similar from multiple machines may have unintended consequences.

## Prerequisites

Before you start this guide, you will need to:

- Create a SOS Bucket, either via the [Portal](https://portal.exoscale.com/) or
the [CLI](https://community.exoscale.com/tools/command-line-interface/index.md).
See the [Simple Object Storage documentation](https://community.exoscale.com/product/storage/object-storage/quick-start/index.md)
for more information.

- Create an IAM key, also via the Portal or the CLI. See the
[IAM documentation](https://community.exoscale.com/product/security/iam/quick-start/index.md)
for more information.

## Installation

S3FS is supplied as a package in most Linux distributions, which makes the installation simple. Execute the following
commands on a root console.

> [!NOTE]
    S3FS could not show the file sizes before version 1.84. If you see only 0-byte files, update your S3FS version.

### Ubuntu Linux 16.04 or Higher, Debian Linux 9 or Higher

```bash
apt install s3fs
```

### RHEL 7 or Newer, Using EPEL:

```bash
yum install epel-release
yum install s3fs-fuse
```

### SUSE 12 and openSUSE 42.1 or Newer:

```bash
zypper install s3fs
```

## Storing Your Access Key

Save your access key as the root user:

```bash
echo API-KEY-HERE:API-SECRET-HERE > /root/.passwd-s3fs
```

Change its permissions:

```bash
chmod 0600 /root/.passwd-s3fs
```

## Create a Folder

To mount the bucket, create an empty folder. This can be located in `/mnt/sos`:

```bash
mkdir /mnt/sos
```

## Mount by Hand

Before we add the mount point permanently, you can try it by hand:

```bash
s3fs BUCKET-NAME-HERE /TARGET/DIRECTORY -o use_path_request_style -o url=https://sos-EXOSCALE-ZONE-ID.exo.io/
```

For example:

```bash
s3fs my-testbucket /mnt/sos -o use_path_request_style -o url=https://sos-at-vie-1.exo.io/
```

## Automated Mount

To mount the object storage automatically at system start, edit the `/etc/fstab` file.

> [!WARNING]
> This file is required for a correct system start. If you make a mistake, your system may not boot. 
> Make sure to read up on the restore procedure and create a backup (such as a snapshot) before you proceed.

Insert the following line followed by a new line character:

```bash
s3fs#BUCKET-NAME /TARGET/DIRECTORY fuse _netdev,allow_other,use_path_request_style,url=https://sos-EXOSCALE-ZONE-ID.exo.io/ 0 0
```

For example:

```bash
s3fs#my-testbucket /mnt/sos fuse _netdev,allow_other,use_path_request_style,url=https://sos-at-vie-1.exo.io/ 0 0
```

Now you can mount the folder.

```bash
mount -a
```

