Pushing Recordings to DigitalOcean Spaces
Spaces is DigitalOcean's object storage solution. It is similar to Amazon S3.
We love Spaces because it is easy to use, cheap and has a built in CDN.
It costs $0.02 per GB of data stored. There are no costs per request and data transfer is priced at a low rate: $0.01 per GB. Uploads are free.
It's built in CDN with 45 edge locations makes it great for delivering large amounts of static data - like video files - too.
It has an S3 compatible API thus Pipe can push recordings to it through it's push to S3 feature.
Here's what you need to do to push new audio and video files recorded through the Pipe platform to your DigitalOcean Space.
I. Create a new Space:
- Sign up for a DO account at https://try.digitalocean.com/performance/. You'll get $100 worth of credits and 60 days to spend them.
- Log in to your DigitalOcean account at https://cloud.digitalocean.com/login
- Click [Create] at the top right and select [Spaces]
- Choose a region between San Francisco, New York, Amsterdam and Singapore
- Click on [Enable CDN] if you want to enable the CDN
- Give the new space a name
- Click [Create a Space] at the bottom
II. Generate a new key to access your new Space from Pipe:
- While signed in DigitalOcean click on the Spaces link in the left menu
- Now click on [Manage Keys] at the top right
- Click [Generate New Key]
- Give it a verbose name to remember it and click the green check mark
- A new Key & Secret pair will be generated:
Do not close the Key/Secret page yet as you'll not be able to recover the Secret so you'll have to generate a new pair.
III. Configure Pipe to push recordings to your new DO Space:
- Sign in to your Pipe account area from https://addpipe.com/signin
- Click on S3 in the top menu
- Copy the DO Key (generated above) and paste it into the Access Key ID field
- Copy the DO Secret (generated above) and paste it into the Secret Access Key field
- Type your Space name into the Bucket name field
- Leave Bucket folder empty
- Select Custom endpoint... for Bucket region or custom endpoint
- In the Custom endpoint field that shows up type the following:
- ams3.digitaloceanspaces.com for a Space in the Amsterdam 3 region
- sfo2.digitaloceanspaces.com for a Space in the San Francisco 2 region
- sgp1.digitaloceanspaces.com for a Space in the Singapore 1 region
- nyc3.digitaloceanspaces.com for a Space in the New York 3 region
9. Select one of the first 2 canned ACLs, DO Spaces supports only the private
and public-read
canned ACLs at this moment. Select public-read
if you want to access the recordings over the Internet through a public URL pointing to the file on your DO Space or on the included CDN.
10. Click [Save S3 Credentials]
Done, your Pipe S3 config page should look like the screenshot below.
New recordings and their snapshots will now be pushed to your DO Space. The origin links to the .mp4 recording and .jpg snapshot (if any) will be be provided through the video_copied_s3
webhook and they'll also be shown in the Pipe S3 logs.
You can browse and view the files in your DO Space from the DigitalOcean Control Panel or from any S3 compatible file explorer like FileZilla PRO, CyberDuck or Transmit. The DO Control Panel shows both the origin links and the edge/CND links (when the CDN is enabled):
For advanced users & uses check out the S3 Compatibility table here and the DigitalOcean Spaces object storage API documentation.
Further reading: