Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
wasab

How to create your own private cloud storage

Recommended Posts

Posted · Original PosterOP

 

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 

 

Check out my guide on creating your own private cloud storage

 

Link to post
Share on other sites
Posted · Original PosterOP
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 

 

Check out my guide on creating your own private cloud storage

 

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, CoolerMaster, 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: Thinkpad T430. Specs to come, too lazy atm

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 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

Ryzen Rig 2: ASrock B450 Pro4 ATX, Ryzen 7 1700 @ 4.2ghz all core 1.4vCore, Sapphire R9 Fury Tri-X Nitro 4gb HBM (+100mhz core clock), 16gb (2x8) 3600mhz V-Color Skywalker (or 4x8gb DDR4 2666mhz for large tasks), Corsair HX850 PSU, Custom Loop 2x240mm + 1x120mm radiator, 128gb Patriot Scorch NVMe Win 10 boot drive, 500gb Samsung 840 EVO SSD, CoolerMaster HAF XM Case.  DSI 90-Key Mechanical Keyboard w/ Cherry Red switches, Zalman ZM-GM1 mouse, Hannspree HF207 and Acer AL2016W monitors

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

Ryzen Rig 1: ASUS B350-PRIME ATX, Ryzen 7 1700, Sapphire R9 Fury Tri-X Nitro 4gb HBM, 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.  Zalman K600S keyboard, Zalman ZM-GM1 mouse, Acer XF270HU 2560x1440 144hz IPS monitor

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

Dwight: The Mixed Metals Loop Media Center.  Ask me about it.  Currently decommissioned to move to an mATX setup on a new MOBO once I pick one out

Schrute: ASUS M5A99FX Pro R2.0, FX 8350, 2x Gigabyte HD 7850 2gb GPUs in crossfire, 16gb (4x4) Corsair Vengeance DDR3 1600mhz, Sparkle/FSP 650w PSU, PCCOOLING 160w TDP air cooler, 60gb Patriot SSD Win 10 boot drive, 1tb WDBlack HDD, Rosewill Nautilus 1.0 case.  Logitech Wireless Keyboard and Mouse, Roku 55" 4k TV

Micro Form Factor Dell OptiPlex 3040: Dell 0MGK50 A02, i3-6100T, 2x4gb DDR3 1600, Team Group 120gb SSD, 500gb Seagate 7mm HDD attached storage, Windows 10 Pro, Logitech K400+, USB Wifi adapter all vesa mounted to the back of a 37" 1080p TV for form factor in the kitchen

Linux Box: Toshiba Laptop, i7 620M, NVS graphics, 2gb ram tinker toy at the moment.  Running Manjaro at the moment

APU Laptop: I need to clean this things TIM up so it can boot into Windows 7 for more than 5 minute before overheating at idle, it has things, I just haven't been on it in 2 years or so

Link to post
Share on other sites

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 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


×