Use Cloudfuse with CloudVPS internal objectstore url

By | February 3, 2016

We use the CloudVPS objectstore to store data in a redundant and cheap way. Cloudfuse enables us to mount an objectstore container as a disk in Linux, this way we can store, for example, images from a large image site on the objectstore and mount the objectstore container as the images folder in the public_html folder.

CloudVPS has a nice tutorial on how to do this:

However, for customers that mount the objectstore on a CloudVPS virtual server, following this tutorial will result in Cloudfuse exchanging files with the objectstore through the external URL (https://<projectid>, which means you will have to pay for all the traffic of which you thought to stay on the internal CloudVPS network, but is actually externally routed. This is caused by the objectstore authentication mechanism that tells Cloudfuse to use https://<projectid> as the URL to connect to, and this authentication mechanism is controlled by CloudVPS and cannot be changed by you.

Therefore we created a patch for Cloudfuse which enabled you to override this URL with the internal URL, so traffic from your CloudVPS will flow via the internal URL, which is free traffic. To apply this patch use the following installation method for Cloudfuse:

Download the cloudfuse files:
cd /tmp/
git clone

Go in to the cloudfuse directory, patch Cloudfuse and build the Cloudfuse binary:

yum install gcc make fuse-devel curl-devel libxml2-devel openssl-devel git
cd cloudfuse/
patch < cloudfuse_patchv2.txt
make install

Add the following 2 extra lines to your authentication file (/root/.cloudfuse), below the previous added lines, see CloudVPS tutorial.


cloudvps_internal can be set to True or False.

True means the value of “cloudvps_os_url” will be used to connect to the objectstore.
False means the value of the authentication mechanism will be used (= external URL).

cloudvps_os_url is the internal URL to connect to the objectstore.

Now run the following command and see the output:

cloudfuse -d

The bottom of the output will show something like:

!!! storage_url: https://<projectid>
!!! url config: https://<projectid>
!!! storage_token: <token>
fuse: missing mountpoint parameter

The storage_url is the url used to connect to the objectstore. If this contains the bold part then your setup should work with the internal URL. Test it out on a test server!

Update 25-05-2017: a new patch is added to this post compatible with the new version of Cloudfuse.

The old patch can be found here (but does not work with the current version of Cloudfuse):

*warning* We are not responsible for any kind of damage or incompatibilities you experience when using this article, test this on a test server first before using it in production. Always check the code of the patch file yourselves before implementing it. */warning*.

Leave a Reply

Your email address will not be published. Required fields are marked *