hello, welcome to NETVN channel
In this video I show you how to build a free private cloud server
Here I use a desktop computer and a 240 GB solid state drive
I will install Ubuntu OS for this desktop
To create the Ubuntu installer I used a 64 GB USB drive
You need a USB drive of at least 4 GB to create a bootable installer
You go to the homepage and download the latest Ubuntu server installer
Next I used Rufus software to create a bootable installer
You open Rufus software, select the USB drive and browse to the downloaded iso file
It will take about 5 minutes to create the Ubuntu installer
After getting the desired USB stick you plug it into the target computer and start installing the operating system
I connect the solid state drive to the target computer
At the end of the video I will connect more traditional hard drives to increase the storage capacity of this cloud
Connect the USB drive to the target computer and access the UEFI BIOS
You set up the target computer to boot from the Ubuntu installer
Save your changes and restart your computer
Now you follow these steps to install Ubuntu server
You set the language, keyboard
I recommend you to set up a static ip address for this cloud host
Although with this guide you do not need to forward ports on the router, you should still set up the ip address for the Ubuntu server.
You format the hard drive and partition in default mode
You are required to create a new admin account and name the Ubuntu server
This username and password is used in the next step so don't forget it
To access from another computer to configure and install software so you enable SSH server
The settings are done, now you can start installing Ubuntu server on the target computer
It will take about 10 minutes to complete
You wait until a screen asks to restart the computer
I finished the Ubuntu server installation so I removed the USB stick from the computer and rebooted
You use the admin account created during installation to login Ubuntu server
Next you use the command hostname -I to check the ip address of this server
I switch to another Windows 11 computer and remotely access the Ubuntu server
Windows 11 computer and Ubuntu server in the same local network
On a Windows computer, open a command prompt and access the Ubuntu server using a command called ssh
You use the ip address and admin account to access the target computer
Before installing the software you update and upgrade the Ubuntu server operating system
To access the cloud storage over the internet I use the zerotier service
Zerotier will create a virtual private network on the internet so you can remotely access the cloud storage server
I finished installing zerotier on ubuntu server
Next you create a virtual private network using the zerotier service
You create a new zerotier account
In this case I use a Google account and create a new zerotier account for free
After successfully logging in to zerotier, I create a new virtual private network
You name the newly created virtual private network
Devices will connect to this network using the network identifier
Each zerotier virtual private network has a different network identifier
The Ubuntu server has joined the newly created virtual private network
On the management page of zerotier, you authenticate the ubuntu server
So the Ubuntu server has successfully joined the virtual private network
Each device that joins the zerotier network will be assigned an ip address
You check the ip address of the Ubuntu server and you will see a new ip address appear
That is the ip address provided by zerotier
In this part I will show how to install nextcloud on Ubuntu server
Nextcloud is a free solution that helps you build a personal cloud storage server
You install nextcloud on ubuntu server with a single command
Next, you create a new admin account for nextcloud
You can change the username and password as you like
On a Windows computer, open any browser and access nextcloud using the local ip address
By default you can't access nextcloud so you add trusted domains
You can add individual trust domains or do it my way to allow all
A login screen appears, you use the newly created account to login nextcloud
So you've got a cloud server, but it's only accessible within the local network
For remote access you enable https
https helps you encrypt files when transmitting on the internet
Next you allow port 80 and port 443 to go through the firewall of Ubuntu server
So I have finished setting up https for nextcloud
So how do you access this cloud storage server from outside the internet
You can access it using your computer or smartphone
In this case I use a smartphone
On your smartphone you install an application called Zerotier One
This app is available on Play Store and Apple Store
You open the app called Zerotier One and connect to the virtual private network using the network identifier
Nextcloud server and smartphone join a virtual private network so they share the same network identifier
Just like the ubuntu server, on the zerotier management page you authenticate to allow the smartphone to join this network
So there are two devices that have joined this virtual private network
Each device is assigned a different ip address
Although the two devices are separated by the internet, they join a virtual private network using the zerotier service
So the smartphone can connect to the cloud storage server using the ip address provided by zerotier
On nextcloud you can create more users
In this case on smartphone connect to nextcloud server using admin account
Smartphone successfully connected to nextcloud server from outside internet using zerotier
After successful connection I will upload some files to nextcloud server
Files are being uploaded
From a Windows computer in the local network I check the results
As you can see the files are successfully uploaded over the internet
Thank you for watching
Don't forget to like and help me 600,000 followers
In this section, I will introduce how to optimize the storage capacity of the cloud server
As you can see with a 240 GB solid state drive I only have one cloud server with a capacity of 85 GB
To make the most of your hard drive's capacity, use the following commands:
After using the two commands you refresh the nextcloud management page and you will see the change
Now nextcloud's storage is 199 GB
Significantly more than 85 GB
As mentioned at the beginning of the video I will show you how to connect more media hard drives to increase cloud storage capacity
Here I have a traditional hard drive of size 1 TB
You can use a larger sized hard drive if you want
Have you checked to see if the computer has detected the new hard drive?
Ubuntu server detected the new hard drive, it's named sdb
Before adding it to nextcloud you format and create a partition
You use the fdisk command to delete old partitions and create a single partition
You create a new partition and save the changes
Newly created partition named sdb1
Next you format the partition named sdb1
This partition is formatted as ext4
Next, you get the identifier of the newly created partition
You use the partition's identifier to mount a directory
This is the identifier of the newly created partition
Next you create a new partition to mount with the newly created partition
I create a new folder named disk2
Next you open the file called fstab
This file will help you mount folders and partitions of your hard drive
Here I mount the partition named sdb1 and folder named disk2
Then you use the key combination Crtl O to save the changes and use the key combination Crtl X to close the file named fstab
Next you use the mount command to apply the change
On the nextcloud management page, I will show you how to add a traditional hard drive to the cloud storage system
First of all, you enable nextcloud to connect to external storage
You will be asked to enter the admin password to activate
Next you add storage for nextcloud
You choose the storage type as Local
Next you set the path to the folder named disk2
You name this storage and save the changes
As you can see there is an extra folder named Disk 2
You can upload or download files on this folder
Can you upload or download files on this folder from outside the internet
The answer is yes
On my smartphone I connect to the nextcloud server from the internet
From the nextcloud app on my smartphone I upload some files to a folder called Disk2
As you can see, the files are being uploaded
You can add more hard drives to increase nextcloud's storage in the same way
Thank you for watching the whole video, don't forget to subscribe. Good luck
With this way you can build a cloud storage server without port forwarding on the router