Would you like to have an unlimited cloud FTP storage at a fraction of the cost?  This guide shows how to build your own cloud storage in 5 minutes and map it as a drive using FTP protocol. In this cloud FTP storage, you will be able to save all your valuable data, photos, and videos. Moreover, you can set up all of your cameras to record the videos to your cloud FTP storage and get access to them from anywhere in the world. And most importantly, all of this at a significantly lower price than any cloud storage service provider can offer.

Cloud FTP Storage DIY: How to setup an inexpensive FTP server in the cloud

by Cloud Hosting Today
March 12, 2018
Perhaps, those who’ve read our article Amazon Drive VS Google Drive VS Dropbox wondered how to map a cloud drive to PC or Mac without using any third-party paid service. Probably, some of you wondered, how to connect to cloud drive via FTP or SFTP connection. And, of course, anyone interested if there any possibility to get the cloud storage even cheaper.

Here we learn how to create your own cloud storage in 5 minutes at a fraction of the cost and get it connected via FTP. So you can easily map it as a drive, set it as a target for your cameras recording, etc.

What are the advantages of your own FTP Cloud Storage:
  • Pay-as-you-go at the lowest price on the market.
  • Manage your cloud storange in the way you want it.
  • Connect it to as many devices as you wish.
  • Newer pay for any third party solution.
  • Map it as drive, connect via FTP.
  • Store your cameras recordings as long as you wish.
  • Play videos directly from the cloud.
Step 1. Create an Amazon S3 Storage.
  1. Create a free Amazon AWS account (if you don’t have one) here https://aws.amazon.com/
  2. Now, log into your console https://console.aws.amazon.com/console/ and select the S3 service.
Manage the keys for your Cloud Instance.
3. Click Create bucket.

4. Choose any bucket name (cloudtest8 e.g.).

5. Select the desired region where to allocate your cloud storage (Ohio e.g.)

6. Click Create button.

Once the S3 bucket is created, it’s time to launch the EC2 instance, which allows you to control your cloud FTP storage with ease.
See Step 2 below.

Step 2. Create an Amazon EC2 Instance.
  1. Log into your console https://console.aws.amazon.com/console/
  2. Select the EC2 service.
Manage the keys for your Cloud Instance.
3. Select Instances.

4. Click Launch Instance.

5. Select Ubuntu 16.04 image to create your cloud server.
Import a key pair to access your Amazon EC2 Instance.
6. Select t2.nano type of instance.

7. Click your Review and Launch.

VPC Dashboard
8. Review your Instance settings if you wish and click Launch.
Importing key pair for your cloud EC2 Instance.
9. Select Create a new key pair.

10. Choose a name for your key pair (storage, e.g.)

11. Click on Download Key Pair button.

12. Click on Launch Instances button.

13. Find the downloaded storage.pem file and move it to the location where you can easily find it later.

Closing key import tool.
Your EC2 Instance is launching now. Usually, it takes up to 30 seconds to get it ready. Once done, it’s time to connect to your EC2 instance.
See Step 3 below.

Step 3. Connect to your EC2 Instance.
  1. Download Bitvise SSH Tunellier Client and install it.
  2. Launch Bitvise.
Manage the keys for your Cloud Instance.
3. Click on Client key manager button.
Remember that key pair you’ve downloaded in Step 2 of this tutorial? It’s time to use it in order to get SSH access to your EC2 instance.
4. Click Import button to get your key pair imported in Bitvise.
Import a key pair to access your Amazon EC2 Instance.
5. As you remember you’ve named your key pair as storage. Now select All files, then find your storage.pem file and click it.
VPC Dashboard
6. Click Import again to get your key pair imported.
Importing key pair for your cloud EC2 Instance.
7. Once done, please close Bitvise key import tool.
Closing key import tool.
8. Now, go back to Amazon EC2 Dashboard and copy to clipboard (or just take a note of) the IPv4 Public IP address of your EC2.
Copy Elastic IP address of your Amazon EC2 instance.
9. Paste (or just type in) your Public IPv4 IP address in Host field of Bitvise Client.

10. Enter ubuntu as Username.

11. Select publickey as Initial method.

12. Choose previously imported Client key.

13. And click Login button.

Log into your cloud Amazon EC2 instance.
14. Now wait for connection to establish and click Accept and Save button.  Once done, you will see a Terminal window.

Accept and Save host key for your Cloud Instance
Terminal window
It’s a Terminal window. Now you are connected to your Amazon EC2 cloud instance via SSH. It’s time to connect it to your S3 buclet and install FTP!
Don’t be frightened by that black screen of the terminal mode. We need to run several commands and then you won’t need it again. All you need is just copy-paste those commands inside and hit Enter button on your keyboard.
See step 4 below.

Step 4. Install S3

Enter this commands in exact order as shown below. 

TIP: You can copy (Ctrl-C) and paste them into the terminal windows with right-mouse button.
1. Type sudo apt-get install vsftpd and press Enter. When prompted type Y and press Enter.

2. Type sudo adduser s3 and press Enter. Then, type any password and press Enter. Retype the password and press Enter again. Write down the password, you will need it later. Press Enter several times when prompted for the user details. Confirm that the information is correct by typing Y and then press Enter.

3. Type sudo nano /etc/vsftpd.conf and press enter. Scroll down to the end if the file and copy-paste the following lines into it.

Once done, press Ctrl-O to write out the changes, hit Enter and Ctrl-X to exit editing vsftpd.conf

4. Type echo “s3” | sudo tee -a /etc/vsftpd.userlist and press enter.
5. Next, type sudo nano /etc/ssh/sshd_config and press enter.

6. Scroll down to find PasswordAuthentication no and replace it with PasswordAuthentication yes. Press Ctrl-O to write out the changes, press Enter and Ctrl-X to exit editing sshd_config.

7. Then type  sudo service sshd restart and press enter.

8. Then type  sudo apt-get update and press enter. Type Y and hit Enter once prompted. Wait a minute for  installation process to complete.

9. Now, type sudo apt-get install automake autotools-dev fuse g++ git libcurl4-gnutls-dev libfuse-dev libssl-dev libxml2-dev make pkg-config type Y and hit Enter once prompted. Wait a minute for the installation process to complete.

10. Next, type sudo git clone https://github.com/s3fs-fuse/s3fs-fuse.git and press Enter. You will get message “Checking connectivity… done.”

11. Next, type the following commands pressing Enter after each one.

cd s3fs-fuse
sudo ./autogen.sh
sudo ./configure
sudo make
sudo make install
sudo su
cd /

Installing cPanel / WHM on Amazon EC2 cloud server.
Installing cPanel / WHM on Amazon EC2 cloud server.
Installing cPanel / WHM on Amazon EC2 cloud server.
Installing cPanel / WHM on Amazon EC2 cloud server.

Don’t close the terminal window, you will need it later.

Now you’ll need your Amazon ID and Key in order to attach your S3 cloud storage to the server.

Step 5. Attach your S3 cloud storage to the server.
Cloud WHM login window

Log into your Amazon IAM Management Console https://console.aws.amazon.com/iam/home?#/security_credential and click on Continue to Security Credentials button.

Once logged in, please follow the arrow tags in exact order as shown in the illustrations to the right.
1. Here click Access Keys.
2. Then click on Create New Access Key button.

Agree with cPanel / WHM terms and conditions.
Enter your Server Contact email

3. Press the Download Key File button.
4. Open the downloaded rootkey file. You will find your AWSAccessKeyId and AWSSecretKey inside. Use them to replace AWSAccessKeyId and AWSSecretKey in the following command
echo AWSAccessKeyId:AWSSecretKey > /etc/passwd-s3fs
you will get something like this:
echo AKIAJ2BIRJZ3E5JGXWSQ:SiOLlG9lKRPu0GoIQJHjHDgcH38BMo9p3386LRoG > /etc/passwd-s3fs

Enter your Server Contact email

5. Copy-paste it into the terminal window and hit Enter button.
6. Now type chmod 600 /etc/passwd-s3fs in terminal window and press Enter.
7. Then type s3fs cloudtest8 home/s3 -o passwd_file=/etc/passwd-s3fs,nonempty and press Enter. Don’t forget to replace cloudtest8 with your S3 bucket name.
8. And type echo s3fs#cloudtest8 /home/s3 fuse _netdev,rw,nosuid,nodev,allow_other,nonempty 0 0 >> /etc/fstab and press Enter. Don’t forget to replace cloudtest8 with your S3 bucket name.
9. Once done, type mount -a and press Enter.

Enter your Server Contact email

Congratulations! You are all set now. It’s time to test your connection.

10. Download WinSCP (or any other FTP client) and launch it.
11. Type in your Instance’s IPv4 Public IP address as Host Name. See Step.3.8.
12. Enter your Username, which is s3 in our case.
13. Input the password you ‘ve set in Step 4.2. and click Login.
13. Answer Yes when prompted.

Set the Hostname of your cloud server

14. Once you get connected, you’ll see that your s3 folder is empty. It’s time to put something in it.

Set the Resolvers of your cloud server

15. Drag&drop any file in your s3 folder.

Proceed to next step of WHM installation

16. Check your Amazon S3 bucket here: https://s3.console.aws.amazon.com/s3/buckets/ – the file is there! You can even try it vice-versa: upload a file in Amazon S3 bucket and get it from WinSCP.

You can also install Amazon S3 Browser https://s3browser.com/share-s3-bucket-edit-acls.aspx as an additional option to the get access to your cloud drive.

Confirm your cloud server IP address

Now you can access your cloud drive from anywhere in the world. Moreover, you can set up your cameras and/or DVRs to record the videos to your cloud drive via FTP. And we’ll tell you how in the next article.