We hope you find this tutorial helpful. In addition to guides like this one, we provide simple cloud infrastructure for developers. Learn more →

How to Manage DigitalOcean Spaces with Cyberduck

PostedSeptember 20, 2017 5.7k views Object Storage DigitalOcean

Introduction

Cyberduck is an open source tool for Windows and macOS that provides a graphical interface to manage files for a wide variety of protocols and services, including FTP, SFTP, WebDav and S3. In this article, will show you how to connect to DigitalOcean Spaces using Cyberduck.

Prerequisites

To follow along with this tutorial, you will need to:

Once you've completed the prerequisites, you're ready to follow along.

Step 1 — Connecting to DigitalOcean

In this section we'll begin by using Cyberduck's Amazon S3 profile to connect. When we've successfully connected, we'll create a bookmark to make future connections more convenient.

We'll click the Open Connection icon, then select Amazon S3:

Screenshot of the Open Connection menu with Amazon S3 selected.

When we select Amazon S3, a new dialogue opens. In the form, we'll supply:

  • Server Currently, Spaces are only available in nyc3.digitaloceanspaces.com.
  • Access Key ID: your-access-key
  • Password: your-secret-key

Once the values are filled in, we'll select Connect.

Note: We can choose to check the "Save password" box so we won't be prompted for the Secret Key each time we connect. This may be appropriate on a personal computer, but on a shared machine, it would allow anyone to connect with administrative powers.

Screenshot of the Open Connection Amazon S3 Dialogue with the values filled in

If Spaces already exist, they'll appear in the main window. Otherwise, this workspace will be blank.

Step 2 — Creating a New Space

We'll double-click the Action icon and select Create a New Folder.

Screenshot of the Action icon menu with New Folder highlighted Folders created here at the root level are new Spaces. The Space name must be unique across all regions. If the name is already in use anywhere on digitaloceanspaces.com, the dialogue will stay open without providing feedback. If this happens, try another name.

Space names must begin with a letter and contain only lowercase alphanumeric characters and dashes.

In the Create new folder, we'll enter space-name.

Screenshot of Create new folder dialogue

Note: The name of a space will form part of the URL and can be used in one of two styles. In the virtual domain style, the Space's name will appear at the beginning of the URL itself: https://space-name.nyc3.digitaloceanspaces.com In the older path style, it will appear as the first element in the path, https://nyc3.digitaloceanspaces.com/space-name. Both formats can be used to reference assets and are equally performant.

The blue icon next to the Space name serves as a reminder that this is a Space.

Screenshot of the new Space and its icon
Now that we've connected to our account and created a Space, let's add some content.

Step 3 — Adding Content

To create the new folder, we can either highlight the Space name or double-click it, then click the Action icon to create the new folder within.

In the pop-up dialogue, we'll enter the name folder-name.
Screenshot of the Create new folder dialogue with "folder-name" filled in.
We'll click Create to add the folder, then upload an image. To upload, we can drag and drop the image into the folder or use the Action menu to navigate the local file system and select the file. In the screenshot below, we're dragging an image named sammy.png from our desktop and dropping it into the folder-name:

Screenshot of dropping "sammy.png" into the folder when its name is highlighted.

Now that we have content to view, we'll check the permissions and view the content in a web browser.

Step 4 — Setting Permissions

We'll check the file permissions from the Get info menu's Permissions tab:

Screenshot of the default permission on "sammy.png"

Because we've authenticated with access keys, the first line in the permissions have our User ID and has FULL_CONTROL. By default, CyberDuck gives READ permissions to everyone. If we wanted to make this file private, we would highlight the Everyone row and press the Delete key. Since we want to view the file in a web browsers, we're going to leave the file readable for Everyone.

Cyberduck also adds a row of group permissions which aren't relevant to Spaces. We'll remove the irrelevant row by highlighting it and pressing the Delete key on our keyboard.

Finally, we can visit the image in a web browser by switching to the General tab and following the link:

Screenshot of the Info tab's General Pane with the Web URL highlighted

Screenshot of sammy.png loading successfully in a web browser
In order to avoid having the unneeded permissions row on everything we upload, we'll adjust the default permissions.

Step 5 — Changing the Default Permissions

We can change the default permissions by navigating selecting Edit from the top menu, then selecting Preferences. In the pane that opens, we'll select the Transfers icon, then switch to the Permissions tab.

We'll uncheck the all the boxes in the Group permissions row. Note that if we wanted files to be private by default, we could uncheck all the boxes for Others.

Screenshot of new default permissions: FULL_CONTROL for the owner, and READ for Everyone
When we're done, we use the x in the upper-right of the pane to save and exit.

We'll upload another image to verify the new defaults:

Screenshot of Permissions for X-Ray Sammy image

Finally, we'll view the new image in a browser by switching to the General tab and following the link it provides. Since the file is readable by everyone, the image should load.

Screenshot of X-Ray Sammy image loading successfully
Without READ permissions for EVERYONE, we would receive the following error message instead:

Screenshot of the Access Denied error message.
Now that the default permissions are set, you may want to explore the other default settings that can be adjust from the Preferences pane.

Conclusion

In this tutorial, we've configured Cyberduck to connect to DigitalOcean Spaces, created a new Space and uploaded content, checked permissions and set default permissions, and retrieved public URLs. To learn more about using Cyberduck, visit the Cyberduck wiki.

0 Comments

Creative Commons License