{"id":421,"date":"2022-03-23T11:33:29","date_gmt":"2022-03-23T06:03:29","guid":{"rendered":"https:\/\/lazytourer.com\/in\/?p=421"},"modified":"2022-09-05T14:09:29","modified_gmt":"2022-09-05T08:39:29","slug":"how-to-setup-nextcloud-self-hosted-home-backup-internet-server","status":"publish","type":"post","link":"https:\/\/lazytourer.com\/in\/how-to-setup-nextcloud-self-hosted-home-backup-internet-server\/","title":{"rendered":"How to setup NextCloud self hosted home backup internet server"},"content":{"rendered":"\n<p>Google Photos is no longer free and a vast majority of the users who are used to cloud backup of their smartphone photos &amp; videos with unlimited space for free to save space in their phones and having always access to their data for free are left with a difficult place to search for alternative<\/p>\n\n\n\n<p class=\"has-text-align-center has-black-background-color has-background has-large-font-size\"><strong><span class=\"has-inline-color has-white-color\">What is NextCloud?<\/span><\/strong><\/p>\n\n\n\n<p>NextCloud is an open source Cloud Backup self hosted server software. It has many features for wide range of users, starting from large business to personal users like you and me. NextCloud offers every feature that one may expect or get from Google Cloud Suite \/ G Drive \/ OneDrive \/ Office 365 or services like Dropbox and such.<br><br>NextCloud service can be purchased from many service hosting providers or you can use this open source code software to install in your own virtual server (VPS) in AWS (amazon web services) or at any VPS \/ Cloud hosting provider.<br><br>However the biggest benefit of this software is that you can install it in a computer at home or office and turn that computer into your personal cloud backup server. This gives absolute security and control over your data without sharing it with Google \/ Microsoft or such companies. A perfect alternative to Google Drive and Google Photos. Self hosted, always online, internet enabled cloud backup server.<br><br>In <a href=\"https:\/\/lazytourer.com\/in\/how-to-install-setup-use-nextcloud-as-google-photo-alternative-for-local-backup\/\" target=\"_blank\" rel=\"noreferrer noopener\">one of our previous article<\/a>, we have shared a detailed installation guide on how to install NextCloud in your own home PC \/ Laptop as a virtual machine (VM) and start automatic back-up your smartphone data (mainly photos and videos), just like Google Photos for free and with virtually unlimited space. However, that is good for single person use and that is not connected to internet meaning one needs to be in his local home network to get the setup work.<br><br>In this article we shall take this setup a step further and make a proper dedicated home server connected with internet to allow you backup from anywhere in the world and access your data from any device or any place in the world via Internet. A true Google Photos alternative with all the feature it offers.<\/p>\n\n\n\n<p class=\"has-text-align-center has-white-color has-black-background-color has-text-color has-background has-large-font-size\"><strong>Prerequisites of this setup<\/strong><\/p>\n\n\n\n<p>Before you proceed with the setup, make sure you have got all the prerequisites ready. To setup NextCloud personal home backup server as Google Photos alternative and expose your local server to the internet to make it always available, you must be having below mentioned stuff ready.<\/p>\n\n\n\n<p class=\"has-text-align-center has-vivid-cyan-blue-color has-text-color\"><strong>Hardware Prerequisites<\/strong><\/p>\n\n\n\n<p><strong>One PC (Desktop \/ Laptop \/ Server)<\/strong><br><br>You need to have a Computer dedicated for this setup. Best thing is that you can use any old computer for this setup. You can repurpose an old laptop or a desktop (Intel Core 2 Duo \/ AMD X2 or higher). But remember, this computer will run 24&#215;7 so try to choose a low powered computer if your server will have just handful of users. In my case, I am using an old laptop since it is really power efficient and offers gigabit ethernet port.<br><br>Fun fact, you only need the CPU for regular operation, since Monitor \/ Keyboard \/ Mouse etc is not required after the server is setup. For setup process, you can use your primary PC&#8217;s display \/ keyboard \/ mouse.<br><br>NextCloud is a highly scalable software, more the users, more hardware resources you may need. But for our use case, as an alternative to Google Photos, make sure to put a large HDD (or SSD if you can afford). 500GB or higher should be fine for normal home users with 10\/12 active users.<\/p>\n\n\n\n<p><strong>One Router<\/strong> (&amp; a RJ45 LAN Cable)<br><br>You need to have a router. Now theoretically even a small 4G hotspot routers can work too but for effective setup, you should be having a broadband connection and a router with Lan ports (Gigabit LAN ports preferred). Make sure to use Ethernet (LAN Cable) to connect your PC (in which nextcloud is to be installed) with LAN, try to avoid WiFi Networking.<\/p>\n\n\n\n<p><strong>One USB Pen Drive (4GB or higher)<\/strong><br><br>This is needed for installation of Operating System<\/p>\n\n\n\n<p class=\"has-text-align-center has-vivid-cyan-blue-color has-text-color\"><strong>Software Prerequisites<\/strong><\/p>\n\n\n\n<p>We shall be using free software. Absolutely legal &amp; 100% free stuff. No need to pay for any license fee or use crack \/ pirated software.<br><br>* Ubuntu (Linux Operating System)<br>* NextCloud Server Software<br>* OpenVPN Software<br>* Amazon Web Services (AWS) Free account -&gt; (This one needs a debit or credit card for activation)<\/p>\n\n\n\n<p class=\"has-text-align-center has-white-color has-black-background-color has-text-color has-background has-large-font-size\"><strong>Setup Overview<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/Setup_OverView.jpg\" alt=\"\" class=\"wp-image-424\" width=\"646\" height=\"320\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/Setup_OverView.jpg 646w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/Setup_OverView-300x149.jpg 300w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><\/figure>\n<\/div>\n\n\n<p>Above the setup overview that we are going to achieve with this article \/ tutorial. We are going to install and create a home server running Ubuntu (Server) as OS and NextCloud as server. This setup will be connected to the home network via router setup and from there on to the internet.<br><br>In India, very few ISP gives Public IP to user premises, rather they use WAN (Wide Area Network) setup so most of our home routers are assigned WAN IP under the CG-NAT. Therefore one Public IP is shared between hundreds of internet users and they (like you and me) further share that connection via our local LAN (Router NAT). So its impossible to access your home server from outside (internet).<br><br>The easy work around is to create a virtual private network between the home server &amp; a computer having Public IP (preferable Static IP). Then forward all server related traffic from there to the home server via that VPN tunnel.<br><br>Here in our setup, we are going to do just that using AWS (Amazon Web Services) via their free account, free of charge. This setup will allow the server to work with any type of internet connection.<\/p>\n\n\n\n<p class=\"has-text-align-center has-white-color has-black-background-color has-text-color has-background has-large-font-size\"><strong>Creating AWS A\/C and Setting up Ubuntu-OpenVPN Server<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center has-vivid-cyan-blue-color has-text-color\"><strong>Creating AWS free account<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-left\">There are many online tutorials and youtube videos available on how to create \/ signup for a free AWS Account. So google for them to follow step by step guide to signup for a free AWS account -&gt; <a href=\"https:\/\/aws.amazon.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/aws.amazon.com\/<\/a><\/p>\n\n\n\n<p class=\"has-text-align-center has-vivid-cyan-blue-color has-text-color\"><strong>Deploy Ubuntu Virtual Private Server under Free Account<\/strong><\/p>\n\n\n\n<p>After you have singed up for AWS and created a free account there, visit <a href=\"https:\/\/console.aws.amazon.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/console.aws.amazon.com\/<\/a> &amp; login as root user into your AWS account. Now after login, you land in the main page, there at the top left hand corner, you may find an option called &#8220;services&#8221;, click that and in the following menu, click on &#8220;EC2&#8221;. As shown in below screenshots.<\/p>\n\n\n\n<p class=\"has-text-align-center has-larger-font-size\"> <a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_03.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"250\" height=\"138\" class=\"wp-image-427\" style=\"width: 250px;\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_03.png\" alt=\"AWS Menu\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_03.png 552w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_03-300x165.png 300w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a> &#8212;&gt; <a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_04.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"250\" height=\"140\" class=\"wp-image-428\" style=\"width: 250px;\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_04.png\" alt=\"AWS Menu EC2\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_04.png 605w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_04-300x168.png 300w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n\n\n\n<div class=\"wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p>Now in the main landing page of your EC2 dashboard, there are 2 options we shall be playing with for creating an Ubuntu Virtual Server and for configuring Firewall to allow network traffic to flow. Options are given in left hand side as navigation panel and the two options we need are first &#8220;Instances&#8221; and second one is &#8220;Security Groups&#8221;. So the first thing to do is to click on Instances.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\"><div class=\"wp-block-image is-style-default\">\n<figure class=\"aligncenter size-thumbnail is-resized\"><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_05.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_05-150x150.png\" alt=\"AWS Creating VPS\" class=\"wp-image-431\" width=\"190\" height=\"141\"\/><\/a><\/figure>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:25%\">\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_06.png\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"353\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_06.png\" alt=\"AWS Creating Free VPS\" class=\"wp-image-436\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_06.png 700w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_06-300x151.png 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p>You may see there is a orange color option called &#8220;launch instances&#8221; at the top right hand corner of the web page, click that to bring up the VPS selection page, there type Ubuntu at the search bar and select Ubuntu 20.04 LTS x86.<\/p>\n<\/div>\n<\/div>\n\n\n\n<p>On the next page, select the T.2 Micro free tier eligible option for your VPS &amp; down at the bottom corner click next to move to the next page &#8212;&#8212;&gt; Now in Configuration details page, touch nothing and just click next button down at bottom. &#8212;&#8211;&gt; On the next page, just change the storage value from 8 (default) to 16 GB and click next down at the bottom &#8212;&#8212;&gt; On the next page of adding tags, just leave anything default and click next &#8212;-&gt; Now at Security Group Configuration, name your security group, like I have done in my case as an example, and write down the description before click Review &amp; launch &#8212;&#8211;&gt; Now you shall be prompted to create a new key pair, this is important, name your keypair aws and download that aws.pem file into your computer before clicking final launch button.<br><br>Refer to these bellow screenshots for step by step process,<\/p>\n\n\n\n<div class=\"wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-thumbnail\"><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_07.png\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_07-150x150.png\" alt=\"\" class=\"wp-image-441\"\/><\/a><\/figure>\n\n\n\n<p><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-thumbnail is-style-default\"><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_07-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_07-1-150x150.png\" alt=\"\" class=\"wp-image-442\"\/><\/a><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-thumbnail is-style-default\"><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_07-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_07-2-150x150.png\" alt=\"\" class=\"wp-image-443\"\/><\/a><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-thumbnail is-style-default\"><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_07-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_07-3-150x150.png\" alt=\"\" class=\"wp-image-444\"\/><\/a><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-thumbnail is-style-default\"><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_08.png\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_08-150x150.png\" alt=\"\" class=\"wp-image-445\"\/><\/a><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-thumbnail is-style-default\"><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_10.png\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_10-150x150.png\" alt=\"\" class=\"wp-image-446\"\/><\/a><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"has-text-align-center has-vivid-cyan-blue-color has-text-color\"><strong>Login and Configure AWS VPS Ubuntu VPN Server<\/strong><\/p>\n\n\n\n<p>The first step is to figure out the Public IP address of the AWS VPS (Amazon Web Service), which we have just created from the above steps. You can view that from your AWS Control Panel.<br><br>* Open https:\/\/console.aws.amazon.com (login if you aren&#8217;t)<br>* Click EC2 from the AWS Management Console -&gt; All Services<br>* On your Left, click instances from the menu<br>* Select the newly created running EC2 instance (VPS) and click the details option below.<br><br>Refer to this below image for clarification,<br><br><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_EC2_VPS_IP_Finding.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"374\" class=\"wp-image-454\" style=\"width: 750px;\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_EC2_VPS_IP_Finding.png\" alt=\"\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_EC2_VPS_IP_Finding.png 750w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_EC2_VPS_IP_Finding-300x150.png 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/a><br><br>Here, you may note down the Public IPv4 address and the host name as shown above. This IP address or hostname is to be used for Remote login to the AWS VPS Ubuntu Server.<\/p>\n\n\n\n<p class=\"has-text-align-center has-vivid-cyan-blue-color has-text-color\"><strong>How to login to AWS EC2 VPS Instance?<\/strong><\/p>\n\n\n\n<p>You can login to the EC2 Server from any Computer running Windows \/ MAC OSX or Linux. Simply launch the terminal (Linux \/ Mac) or Command prompt of Windows (with admin rights) in the same directory as your AWS key file, and type in the following command for login.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\"><code><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">ssh -i aws.pem ubuntu@13.127.234.216<\/mark><\/strong><\/code>     &lt;- Use your own AWS IP<\/p>\n\n\n\n<p>For example, if you have the AWS Key file in your Windows download folder, then open your command prompt and run the command from your download directory.<br><br><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"433\" class=\"wp-image-479\" style=\"width: 600px;\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_Login.jpg\" alt=\"\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_Login.jpg 621w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_Login-300x216.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><br><br>Here the aws.pem is your key file (remember, we downloaded that when creating the VPS) and IP address is what you just noted down in above post.<br><br><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS-EC2-login.png\"><img loading=\"lazy\" decoding=\"async\" width=\"574\" height=\"395\" class=\"wp-image-458\" style=\"width: 574px;\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS-EC2-login.png\" alt=\"\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS-EC2-login.png 574w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS-EC2-login-300x206.png 300w\" sizes=\"auto, (max-width: 574px) 100vw, 574px\" \/><\/a><\/p>\n\n\n\n<p class=\"has-text-align-center has-vivid-cyan-blue-color has-text-color\"><strong>Step 1 -&gt; Update the Ubuntu Server<\/strong><\/p>\n\n\n\n<p>Type following commands one by one to update the AWS Ubuntu Server,<\/p>\n\n\n\n<p><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><strong>sudo timedatectl set-timezone Asia\/Kolkata<\/strong><\/mark><\/code><br><strong><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">sudo apt update<\/mark><\/code><\/strong> <br><strong><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">sudo apt upgrade -y<\/mark><\/code><\/strong> <br><br>once the update finishes, reboot the server,<br><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>sudo reboot<\/code><\/mark><\/strong> <br><br><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_EC2_update.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"650\" height=\"368\" class=\"wp-image-457\" style=\"width: 650px;\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_EC2_update.png\" alt=\"\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_EC2_update.png 650w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/11\/AWS_EC2_update-300x170.png 300w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/a><\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><span class=\"has-inline-color has-vivid-cyan-blue-color\">Step 2 -&gt; Installing OpenVPN Server<\/span><\/strong><\/p>\n\n\n\n<p>Open the cmd with admin rights again, and use the login command to login to the AWS Server. Once you are logged in, run the following commands one by one for OpenVPN Server installation and configuration.<br><br><strong><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">sudo su<\/mark><\/code><\/strong><br><code><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">sudo mkdir vpn<\/mark><\/strong><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">cd vpn<\/mark><\/strong><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">sudo curl -O https:\/\/raw.githubusercontent.com\/angristan\/openvpn-install\/master\/openvpn-install.sh<\/mark><\/strong><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">sudo chmod +x openvpn-install.sh<br>sudo .\/openvpn-install.sh<\/mark><\/strong><\/code><br><br>This last command will now launch the OpenVPN installation prompt. Carefully fill in the questions, like multiple choice answers,<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p>Q1 \u2013 Host Name -&gt; Type AWS IP &amp; press enter<br>Q2 &#8211; IPv6 NAT -&gt; Type n &amp; Press Enter<br>Q3 &#8211; Port Type -&gt; Type 2 (Custom) &amp; Press Enter<br>Q4 &#8211; Protocol -&gt; Type 1 (UDP) &amp; Press Enter<br>Q5 &#8211; DNS -&gt; Type 3 (CloudFlare) or 9 (Google) &amp; Press Enter<br>Q6 &#8211; Compression -&gt; Type n &amp; Press Enter<br>Q7 &#8211; Encryption Settings -&gt; Type n &amp; Press Enter<br>Q8 &#8211; Client Name -&gt; Type nextcloud &amp; Press Enter<br>Q9 &#8211; Password -&gt; Type 1 (password less) Enter<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2022\/03\/OpenVPN_Installation_Process.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"831\" height=\"821\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2022\/03\/OpenVPN_Installation_Process.jpg\" alt=\"\" class=\"wp-image-532\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2022\/03\/OpenVPN_Installation_Process.jpg 831w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2022\/03\/OpenVPN_Installation_Process-300x296.jpg 300w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2022\/03\/OpenVPN_Installation_Process-768x759.jpg 768w\" sizes=\"auto, (max-width: 831px) 100vw, 831px\" \/><\/a><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>Now you shall be asked to press enter to start the actual installation process. Once the installation is complete, you client configuration file will be created and saved in root directory.<\/p>\n\n\n\n<p>You shall need to download that client configuration file, in this case, nextcloud.ovpn into your computer.<\/p>\n\n\n\n<p class=\"has-text-align-center has-vivid-cyan-blue-color has-text-color\"><strong>Step 3 -&gt; Assigning Static IP Address for nextcloud OpenVPN Client<\/strong><\/p>\n\n\n\n<p>Now we need to create a file with exact same name of the client (in this case nextcloud) and define the static IP inside that, so run following to create the file.<br><br><strong><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">cd \/etc\/openvpn\/ccd\/<\/mark><\/code><\/strong><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>sudo nano nextcloud<\/code><\/mark><\/strong><br><br>And paste this -&gt; <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">ifconfig-push 10.8.0.45 255.255.255.0<\/mark><\/strong><br><br>Press <strong>Control + X<\/strong> -&gt; then type <strong>Y<\/strong> -&gt; Then Press Enter to save the file.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><span class=\"has-inline-color has-vivid-cyan-blue-color\">Step 4 -&gt; Forward all Internet Traffic to your NextCloud Server from AWS VPS<\/span><\/strong><\/p>\n\n\n\n<p>Type <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">reboot<\/mark><\/strong> to restart the server and log back into your AWS Ubuntu Server. Run following commands one by one.<br><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>sudo su<br>iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-destination 10.8.0.45:80<br>iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j DNAT --to-destination 10.8.0.45:443<\/code><\/mark><\/strong><br><br>This is forward all incoming web traffic from AWS VPS to your NextCloud server via the OpenVPN Tunnel. Caution, iptable command is not saved, so after this step, do not reboot your AWS Server. If you do, you will have to run the iptable commands again.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><span class=\"has-inline-color has-vivid-cyan-blue-color\">Step 5 -&gt; Open up the AWS Firewall Ports to allow Port 331\/80\/443<\/span><\/strong><\/p>\n\n\n\n<p>Open your browser from your local PC and login to aws.amazon.com from there go to EC2 and in your left hand side menu, visit Security Groups.<br><br>You should be having 2 security groups, one is default, and another is the one you have created while creating the Ubuntu Virtual Machine in AWS. Select that Security group and in below, click inbound rules and in your extreme right lower corner, you may fine the option to edit inbound rules.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_Security_Group.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"597\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_Security_Group-1024x597.png\" alt=\"\" class=\"wp-image-483\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_Security_Group-1024x597.png 1024w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_Security_Group-300x175.png 300w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_Security_Group-768x448.png 768w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_Security_Group.png 1204w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Now click add rules to add these following,<br><br>HTTP -&gt; Port 80 -&gt; Source Anywhere IPv4<br>HTTPs -&gt; Port 443 -&gt;  Source Anywhere IPv4<br>Custom UDP -&gt; Port 331 -&gt; Source Anywhere IPv4<br>Custom IMCP IPv4 -&gt; Protocol Echo Request -&gt; Source Anywhere IPv4<br><br>Then click save rules to exit the page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_Firewall_Port.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"513\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_Firewall_Port-1024x513.png\" alt=\"\" class=\"wp-image-485\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_Firewall_Port-1024x513.png 1024w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_Firewall_Port-300x150.png 300w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_Firewall_Port-768x385.png 768w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_Firewall_Port.png 1148w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-text-align-center\"><strong><span class=\"has-inline-color has-vivid-cyan-blue-color\">Step 6 -&gt; Download the Client Configuration file into your PC from AWS Ubuntu Server<\/span><\/strong><\/p>\n\n\n\n<p>First step is to move the file from root directory to download directory we created before running the OpenVPN installation, so make sure you are logged into the AWS Ubuntu Server using your CMD or Terminal, and run following command,<br><br><strong><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">sudo su<\/mark><\/code><\/strong><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>mv \/home\/ubuntu\/nextcloud.ovpn \/home\/ubuntu\/vpn\/<\/code><\/mark><\/strong><br><br>or sometimes, the .ovpn file gets created at \/root location, so there you need to run,<br><br><strong><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">sudo su<\/mark><\/code><\/strong><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>mv \/root\/nextcloud.ovpn \/home\/ubuntu\/vpn\/<\/code><\/mark><\/strong><br><br>Now open another command prompt (Windows) or Terminal (in Linux\/Mac) in the same directory where you have AWS.PEM file in your local PC and type the following command to connect with AWS Ubuntu Server and copy\/download the above mentioned file into your PC. (Remember to replace the IP address show here with your own AWS IP address)<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><strong><code>scp -i aws.pem ubuntu@35.154.119.150:\/home\/ubuntu\/vpn\/nextcloud.ovpn .\/nextcloud.ovpn<\/code><\/strong><\/mark><br><br><img loading=\"lazy\" decoding=\"async\" width=\"650\" height=\"47\" class=\"wp-image-486\" style=\"width: 650px;\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_SCP_Download.jpg\" alt=\"\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_SCP_Download.jpg 936w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_SCP_Download-300x21.jpg 300w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/AWS_SCP_Download-768x55.jpg 768w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><br><br>It will download the configuration file from aws ubuntu server into the directory where you have the AWS key file, like in my case, it is my Windows download folder.<br><br><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Download_Config_01.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"290\" height=\"261\" class=\"wp-image-487\" style=\"width: 290px;\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Download_Config_01.jpg\" alt=\"\"><\/a><\/p>\n\n\n\n<p><strong>We are done with the AWS Ubuntu OpenVPN Server backend Configuration, We shall never need to login here again, It will continue to run for One full year for free.<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center has-white-color has-black-background-color has-text-color has-background has-large-font-size\">Ubuntu 20 LTS and NextCloud Server Installation \/ Configuration in you Local Server Hardware<\/p>\n\n\n\n<p>First thing you need to do is the selection of hardware for NextCloud server. Beauty of linux is that it allows us to use very old, otherwise rejected hardware and repurpose that into a working and effective server. So you can use you old desktop or laptop for this job.<br><br>For example, I am selecting a Pentium Quad Core N3530 based Acer laptop with 500GB HDD and 4GB RAM. This laptop is working fine but unfortunately the configuration is very weak for Windows 10 or 11. It has Gigabit Lan Port and being a laptop, it already has it&#8217;s own power backup. Cherry on top, being a weak CPU has it&#8217;s own advantage in Server duty, it is extremely frugal in power consumption so it will save a lot in electricity bill for 24&#215;7 operation.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><span class=\"has-inline-color has-vivid-cyan-blue-color\">Step 1 -&gt; Installing Ubuntu Server 20.04 LTS<\/span><\/strong><\/p>\n\n\n\n<p>First thing you may need to do is to visit Ubuntu Official Website and download the Ubuntu 20 Server Installation ISO. The download a tool like rufus and use an USB Pen \/ Thumb drive to create an installation media. Its a very simple job, takes a few click only and there are many good step by step tutorial available, so search and follow any of them. <br><br>Once you have got the installation USB ready, plug it in the computer you wish to run the server, make sure to plug in the network cable and turn it on to boot from the USB to start the installation. There are many installation tutorial guide and videos are available, you may search and take help from there, otherwise, installation is very straight forward process, just 3 stages where you need to do some modification,<br><br><strong>Setting up a Static IP as per your Internal Network IP Range.<\/strong><br><br>While on installation process, when asked for network settings, edit the network configuration to input a Static IP Address as per your router IP Range.<br><br><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_01.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"470\" height=\"300\" class=\"wp-image-492\" style=\"width: 470px;\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_01.jpg\" alt=\"\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_01.jpg 471w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_01-300x192.jpg 300w\" sizes=\"auto, (max-width: 470px) 100vw, 470px\" \/><\/a><br><br>For example, here is mine, how it looks while entering the a Static IP Address as per my router IP range.<br><br><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_02.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"390\" class=\"wp-image-493\" style=\"width: 600px;\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_02.jpg\" alt=\"\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_02.jpg 603w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_02-300x195.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><br><br>Secondly when on selecting hard disk partition layout, just change one option for disk size.<br><br><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_03.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"401\" class=\"wp-image-494\" style=\"width: 600px;\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_03.jpg\" alt=\"\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_03.jpg 728w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_03-300x201.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><br><br>Ubuntu installation by default leaves out some of the disk as empty, so here just input the max capacity, which is write just left of the input box. Simply write that max value as it is and save to proceed.<br><br><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_04.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"550\" height=\"270\" class=\"wp-image-495\" style=\"width: 550px;\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_04.jpg\" alt=\"\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_04.jpg 596w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_04-300x147.jpg 300w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/a><br><br>Thirdly, make sure to turn on the SSH Server Installation option and complete the installation without adding anything extra from the optional installation list.<br><br><a href=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_05.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"249\" class=\"wp-image-496\" style=\"width: 400px;\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_05.jpg\" alt=\"\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_05.jpg 417w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/12\/Ubuntu_Install_05-300x187.jpg 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><br><br>Make sure to setup a strong user name and password &amp; complete the installation process.<br><br>Once the setup process is done and your server reboots, you no longer need any keyboard \/ mouse \/ monitor. Just keep the network cable connected and you can do all further work from your PC remotely using command line.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><span class=\"has-inline-color has-vivid-cyan-blue-color\">Step 2 -&gt; Installing and Setting up NextCloud Server<\/span><\/strong><\/p>\n\n\n\n<p>Just like we can log into AWS Ubuntu Server using Command Prompt (CMD) in WIndows or via Terminal in Linux or MAC, here too, go back to your PC \/ Laptop and type in following command in your CMD \/ Terminal Window to login to the Ubuntu Home Server.<br><br>ssh username@IPadress<br><br>In my case, its like, <br><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>ssh lazy@192.168.1.45<\/code><\/mark><\/strong><br><br>It will ask for your Ubuntu Home Server password, enter that to login.<br><br><img loading=\"lazy\" decoding=\"async\" width=\"365\" height=\"200\" class=\"wp-image-550\" style=\"width: 365px;\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2022\/03\/SSH_Local_Login.jpg\" alt=\"\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2022\/03\/SSH_Local_Login.jpg 365w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2022\/03\/SSH_Local_Login-300x164.jpg 300w\" sizes=\"auto, (max-width: 365px) 100vw, 365px\" \/><br><br>Once logged in, run the following commands one by one to first update the server,<br><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>sudo timedatectl set-timezone Asia\/Kolkata<\/code><\/mark><\/strong><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>sudo apt update<br>sudo apt upgrade -y<br>sudo reboot<\/code><\/mark><\/strong><br><br>Once the server reboots, log back in and then run following commands one by one to install NextCloud server,<br><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>sudo snap install nextcloud<br>sudo nextcloud.manual-install <\/code><\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\"><code>username password<\/code><\/mark><\/strong>    (Replace the user name &amp; password with your own.)<br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>sudo nextcloud.occ config:system:set trusted_domains 1 --value=<\/code><\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\"><code>192.168.1.45<\/code><\/mark><\/strong> (your local nextcloud machine IP)<br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><strong><code>sudo nextcloud.occ config:system:set trusted_domains 2 --value=<\/code><\/strong><\/mark><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\"><code>35.154.119.150<\/code><\/mark><\/strong> (your AWS IP)<br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>sudo snap connect nextcloud:network-observe<\/code><\/mark><\/strong><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>sudo nextcloud.enable-https self-signed<\/code><\/mark><\/strong><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><strong><code>sudo reboot<\/code><\/strong><\/mark><\/p>\n\n\n\n<p>Once the server reboots, your nextcloud home server is now ready but only accessible within your home local network. Now lets connect it with AWS OpenVPN server to expose your local home server to the internet and make it available for access via internet.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><span class=\"has-inline-color has-vivid-cyan-blue-color\">Step 3 -&gt; Connecting to AWS OpenVPN Server<\/span><\/strong><\/p>\n\n\n\n<p>We shall be using the client configuration file downloaded from AWS OpenVPN Server and saved in your PC (remember?).<br><br>So first log into your Local Home Ubuntu-NextCloud Server from your PC, which has nextcloud.ovpn configuration file saved. (Use CMD or Terminal to type in ssh username@your-Local-IP) and run following commands<br><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>sudo apt install openvpn -y<\/code><\/mark><\/strong><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>cd \/etc\/openvpn<\/code><\/mark><\/strong><br><br>Now in your PC, right click on nextcloud.ovpn file and choose notepad to open with or edit with. Once the file opens in notepad, select all the contains and copy.<br><br>Now we shall create a new file called nextcloud.conf in side \/etc\/openvpn directory, and paste the entire contains of the nextcloud.ovpn file into that. So first run this command,<br><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>nano nextcloud.conf<\/code><\/mark><\/strong><br><br>Now paste the contains of nextcloud.ovpn file. (You may right click on CMD Window, that will paste whatever you copied). After that Save and Exit (CTRL+X  then Y, remember the saving process up top?).<br><br>Now you may reboot the server by running <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><code>sudo reboot<\/code><\/mark><\/strong><br><br>This will make your Ubuntu \/ NextCloud server fully headless and automated. Even if by any chance it restarts, it will load nextcloud and connect to AWS OpenVPN at start up automatically, ready to be used.<\/p>\n\n\n\n<p class=\"has-text-align-center has-white-color has-black-background-color has-text-color has-background has-large-font-size\"><strong>Access NextCloud Personal Home Server via Internet<\/strong><\/p>\n\n\n\n<p>Let&#8217;s test it,<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<p>Assuming you are using home broadband connection like AirTel or Jio Fiber or ACT or Hatway or any such at your home, so let&#8217;s type in the AWS IP address in your mobile phone browser like chrome or safari (turn of WiFi, and use Mobile data) &amp; use Mobile data to access your home server.<\/p>\n\n\n\n<p>If all went ok, you mobile browser will open up the nextcloud page but with a security warning. This security warning is for the self signed SSL we have used, so agree to the warning and proceed to access the log in page.<\/p>\n\n\n\n<p>You may need to click Continue as unsafe since this SSL certificate is your own, created in your own Ubuntu Server installation, by you. This certificate will not be recognized by the browsers so they throw up this warning.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2022\/02\/SSL-Warning-01.jpg\" alt=\"\" class=\"wp-image-510\" width=\"356\" height=\"791\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2022\/02\/SSL-Warning-01.jpg 250w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2022\/02\/SSL-Warning-01-135x300.jpg 135w\" sizes=\"auto, (max-width: 356px) 100vw, 356px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"435\" height=\"295\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2022\/02\/SSL-Waring-02.jpg\" alt=\"\" class=\"wp-image-511\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2022\/02\/SSL-Waring-02.jpg 435w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2022\/02\/SSL-Waring-02-300x203.jpg 300w\" sizes=\"auto, (max-width: 435px) 100vw, 435px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center has-white-color has-black-background-color has-text-color has-background has-large-font-size\" style=\"font-style:normal;font-weight:800\">How to Create &amp; Configure NextCloud Server &amp; Users<\/p>\n\n\n\n<p>Once you have logged into the NextCloud using your nextcloud User ID and password, now you can visit the settings pane and there you may find option to create further user accounts.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"483\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/07\/NextCloud-Log-in-Screen-upload.jpg\" alt=\"\" class=\"wp-image-305\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/07\/NextCloud-Log-in-Screen-upload.jpg 738w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/07\/NextCloud-Log-in-Screen-upload-300x196.jpg 300w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><\/figure>\n\n\n\n<p>Somehow, the NextCloud Server Admin page doesn&#8217;t work well with mobile browsers, so we recommend you using your PC \/ Laptop for this work. Remember, you can access nextcloud via both Internet and your local network (both AWS Internet &amp; Local LAN IP will work)<br><br>You may create multiple user name for your family members or house \/ room partners. However NextCloud works just like Google Photos so every user can use their multiple devices, Android \/ iPhones \/ laptop \/ iPad or tablet using that same user name and password and access all of their individual photos backed up and available at one place. Good thing is that one user account can\u2019t view pictures of another user account. So privacy data security is maintained at highest level.<\/p>\n\n\n\n<p class=\"has-text-align-center has-white-color has-black-background-color has-text-color has-background has-large-font-size\" style=\"font-style:normal;font-weight:900\">Configuring the NextCloud Mobile App for Auto Uploading Backup<\/p>\n\n\n\n<p>We have given a step by step guide in our previous <a href=\"https:\/\/lazytourer.com\/in\/how-to-install-setup-use-nextcloud-as-google-photo-alternative-for-local-backup\/\" target=\"_blank\" rel=\"noreferrer noopener\">NextCloud related article<\/a>. Where, we have shown how you can setup the NextCloud mobile app to auto upload all your images and videos.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"596\" height=\"650\" src=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/07\/NextCloud-App-Main-Screen-05-upload.jpg\" alt=\"\" class=\"wp-image-313\" srcset=\"https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/07\/NextCloud-App-Main-Screen-05-upload.jpg 596w, https:\/\/lazytourer.com\/in\/wp-content\/uploads\/2021\/07\/NextCloud-App-Main-Screen-05-upload-275x300.jpg 275w\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center has-white-color has-vivid-red-background-color has-text-color has-background has-large-font-size\" style=\"font-style:normal;font-weight:800\">Having issues, any <strong>question? &#8211; Feel free to drop us a comment<\/strong><\/p>\n\n\n\n<p>Comment section is yours to use. If you have any question, feel free to use it to ask. Similarly if you have any comments on this project, let us now.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Photos is no longer free and a vast majority of the users who are&#8230;<\/p>\n","protected":false},"author":1,"featured_media":557,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,67],"tags":[],"class_list":["post-421","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","category-reviews"],"_links":{"self":[{"href":"https:\/\/lazytourer.com\/in\/wp-json\/wp\/v2\/posts\/421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lazytourer.com\/in\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lazytourer.com\/in\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lazytourer.com\/in\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lazytourer.com\/in\/wp-json\/wp\/v2\/comments?post=421"}],"version-history":[{"count":53,"href":"https:\/\/lazytourer.com\/in\/wp-json\/wp\/v2\/posts\/421\/revisions"}],"predecessor-version":[{"id":718,"href":"https:\/\/lazytourer.com\/in\/wp-json\/wp\/v2\/posts\/421\/revisions\/718"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lazytourer.com\/in\/wp-json\/wp\/v2\/media\/557"}],"wp:attachment":[{"href":"https:\/\/lazytourer.com\/in\/wp-json\/wp\/v2\/media?parent=421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lazytourer.com\/in\/wp-json\/wp\/v2\/categories?post=421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lazytourer.com\/in\/wp-json\/wp\/v2\/tags?post=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}