Migrate your Digital Ocean Droplets to Sustainable Regions Powered By Renewable Energy

As part of my process of improving the sustainability of the digital things I run, including this blog, I'm moving my servers from Digital Ocean's NYC1 datacenter to their Frankfurt datacenter. The Frankfurt datacenter is co-located at Interxion, and is powered by 100% renewable energy.

Below is a quick overview of the steps required to move your existing droplet to Frankfurt (or London, or Amsterdam) so it can be powered by 100% renewable energy. Including the time to take a snapshot, the process took me about 15 minutes.

For other tips related to improving the sustainability of your sites, read designing sustainable digital products.

1. Update your DNS TTL (Time To Live) Settings

Moving your droplet will mean getting a new ip address. Reducing your DNS' TTL settings prior to moving your droplet will help ensure minimal downtime as DNS servers update their record of your new home. I set mine to 2 minutes.

2. Make a Snapshot of your Server

While Digital Ocean allows you to make Live Snapshots, for anything stateful (like a blog, or application), it's best to shutdown your server before making the snapshot to ensure that no data is missed.

  1. Select your droplet in admin console.

  2. Select the power sub-menu and click the Turn off button. This takes a minute or two.

  3. Once shut down, click the snapshots submenu.

  4. Click the take snapshot button. This took about 8 minutes to complete the snapshot.

3. Move Your Snapshot to Frankfurt

By default Snapshots are only available in the region in which they were created. In order to start a new droplet in a different region you'll first need to transfer it.

  1. Select the Images menu in the admin console.

  2. Find your Snapshot in the list and click the More button.

  3. Select Add to region and select "FRA1" for Frankfurt. It should only take a minute or two, depending on the size of your droplet.

4. Create a New Droplet

Create a new Droplet. In first step where you select an image, rather than selecting an operating system, click the snapshots tab and select your new snapshot. Other options should match your existing droplet. Select the region "Frankfurt 1" and finally click Create Droplet.

5. Update DNS

Once your server has been provisioned, you'll see the ip address. Update your DNS records to reflect the new ip. With the lowered TTL settings, it should be near instantaneous. My DNS updated before the server was even finished booting.

6. Confirm it's Working and Delete your Old Droplet

Once the server is online and DNS is updated, you should be able to access it just like nothing has changed. After you've confirmed it's working properly, delete your old droplet so you are no longer charged for it.

I've always enjoyed using Digital Oceanand being able to host with them using 100% renewable energy ensures that I'll be a customer for years to come.