How to Manage DigitalOcean Spaces with Cyberduck
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.
To follow along with this tutorial, you will need to:
- A working installation of Cyberduck version 6.2.x. Visit the Cyberduck website to download.
- An access key pair for your Spaces. To generate these, visit the API page in the DigitalOcean Control Panel. To learn more about access keys, see the Managing Access to DigitalOcean Spaces access key section.
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:
When we select Amazon S3, a new dialogue opens. In the form, we'll supply:
- Server This is a combination of the region, e.g.
digitaloceanspaces.com, so that the complete address looks like:
- Access Key ID:
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.
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.
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
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.
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
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
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:
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
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:
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.
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:
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.
READ permissions for
EVERYONE, we would receive the following error message instead:
Now that the default permissions are set, you may want to explore the other default settings that can be adjust from the Preferences pane.
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.