Access DigitalOcean Spaces via SFTP

I’m working on an application that has a more complex requirement, to access DigitalOcean Spaces via SFTP. This is due to some strict requirements and overall, one application will use the S3-compatible API to communicate with Spaces while the legacy application has to use SFTP. Does anyone know if this is possible?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
May 9, 2023

Hi there,

The DigitalOcean Spaces does not natively support SFTP connections directly. Spaces are designed to be compatible with the Amazon S3 protocol, and thus it offers access via HTTPS using the S3 API.

However, you can still achieve your goal of using SFTP to access DigitalOcean Spaces by setting up an intermediary server that acts as an SFTP server and communicates with Spaces using the S3 API. Here’s a high-level overview of the process:

  1. Set up a new Droplet on DigitalOcean or any other VPS provider.
  2. Install and configure an SFTP server on the new Droplet, such as OpenSSH or vsftpd.
  3. Create a user for SFTP access and set up appropriate authentication methods (e.g., password or key-based authentication).
  4. Install a tool like s3fs-fuse on the Droplet, which allows you to mount an S3-compatible bucket (e.g., DigitalOcean Space) as a local filesystem.
  5. Mount the Space to a directory accessible by the SFTP user.
  6. Configure the SFTP server to restrict the user to the mounted directory.

Once you’ve set up this intermediary server, your legacy application can use SFTP to access the mounted directory, which will be synchronized with the DigitalOcean Space.

For a step by step guide on how to set that up you can follow the steps here:

Alternatively, you could use an S3 client like Cyberduck to access your Spaces:

Hope that this helps!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel