Can I Mount S3 Object Storage Files to My Personal Computer?

Can I mount S3 Object Storage files to my personal computer?

It is possible to mount S3 Object Storage to your VPS/VDS or personal computer. This way you can access the files and folders of your S3 Object Storage like a local drive which makes usage more convenient. The methods to set this up are different for Windows and Linux but there are some things you will need on both Windows and Linux:

  • Contabo's S3 URL.
  • The Object Storage's access key.
  • The Object Storage's secret key.

You can find the S3 URL on the buckets overview page in the "Bucket URL" column.


You can find the access and secret keys on the account security page here.

Things to note before setting up a mount to S3 Object Storage:

Please note that that a mounted Object Storage bucket doesn't always behave like a normal POSIX file system. Depending on how your application is accessing files, you may encounter issues like:

  • no/wrong file system usage statistics
  • sub-par performance
  • unexpected unmounts
  • duplicate writes leading to hidden objects that occupy space but are invisible to S3 API requests

If possible, using other tools like rclone to access Object Storage is recommended.


How do I setup a mount on Linux?

The following parameters are recommend when transferring files via rsync to a mounted Object Storage:


rsync -W --inplace --size-only


This will avoid unnecessary file transfers. If this is your main use case, please also check if rclone is an option for you.


There are two methods we would recommend using to setup a mount on Linux:


goofys:

For Linux, goofys can be used which offers better performance than s3fs-fuse. Please follow the install instructions. In the following example. In the example we have set the mount path to be /mnt/foo and the bucket to be mounted to as foo. Please make sure that you set up your ~/.aws/credentials file with the proper values. 


sudo mkdir /mnt/foo
echo 'goofys#foo /mnt/foo fuse _netdev,allow_other,--file-mode=0666,--dir-mode=0777,--endpoint=eu2.contabostorage.com 0 0' | sudo tee -a /etc/fstab

s3fs-fuse:

For Linux s3fs-fuse can be used. Please follow the install instructions below.

sudo echo 82046e8110804a43bf29c1ae426a724d:82e69bd7a52076c527154297a76c2233 > /etc/passwd-s3fs
sudo chmod 600 /etc/passwd-s3fs
sudo mkdir -p /mnt/foo
sudo echo "foo /mnt/foo fuse.s3fs _netdev,allow_other,use_path_request_style,url=https://eu2.contabostorage.com 0 0" >> /etc/fstab
sudo mount -a


How do I setup a mount on Windows?

For Windows there are a couple of tools we would recommend using:

Air Live Drive:

Please follow installation instructions from Air Live Drive. Once installed and started please perform following steps.

  1. Click on Add Cloud Disk. The following screen should appear AirLiveDrive-Add
  2. Select S3. The following screen should appear AirLiveDrive-Add
  3. Please specify following data
    • For REST endpoint the S3 URL, e.g. https://eu2.contabostorage.com
    • For Access Key ID your access_key, e.g. 82046e8110804a43bf29c1ae426a724d
    • For Secret Access Key your secret_key, e.g. 82e69bd7a52076c527154297a76c2233
    • Please check Use Path style addressing model
    • Click OK
    • Click connect
  4. The drive with the specified letter should show the contents of your S3 Object Storage.

Mountain Duck:

Please follow installation instructions from Mountain Duck. Once installed and started please perform following steps:

  1. You should see a screen like the following. If you don't see it then right click in the toolbar on the duck icon and select Open connection.
    AirLiveDrive-Add 
  2. Please specify the following data
    • For Server use the S3 URL without a protocol, e.g. eu2.contabostorage.com. Please note do NOT enter the URL with https://
    • For Port specify 443
    • For Access Key ID use your access_key, e.g. 82046e8110804a43bf29c1ae426a724d
    • For Secret Access Key use your secret_key, e.g. 82e69bd7a52076c527154297a76c2233
    • Click OK
  3. The drive with the specified letter should show the contents of your S3 Object Storage.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article

Modified on Wed, 18 Sep at 12:24 PM

Can’t find what you’re looking for?

Get in Touch

Do you have a pre-sales question?