Jump to content

How to create your own private cloud storage

wasab

THIS GUIDE IS OUTDATED, CHECK THE NEW GUIDE

 

 

Do you want your own cloud storage similar to Google drive and drop box? Well, you actually can.

 

There are many benefits to have your own private cloud storage services such as:

  • No storage limit. You get as much storage as your disk spaces allow. 
  • No monthly fees asides from electric and internet bills.  
  • Above all, total control over your data and service. You do not need to worry about following the terms of services and have services terminated. You also control who have access to your data and how. 

 

To set it up, just follow the steps below. 

 

PERQUISITES:

You need a computer, an internet connection, and electricity obviously. An old computer which you need to find a use for is perfect. Such machine will act as the cloud server computer. Since cloud storage is going to be the use case, ideally you want lots of storage drives. Feel free to plug as many drives into your server machine as you can, USB drives, hard disks, ssds, whatever that is lying around. 

 

Also, it is recommended you run this on something other than windows like a Linux distribution. You can technically host the server on a consumer edition of windows 10 but it will force updates often, causing the entire cloud storage to be offline until you set it up again, not to mention the occasional BSoD. Also, the performance will be poorer when using docker containers because docker will need to virtualize the entire Linux Kernel. Not ideal.  

 

For this tutorial, I am using openSUSE Linux Tumbleweed(for no other reason than that is the current distro I am using) but you can use any mainstream linux distribution such as Ubuntu as well. You can install just the barebone server variant but not necessary.

 

Here is a guide on how to install Linux from a bootable USB. 

https://www.howtogeek.com/howto/linux/create-a-bootable-ubuntu-usb-flash-drive-the-easy-way/

 

Here is the link to the openSUSE Tumbleweed installation image if you want to follow my guide exactly. 

https://software.opensuse.org/distributions/tumbleweed

 

A note about the installation: if you have multiple drives, in the partition scheme of a Linux installation wizard, tick the VLM option and select all  your drives to combine them into a single logical volume group. This allows you to easily combine disk capacity from multiple drives into a single partition to store all your cloud data. 

 

 

 

STEP 1:  INSTALLING DOCKER, DOCKER COMPOSE

We are going to use docker for sheer convenience. Without Docker, installation involves installing and configuring apache/nginx, mysql, php, and whatever other services which is just a pain. 

 

Consult the relevant documentation for installing docker and docker-compose for your specific Linux distro or OS. As long as you can set up docker and docker compose correctly, the rest of the step will be the same more or less.

 

For openSUSE, open up the terminal and run 

Spoiler
 
 
 
 
 
3
Spoiler

sudo zypper install docker docker-compose;

sudo systemctl enable docker ;

sudo usermod -G docker -a $USER ;

Then either logout and log back in or reboot so your user is added to the docker user group. 

 

 

STEP 2: INSTALLING GIT, CLONE THE YML FILE, AND SET UP THE DOCKER CONTAINER

Consult the relevant documentation of your specific Linux distro/OS for git installation. Chances are if you are using Linux, it should already be installed out of the box. 

 

For openSUSE, install git by opening up the terminal and run 

Spoiler

sudo zypper install git

 

Next clone the yml file from my github repo. It is literally just a copy and paste of the script from the official documentation on next cloud's docker page here with just slight modification. 

Open up your terminal, CMD, Linux command line, MacOS terminal or whatever. command should be the same as long as git is install. Run the following command

 

Don't close the terminal. Set up the docker containers by running the yml file 

Spoiler

cd Next_Cloud ; docker-compose up -d ;

 

Wait for it to finish. Run this command to see if everything is running correctly. 

Spoiler

docker ps

 

You should see two containers that are highlighted like the image below

956811589_Screenshotfrom2020-01-2423-01-58.thumb.png.7a107eb840391788d28e5baf83bb4428.png

 

STEP 3: CONFIGURE THE NEXT CLOUD ACCOUNT

Open your web browser. Type localhost:8080 in your address bar and it should show you a web page like this 

1865493647_Screenshotfrom2020-01-2423-07-04.thumb.png.24750b9ceb055c1166e292aae1beae59.png

 

If you have this page then congrats, your own little private cloud is up and running!

 

Now set up your admin account by choosing a user name and password for your admin user. Choose MySQL/MariaDB as the database storage and enter next cloud both for the username and database name, then password as the password. (database password and username can both be change by editing the yml file)  After that, nextcloud should have you login and you will see a functional cloud storage service similar to dropbox and google cloud

 

In case you are wondering, your actual cloud data are store in the Next_Cloud folder under app and your cloud settings are store under nextcloud. Both of these can be change to any other location by editing the yml file. 

 

STEP 4: ALLOW INCOMING TRAFFIC FROM OUTSIDE IN YOUR FIREWALL

 

To access your cloud service from another computer, you must open port 8080 on your server computer's firewall. Consult/google the relevant documentation on how to do this for your specific operating system. 

 

For openSUSE, just open up its default firewall, YaST firewall, click on port, and then set the rules like the image below

423421716_Screenshotfrom2020-01-2423-17-05.thumb.png.437cee3112db8f3d739e4204f4549c88.png

 

Now click on accept. 

 

For security reason, it is important that you leave all other ports closed and open port 8080 only. This should be the default on most operating system until you manually configure them in the firewall setting. 

 

STEP 5: EXPOSE YOUR SERVER TO THE INTERNET

Right now you can only access your cloud service from machines in your local network by typing in the private ip of your server machine follow by colon and 8080. Now let's expose it to the world wide web. 

 

We will need to port forward in the router setting page. Where the settings are will vary from router to router but all modern routers should have these functionalities. 

 

First login to your router admin page by open up the browser and entering its default private ip. Google the private ip address for your specific router. Login with your admin username and password.

Next go to client list. Google your specific router documentation on where this should be. For mine, it looks something like this. 

imageedit_2_9310755221.thumb.jpg.24abea15b7cd61cfe4e67f469eef3719.jpg

 

Make note of both the private ip address of your server machine and its MAC address. 

Then go to static ip setting. Again, google/consult the specific documentation for your router. Assign your server machine to a static private ip. Mine looks like this. 

imageedit_3_9174548364.thumb.jpg.cce51ca2a97bd56e9db131bf8e1a5ce1.jpgThis 

 

This will reserve that private ip to that machine only.

 

Next enable port forwarding in your router. Consult/google the documentation for where this setting is for your specific router. Enter port 80 as the incoming traffic port for incoming connection and route it to your server machine on port 8080. Select both tcp and udp as the network protocol. Mine looks like this 

imageedit_5_6655262141.thumb.jpg.91f0acabdc5f9ff07c853d345e56d35f.jpg

 

 

Hit apply and then done. 

 

Now if you enter your public ip address in your browser search bar(https://whatismyipaddress.com/), you will land on your cloud drive server page from any devices with an internet connection and browser if you set everything up correctly. Cool eh? 

 

STEP 6: ASSIGN A DOMAIN NAME AND DDNS SERVICE

Chances are your public ip is dynamic which means your public ip will change if your modem reboots or whatever other reason. This is fine for consumer internet but a problem for a server. You will need to relook up your public ip on whatismyipaddress.com if this happens and besides, who wants to enter numbers and decimals for web urls? We are going to user noip, a free ddns service to assign the public ip to a domain name and update it if ip changes. Of course you can do the same by registering a domain name for a fee and then purchase a static ip from your ISP for a fee but noip is free and who doesn't like free things? 

 

Go to this website and register for an account: https://www.noip.com/

In the management page, choose a domain name, you can have 3 for free.

 

Next install no ip client on your computer that detect and update the ip if it changes. You can install it on any device as long as it is in the same network. Read the documentation on noip website on how to do this. 

 

For Linux computers, open terminal and then run 

Spoiler

wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz;

tar xzf noip-duc-linux.tar.gz;

cd noip-2.1.9-1;

make;

sudo make install;

rm ../xzf noip-duc-linux.tar.gz && rm noip-2.1.9-1;

Then enter your no-ip user name and password and you can just keep hitting enter for everything else.

 

Now if you enter your noip domain name on any device, your should see the same web page like so

   

 

Screenshot_20200125-000600.thumb.jpg.969a5efd40f743f9c3d1c7d8ec2d650a.jpg

 

 

 

To shutdown your server, go inside your Next_Cloud folder, open up a terminal there and then run 

Spoiler

docker-compose down

 

To start it again, in the same folder, run 

Spoiler

docker-compose up -d

 

Enjoy!

 

Some warnings: I have not configure ssl so you can't connect via https and encrypt your traffic. You can set this up yourself. You shouldn't worry about this unless you think you will get man in the middle. 

Also, depending on the processing power and speed of your internet connection, your private cloud may only have the infrastructure to support a few users. Don't expect to start a cloud enterprise and charging thousands of clients for your cloud service. 

 

 

 

 

 

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

pretty detailed. i was to lazy to read it all

If my Response helped you, Please click the Check under my reply, to mark it as The Solution!

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, LamoidZombieDog said:

pretty detailed. i was to lazy to read it all

You can find similar guides that are shorter if you google around a bit. The first half of my guide comes from googling around pretty much. 

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

You are a SAINT

 

Thank you so much. Adding this to my sig as well.

Brands I wholeheartedly reccomend (though do have flawed products): Apple, Razer, Corsair, Asus, Gigabyte, bequiet!, Noctua, Fractal, GSkill (RAM only)

Wall Of Fame (Informative people/People I like): @Glenwing @DrMacintosh @Schnoz @TempestCatto @LogicalDrm @Dan Castellaneta

Useful threads: 

How To Make Your Own Cloud Storage

Spoiler

 

Guide to Display Cables/Adapters

Spoiler

 

PSU Tier List (Latest)-

Spoiler

 

 

Main PC: See spoiler tag

Laptop: 2020 iPad Pro 12.9" with Magic Keyboard

Spoiler

PCPartPicker Part List: https://pcpartpicker.com/list/gKh8zN

CPU: AMD Ryzen 9 3900X 3.8 GHz 12-Core OEM/Tray Processor  (Purchased For $419.99) 
Motherboard: Asus ROG Crosshair VIII Formula ATX AM4 Motherboard  (Purchased For $356.99) 
Memory: G.Skill Trident Z RGB 32 GB (2 x 16 GB) DDR4-3000 Memory  (Purchased For $130.00) 
Storage: Kingston Predator 240 GB M.2-2280 NVME Solid State Drive  (Purchased For $40.00) 
Storage: Crucial MX300 1.05 TB 2.5" Solid State Drive  (Purchased For $100.00) 
Storage: Western Digital Red 8 TB 3.5" 5400RPM Internal Hard Drive  (Purchased For $180.00) 
Video Card: Gigabyte GeForce RTX 2070 8 GB WINDFORCE Video Card  (Purchased For $370.00) 
Case: Fractal Design Define R6 USB-C ATX Mid Tower Case  (Purchased For $100.00) 
Power Supply: Corsair RMi 1000 W 80+ Gold Certified Fully Modular ATX Power Supply  (Purchased For $120.00) 
Optical Drive: Asus DRW-24B1ST/BLK/B/AS DVD/CD Writer  (Purchased For $75.00) 
Total: $1891.98
Prices include shipping, taxes, and discounts when available
Generated by PCPartPicker 2020-04-02 19:59 EDT-0400

身のなわたしはる果てぞ  悲しわたしはかりけるわたしは

Link to comment
Share on other sites

Link to post
Share on other sites

Wow nice, I will probably use this guide just so I can have the experience.

 

Thanks!

Workstation Laptop: Dell Precision 7540, Xeon E-2276M, 32gb DDR4, Quadro T2000 GPU, 4k display

Wifes Rig: ASRock B550m Riptide, Ryzen 5 5600X, Sapphire Nitro+ RX 6700 XT, 16gb (2x8) 3600mhz V-Color Skywalker RAM, ARESGAME AGS 850w PSU, 1tb WD Black SN750, 500gb Crucial m.2, DIYPC MA01-G case

My Rig: ASRock B450m Pro4, Ryzen 5 3600, ARESGAME River 5 CPU cooler, EVGA RTX 2060 KO, 16gb (2x8) 3600mhz TeamGroup T-Force RAM, ARESGAME AGV750w PSU, 1tb WD Black SN750 NVMe Win 10 boot drive, 3tb Hitachi 7200 RPM HDD, Fractal Design Focus G Mini custom painted.  

NVIDIA GeForce RTX 2060 video card benchmark result - AMD Ryzen 5 3600,ASRock B450M Pro4 (3dmark.com)

Daughter 1 Rig: ASrock B450 Pro4, Ryzen 7 1700 @ 4.2ghz all core 1.4vCore, AMD R9 Fury X w/ Swiftech KOMODO waterblock, Custom Loop 2x240mm + 1x120mm radiators in push/pull 16gb (2x8) Patriot Viper CL14 2666mhz RAM, Corsair HX850 PSU, 250gb Samsun 960 EVO NVMe Win 10 boot drive, 500gb Samsung 840 EVO SSD, 512GB TeamGroup MP30 M.2 SATA III SSD, SuperTalent 512gb SATA III SSD, CoolerMaster HAF XM Case. 

https://www.3dmark.com/3dm/37004594?

Daughter 2 Rig: ASUS B350-PRIME ATX, Ryzen 7 1700, Sapphire Nitro+ R9 Fury Tri-X, 16gb (2x8) 3200mhz V-Color Skywalker, ANTEC Earthwatts 750w PSU, MasterLiquid Lite 120 AIO cooler in Push/Pull config as rear exhaust, 250gb Samsung 850 Evo SSD, Patriot Burst 240gb SSD, Cougar MX330-X Case

 

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...

Thank you for the tutorial, i've been looking for something like this for a while.

I have a raspberry pi 3 with a 2TB external HD running Xbian, which is based on Raspbian, which is Debian for the raspberrys.

My goal is to be able to access my external drive when I'm not in my house and still have the kodi running in the Pi. I'm going to give it a try!

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 years later...

Hey!

 

Thanks for publishing this guide! The GitHub repo doesn't seem to be functional anymore. Any way to reupload the repo?

 

Thanks

Link to comment
Share on other sites

Link to post
Share on other sites

This guide is now outdated. Feel free to pm me for if you need an updated guide. I will probably remove this thread in the future. 

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

15 hours ago, wasab said:

This guide is now outdated. Feel free to pm me for if you need an updated guide. I will probably remove this thread in the future. 

Why not post an updated one here? 

CPU R7 1700    Motherboard Asus Prime X370 Pro  RAM  24GB Corsair LPX 3000 (at 2933Mhz)    GPU EVGA GTX1070 SC  Case Phanteks Enthoo Pro M    

Storage 1 x 1TB m.2, 1x 500GB SSD, 1x 1TB HDD, 1x 8TB HDD  PSU Corsair RM1000  Cooling Thermalright Macho Rev B (tower)

Synology NAS 1 x 4TB 1 x 8TB

Link to comment
Share on other sites

Link to post
Share on other sites

I'd say this is a nice guide to have... no real reason to take it down. However due to the fact that it is currently outdated and does not seem to work properly. At least edit/add a disclaimer at the very top of the original post stating that it's outdated.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×