How-to use the Rackspace Cloud UK API

Rackspace just released the public beta for the UK version of Rackspace Cloud. The UK Rackspace Cloud doesn’t have the same auth server as the US Cloud so there is a few change you need to do to support the UK Rackspace Cloud. This is the same way Amazon has different zone for EC2 we have now different geographical zone between the US and now the UK.

If you access directly, you just need to adjust the Auth URL in your code to go to :

instead of :

The language binding provided by Rackspace has all been updated and available from github :

For Python CloudFiles :

 cnx = cloudfiles.Connection(api_username, api_key, authurl="

For Python CloudServers :

    cloudservers.CloudServers("USERNAME", "API_KEY", auth_url="")

For Ruby CloudFiles :

require 'cloudfiles'

  # Log into the Cloud Files system
cf =
                                :username => "USERNAME",
                                :api_key => "API_KEY",
                                :authurl => ""

For C# CloudFiles :

UserCredentials userCreds = new UserCredentials(new Uri(""), username, api_key, null, null);
Connection connection = new com.mosso.cloudfiles.Connection(userCreds);

For Java CloudFIles add a file in your classpath with this content :


and you would be able to access it like this without any argument to the constructor :

FilesClient client = new FilesClient();

For non rackspace binding I have sent a patch for Apache libcloud :

which when integrated would allow to do something like this :

for jclouds you can just pass the auth server like this for cloudfiles :

and like this for cloudservers :

for Ruby Fog :

require 'rubygems'
require 'fog'

rackspace =
  :rackspace_api_key => "",
  :rackspace_username => "",
  :rackspace_auth_url => ""

9 thoughts on “How-to use the Rackspace Cloud UK API”

  1. I tried using the latest python-cloudservers from github (or installing via pip), and it still doesn’t seem to support rackspace cloudservers in the UK.

    I’m getting this error:

    __init__() got an unexpected keyword argument ‘auth_url’

    python-novatools however seems to include this support. So I ended up using:

    pip install python-novatools

    Is this the right thing to do??

    1. Hi Yoav,

      Unfortunately the maintainer of python-cloudservers didn’t integrate my patch to get an auth_server argument, the python-novatools should support it properly and that’s indeed the right thing to do. In the future python-novatools will be actively maintained…

      1. Thanks Chmouel,

        python-novatools seems to work great. Not sure I understand why your patch wasn’t added though. It seems like a small but crucial change to many users. At least there is a solution out there. Keep up the good work!


  2. I am doing this in C#. After I added the two dlls into references and run the code, it stopped at the line:

    Connection connection = new com.mosso.cloudfiles.Connection(userCreds);

    and complains security exception.

    [SecurityException: Request for the permission of type ‘System.Security.Permissions.FileIOPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.]
    System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
    System.Security.CodeAccessPermission.Demand() +61
    System.AppDomainSetup.VerifyDir(String dir, Boolean normalize) +93
    com.mosso.cloudfiles.utils.Log.initialize() in c:Usersjmeridthcodecsharp-cloudfilescom.mosso.cloudfilesUtilsLog.cs:280
    com.mosso.cloudfiles.domain.request.GenerateRequestByType..ctor() in c:Usersjmeridthcodecsharp-cloudfilescom.mosso.cloudfilesDomainGenerateRequestByType.cs:15
    com.mosso.cloudfiles.Connection..ctor(UserCredentials userCreds, Boolean useServiceNet) in c:Usersjmeridthcodecsharp-cloudfilescom.mosso.cloudfilesConnection.cs:81
    com.mosso.cloudfiles.Connection..ctor(UserCredentials userCreds) in c:Usersjmeridthcodecsharp-cloudfilescom.mosso.cloudfilesConnection.cs:73
    XploreCore.DefaultMaster.btnUpload_onClick(Object sender, EventArgs e) in D:2010 Projectspek001pek001Default.Master.cs:168

    Do you know why?….

  3. I am far to be an expert in C# but it seems to be a permission error where writing the log file where your use don’t have access.

  4. You forgot one big thing.  The :authurl should :auth_url. It is working for me now. Thanks

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.