How to connect DigitalOcean Droplet using sFTP FileZilla

2020/01/23 06:35:28

DigitalOcean Droplets are Linux-based virtual machines (VMs) that run on top of virtualized hardware. Each Droplet you create is a new server you can use, either standalone or as part of a larger, cloud-based infrastructure.

You can transfer files from a local computer to a Droplet using a variety of different protocols and file transfer clients. DigitalOcean recommends using SFTP (SSH File Transfer Protocol) with FileZilla because it is a free, open-source, cross-platform tool with a user interface that supports newer users.

Who’s this for?

This tutorial is for anyone out there, who is trying or wants to upload files to a VPS. For this tutorial, we are referring VPS to DigitalOcean droplets.

We will use SFTP client - FileZilla to upload files to DigitalOcean droplet.

Step 1: Install FileZilla

On the machine from which you want to transfer files, download and install FileZilla. Choose the version for your operating system.

Upload project to DigitalOcean Droplet using FileZilla SFTP

Step 2: Add Site in FileZilla

Start the FileZilla application. We need to add our domain or connect our web server.

Assuming you are using MAC OS - Click File > Add Site (Windows system will have Add Site option).

The image above highlights the add site dialogue box. Few things to note here, these are

  • Host
  • Protocol
  • Login Type

Follow the image below to connect your DigitalOcean droplet.

Enter your DigitalOcean droplet IP in the host field, leaver the port field as-is.

Change the protocol from FTP to SFTP.

Also, change Login Type to Ask for password - this is recommended for security reasons. Add-in username, if you haven't created a separate user yet, it will be root.

Click connect button.

A password pop-up box will appear. This is where you basically add the root user password. Enter the password and click "ok".

If everything goes correctly so far, you should see the right side that says Remote site with server-side files.

Now the screen is split into two halves, where left side shows local files and the right side shows the files in the server.

Step 3: Upload Project Files to DigitalOcean Droplet

On the right side field area - next to Remote site enter the directory where you want to upload your project files.

In case you don't have any project directory already created, follow the below

  • On the remote section - next to Remote site, type /var/www
  • Create a directory by right-clicking on the blank space right side. You should now see a popup - click create directory. Give it a name.
  • Once the above is done, you should see a directory with the name you gave. Double click the directory to enter inside the project directory.

Now, let's find the actual project files which you want to upload to the directory.

Select the files you want to upload, right-click on the selected area and click Upload.

That should upload the files, you will be able to see them on the remote site section.

With the above, your project files are now uploaded to the server.

If you want to know more about how to configure a domain and setup your project follow our other articles to learn more - How to create subdomains on DigitalOcean, How to add domain and host websites on DigitalOcean droplet