How To Manage DigitalOcean Spaces with Transmit 5
Transmit is a macOS-only file transfer utility developed by Panic, Inc.. It handles a wide variety of server types including FTP, SFTP, WebDAV, and most importantly for this article: S3-compatible servers.
DigitalOcean Spaces is an object storage service that is compatible with the S3 API. In this tutorial we will show you how to use Transmit 5 to connect to a Space, navigate, manipulate permissions, retrieve public URLs for your objects, and create new Spaces.
- You must already have Transmit 5.1 or higher installed. You can download Transmit 5 from Panic's website. You can find the version of your Transmit installation by clicking the Transmit menu in the application, and choosing About Transmit. If you are using Transmit version 4, please see our other tutorial How To Manage DigitalOcean Spaces with Transmit 4.
- You must have an access key and secret key for Spaces. These are available in the API section of the DigitalOcean Control Panel. This is covered in more detail in the Creating an Access Key section of How To Create a DigitalOcean Space and API Key
Step 1 — Connect to Spaces
Launch the Transmit application by clicking on its icon in the dock, or double-clicking its icon in your Applications folder. Transmit will open and display a window with your local filesystem on the left, and an SFTP connection pane on the right:
Click the Protocol selection menu, highlighted above, then select Amazon S3. This will bring up the form for connecting to an S3-compatible server. Fill in the following details:
- Address: This is the datacenter you created your Space in, followed by
digitaloceanspaces.com. For nyc3, for example, fill in
nyc3.digitaloceanspaces.comfor this value.
- Access Key ID:
- Remote Path: this determines where Transmit will navigate to upon connecting. You may put a Space name (and subdirectory, if desired) here to connect directly to that location
When all filled out, the connection pane should look similar to this:
Click the green Connect button to connect to Spaces. Transmit will connect, then display a list of your Spaces (if you left the Remote Path option blank):
If you have not yet created a Space, this will be empty. In the above screenshot we have one space called example-name. Let's use Transmit to make a Space next.
Step 2 — Create a New Space
To create a new Space with Transmit 5, first make sure you're in the root directory where all your Spaces are listed. You can do this by clicking the
____.digitaloceanspaces.com item all the way on the left of breadcrumb trail at the top of the right-hand pane:
Once you've done that, click on the File menu, then choose New Bucket…. A bucket is the S3-compatible name for an individual Space.
A dialog will pop up, asking for a bucket name and location.
Choose any name that fits the guidelines mentioned in the dialog. Leave the default Location value as is. Click Create and your new bucket will be created and added to the list.
Note: Space names must be unique across all regions, so if your name is already in use anywhere on
digitaloceanspaces.com, Transmit will give you an error. If this happens, try another name.
Next, we'll navigate into our new Space and add some files.
Step 3 — Create Some Content in Your Space
Double-click on the folder that represents your Space. This will open it and list its contents in the right-hand pane:
To upload a file, first navigate through your local filesystem using the left-hand side of the Transmit window. When you've found a suitable file to upload (pick something like a JPG or HTML file, so we can test in the browser), click and drag it from the left-hand pane to the right. It will copy over to your Space and show up in the directory listing on the right-hand side.
You can also drag and drop files directly from the macOS Finder.
Next, we'll test permissions and learn how to make files publicly accessible.
Step 4 — Adjust Permissions and Test Public Access
By default, the files in your Spaces are not made available to the public. Let's find the public URL for a file and see what happens when we try to load it in a web browser. In the right-hand pane, after navigating to your Space, click once on a file you'd like to view. This will select the file. Then click on the Edit menu and select Copy URL. The URL will be copied to your clipboard. Alternately, you can right-click on the item and select Copy URL from the contextual menu:
Switch over to your browser, paste the URL into the location bar, and hit
ENTER. An AccessDenied error will load:
To remedy this, we need to change the Read permissions on this file. Back in Transmit, with the file still selected, use the File menu to choose Get Info (you could also use a right-click here). Depending on your settings a panel will slide out of the current window, or a new window will open. Either will be labeled Inspector and will have more details about the file, including its size, location, type, and Read and Write permissions:
Use the dropdown menu next to Read: to change the setting from Owner to World, then click the Apply button at the bottom of the Inspector:
Transmit will update the file's permissions. Return to your browser and reload the URL we tried before. Your file should successfully load.
In this tutorial, you used Transmit 5 to connect to DigitalOcean Spaces and navigate, create new Spaces, update permissions, upload files, and retrieve public URLs. To learn more about other Transmit features that could help integrate Spaces into your macOS-based workflow, visit Panic's Transmit Documentation Library.