---
title: "Using s3fs for S3 Storage | Hostman Docs"
description: "Learn how to use s3fs to mount cloud storage buckets via FUSE."
---

> For the complete documentation index for AI agents, see [llms.txt](https://hostman.com/llms.txt).

s3fs is a utility for Linux and macOS that allows you to mount cloud storage buckets via FUSE.

## Installation

To install s3fs on Ubuntu, use the following command:

```shell
sudo apt install s3fs
```

It is recommended to use s3fs version 1.90 or higher. 

To install the latest version of s3fs on Ubuntu, you can build it from source using these commands:

```shell
sudo apt install build-essential automake libcurl4-openssl-dev libxml2-dev pkg-config libssl-dev libfuse-dev git
git clone https://github.com/s3fs-fuse/s3fs-fuse.git
cd s3fs-fuse
./autogen.sh
./configure
make
sudo make install
```

For additional information and installation instructions on other operating systems, refer to the [s3fs documentation](https://github.com/s3fs-fuse/s3fs-fuse#installation).

## Configuration

To configure s3fs for use with the [S3-compatible object storage](https://hostman.com/products/s3-storage/), save the access key and secret key in the `~/.passwd-s3fs` file using the following command:

```shell
echo <Access Key>:<Secret Access Key> > ~/.passwd-s3fs
```

You can find the Access Key and Secret Access Key in your bucket settings under the **S3 parameters** section.

![1cac3c1a 9cb3 4fce B15c Ec12634e9a78](https://content.hostman.com/assets/e2b1589a-f280-43b7-bbc4-cbeb32b8e632.png?width=1540&height=1596)

Restrict access to the `~/.passwd-s3fs` file:

```shell
chmod 600 ~/.passwd-s3fs
```

## Mounting a Bucket

To mount a bucket, choose a mount directory (in this example, `/mnt/s3/`) and execute the following command, specifying the correct bucket name and directory path:

```shell
s3fs <bucket_name> /mnt/s3/ -o use_path_request_style -o url=https://s3.hmstorage.net -o passwd_file=~/.passwd-s3fs
```

## Automatic Mounting at System Startup

To automatically mount the bucket at system startup, add the following line to the /etc/fstab file:

```shell
s3fs#<bucket_name> /mnt/s3 fuse _netdev,allow_other,use_path_request_style,url=https://s3.hmstorage.net,passwd_file=/root/.passwd-s3fs 0 0
```

For additional information on using s3fs, details on all parameters, and troubleshooting tips, consult the project's [documentation](https://github.com/s3fs-fuse/s3fs-fuse/wiki/Fuse-Over-Amazon), including the [FAQ](https://github.com/s3fs-fuse/s3fs-fuse/wiki/FAQ) section.
