Slicehost Helpers

Get Version


cap slicehost:zone:add


This library provides a simple set of helper methods and Capistrano tasks to manage slices and DNS zones/records on your Slicehost account (


sudo gem install slicehost

Capistrano tasks

There are two capistrano tasks:

cap slicehost:zone:add       # Create DNS zone
cap slicehost:zone:mx:google # Add Google Apps MX records

To your config/deploy.rb, add the following:

require "slicehost/recipes/capistrano" if Capistrano::Version::MAJOR >= 2

# Used to setup/update DNS registry of url => ip
set :domain_mapping, "" => "123.456.789.012"
set :slicehost_config, File.dirname(__FILE__) + "/slicehost.yml"

Then run cap slicehost:zone:add to create a base DNS zone. This will include the and www entry, PLUS three nameserver entries for Slicehost’s namesevers.

If you are using Google Apps for your Email, then once you have created the Google Apps account, and you are asked to point the MX records to Google, you simply need to run one capistrano task: cap slicehost:zone:mx:google and all 5 MX records are added automatically.

Easy peasy.

Underlying API

The current API is very alpha. It was just the simplest thing that worked. There are unit tests demonstrating it working and everything.

Future releases will have a nicer, class-based API.


To discuss bugs and features, go to the Google Group forum

How to submit patches

Read the 8 steps for fixing other people’s code and for section 8b: Submit patch to Rubyforge Tracker, via Tracker.

The trunk repository is svn:// for anonymous access.


This code is free to use under the terms of the MIT license.


Comments are welcome. Send an email to Dr Nic Williams via the forum

Dr Nic Williams, 20th February 2008
Theme extended from Paul Battley