Skip to main content

How to serve files using the CDN service

This is a quick "how to" for Memstore™ Cloud Storage.


Memstore™ is an object storage solution that be accessed through a HTTP API ( OpenStack Object Storage API (compatible with Rackspace Cloud Files), FTP or SFTP.

As well as the above Memstore includes a public CDN service that can be used to serve files over HTTP directly from a container.

Our plan in this "how to" is:

  • Create a container.
  • Enable the CDN service for the created container.
  • Setup a DNS record for the public URL.
  • Upload files to the container.
  • Download files over HTTP using the CDN and the customised host name.

Please remember that there is exhaustive information about Memstore in our online documentation system.

Creating a CDN Enabled Container

  1. Login into your account, click in your Memstore instance(s) in "Your Services" section. Select the Memstore instance you want to use clicking on "Manage".
  1. Click on "Storage browser" in "Storage Tools".
  1. In the file browser you can see any existing containers in Memstore. On the right, there's a text input box where you can type the name of the container to create. Enter myfiles and click "Create". The container will appear immediately in the browser.
  1. Go back to the "Manage" view for your Memstore instance (for example clicking on "Memstore <product_name>" in the blue bar over the storage browser).
  1. Click on "CDN Control" in "Storage Tools".
  1. In the CDN Control you can see all the containers and their CDN properties. Click on "Manage" in myfiles container.
  1. In the "Manage Container" screen you can tick "Enable CDN" and then click on "Update".

At this point your container is CDN enabled which means that all the contents is now public. You can access it using the displayed CDN URL or add a CNAME entry in your DNS server to point to that host name (as indicated in "Using your own domain" in that page).

Let's say the CDN URL is:

Your CNAME entry would be something like the following:   CNAME

Uploading files

The web based browser interface it's OK for small files, but it's not efficient for uploading big amounts of data. We can use the FTP interface instead.

Let's say our administrator is EXAMPLE.admin with password PASSW.

We can use our FTP client to connect:

You will be asked for your password (PASSW in the example).

You can also use an SFTP with; and we recommend using it when possible because the SFTP protocol encrypts all the traffic and hence is more secure than plain FTP.

Then you can browse the storage, bearing in mind that:

  • Any directory created in the root will be a container.
  • Any directory or file uploaded in /myfiles will be available using the public CDN service.

Let's say you want to make a PDF available, so you can go into the myfiles container (shown as a regular directory over the FTP interface) and upload a file, for example: report.pdf.

Then you can access the file using the CDN:

Although it's not a real security feature, please note that if directory listing is not enabled in the container (point 5: CDN Control), the client needs to know the exact URL to download the file. We could create a directory a0b34567ff3a and store the document there, making it very difficult to guess the name for any third party.

Last updated 11 June 2015, 11:50 GMT