How to build your own cloud on network storage server and access remotely
Hello welcome to how to build your own cloud storage server from scratch Also I introduce ways to access it remotely Let's get started First you choose an open source operating system I use TrueNAS Scale This is an operating system for building a network storage server It not only helps you build a network storage server but you can also install applications on it In this case I will use the network storage server as a remote accessible cloud storage server You download the image file to create a bootable installer You need a USB drive to create a bootable installer Next you use a software called Rufus to create a bootable installer This is a software that does not require installation You just run the executable file, select the external drive, browse to the image file that has just been downloaded You just run the executable file, select the external drive, browse to the image file that has just been downloaded The software automatically sets up the most suitable customizations for you After a few minutes you there will be a bootable network storage operating system installer I plug the external drive into the target computer and start the installation step by step On the target computer I access the motherboard management page On the management page you change the boot order I set the computer to boot from the external drive After completing the boot order setting I save the changes A TrueNAS Scale setup screen appears You are asked to select the hard drive to install the operating system On my server there are 3 hard drives, one solid state drive and two traditional hard drives To optimize performance I install the operating system on the solid state drive Next you are asked to create a new administrator password You use this password to log into the server management page If you have a complex password I recommend you write it down By default the computer is assigned an IP address from the IP address server In my case the router will assign it to the server an unused ip address After completing the operating system installation, an access address will appear on your screen You use it to access the server over the network The access address is the ip address of the server These are the steps to install the operating system for the network storage server I use it to build a cloud storage server To log in to the server management page, I use another computer on the same internal network On that computer, I open any browser and log in to the management page using the ip address Before going to the steps to build a cloud storage server, you set up the following basic steps You set up the time zone The time zone helps you synchronize between applications or schedule By default, the server uses a dynamic ip address, so you assign it a static ip address Because the following setup steps require the server to have a static ip address Because the following setup steps require the server to have a static ip address Also make sure the server has an internet connection So you set up the gateway address and set up the domain name resolution address The gateway address is usually the ip address of the router After completing the ip address setup I use the diagnostic tool to make sure the server has an internet connection So my server has an internet connection Next I set up storage On my server there are two traditional hard drives I use them to store data and install applications If you want a large cloud storage then use more hard drives or a larger hard drive I will wipe the traditional drives before configuring storage With two hard drives I store a two-way mirror I save data like this to ensure data safety If one of my two hard drives fails my data is still safe Next I show you how to build a cloud storage server A free and popular solution is to use an application called NextCloud With this app you can sync data across multiple devices It works similar to other commercial cloud applications I will install this application on the network storage server to optimize storage capacity and take advantage of data protection You follow the steps below You are asked to create an admin account You write it down to log in to the cloud after completing the installation I use the same ip address for the server and the cloud application The cloud application uses a different port from the server You are asked to create a database password You are asked to create a database password The cloud application uses the server's self-signed certificate You review the settings before deploying the application You make sure you remember the login password to use in the next steps The application is successfully deployed, you can access the cloud on the internal network The application uses the hard drives on the server to store data so the size is quite large Much larger than other free cloud services I will add a new file to make sure it works good You can install other applications on this cloud So I have completed the installation of the NextCloud application on TrueNAS Scale But it only works in the internal network I want to access this cloud remotely. The first method I think of is using a VPN You build a VPN server yourself or use a VPN service I will introduce how to use a VPN service first You install an application called Tailscale This is a VPN service, this application helps the server become a client of the VPN I use a Google account to create a free VPN I use a Google account to create a free VPN To have the server join this VPN, you create a new authentication key On the management page, you create a new authentication key After getting the authentication key, you add it to the application You use the server as an exit node Next, you add a route I set it up like this so that other devices can access the internal network through this VPN On the management page, you enable route and exit node for the server So the server has joined the virtual private network By default, the authentication key is active for a certain period of time If you want to use it for a long time, disable the expiration of the key Other devices that want to access the cloud server must also join this virtual private network Other devices that want to access the cloud server must also join this virtual private network You can install this virtual private network application on your computer or on your phone I use my computer as another device joining the virtual private network On my computer, I connect to another network Two devices that are not on the same local network do not share a public IP address On my computer, I install the client software The computer joins the network using the same Google account The computer joins successfully. So the virtual private network has two devices I name the computer to distinguish the two devices The diagnostic tool tells me that the computer has successfully connected to the remote server I access the cloud server as if they were on the same local network The advantage of this method is that it is easy to do, no need for a public IP address static, no need for dynamic domain name service, no need for port forwarding on the router The advantage of this method is that it is easy to do, no need for a public IP address static, no need for dynamic domain name service, no need for port forwarding on the router But the biggest drawback of this method is that the speed is not high So I will introduce how to build a VPN server yourself I will delete the application on the server and delete the software on the computer On the VPN service management page, I delete two devices To build a VPN server, I use WireGuard To build a VPN server, I use WireGuard I use a network storage server as a VPN server You are not limited to the number of client devices You write down the network interface name on the server to use in the next step The VPN server uses a public IP address or a domain name I use a free dynamic domain name service to update the public IP address The dynamic domain name service is called DuckDNS I use a Google account to log in to this service Then I create a new free domain name. Dynamic domain name service will solve your dynamic public ip address problem If you use static public ip address then skip this step At that time you enter the public ip address instead of domain name Next you forward the port on the router By default this VPN service uses port 51820 You can change it if you want On the router you forward the port to the server ip address Next you update the name of the network interface that I wrote down in the previous step I accidentally changed the default port so I will fix it I use the default port to build the VPN server Next I set the password of the management page The setup steps are complete, I deploy the application The application is deployed successfully I go to the management page Here you add new clients Clients connect to the server using a configuration file or QR code In this case I use the computer as the client so I download the configuration file In this case I use the computer as the client so I download the configuration file Next I use this computer as a client On the computer I install the client software After completing the installation I import the configuration file in the previous step After completing the installation I import the configuration file in the previous step I connect the computer to another wireless network to check the result Before the VPN is set up my computer cannot connect to the server On the client I set up the VPN connection As you can see my computer has successfully connected to the server via the VPN Now I can access the server management page, can access the cloud remotely . With the way to build your own VPN server, you will optimize the connection speed between devices while still ensuring security But you need to forward ports on the router and use a dynamic domain name service . You can do it the above way because I use free solutions On the server you install an additional application to update the public IP address You choose DuckDNS in the list of services Next you fill in the domain name and token The application is deployed successfully It automatically detects if your public ip address changes and maps the new ip address to your domain Both methods above use VPN You connect to the private cloud via VPN They require your computer or phone to install a VPN client application Is there a way to connect to the private cloud without a VPN. The answer is yes That is the method of accessing the private cloud directly that I will introduce now I delete the VPN server application on the server At the same time delete the client software on the computer . On the router I delete the port forwarding for the VPN server application You follow these steps to remotely access the private cloud without a VPN On the router you forward the port to the cloud application You forward the port to the server's ip address Because the server and the application share the same ip address To access the cloud remotely you use the address public ip or domain name instead of local ip address I use the domain name of the dynamic domain service I use the domain name created in the previous step Then I update the application Now you can access the cloud using the domain name Clients accessing the cloud do not need a VPN. This method has a better connection speed
But this connection method does not use a VPN so it is not as secure as the previous two methods . Which method do you prefer to use, please leave a comment Thank you for watching, don't forget to like and subscribe Here I install the client application on your phone and computer to connect to the cloud Unlike a network storage server, the cloud application helps you synchronize data between devices On the cloud you can install other applications for group work. Good luck
2024-11-27 18:16