<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by LAJAH SHRESTHA on Medium]]></title>
        <description><![CDATA[Stories by LAJAH SHRESTHA on Medium]]></description>
        <link>https://medium.com/@lajah.aws?source=rss-589c886671fc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*C2LLZd-SJZT15BGrbpqprg.jpeg</url>
            <title>Stories by LAJAH SHRESTHA on Medium</title>
            <link>https://medium.com/@lajah.aws?source=rss-589c886671fc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 18:27:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lajah.aws/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A Trek of Unity: Navigating Challenges and Discovering Togetherness]]></title>
            <link>https://medium.com/@lajah.aws/a-trek-of-unity-navigating-challenges-and-discovering-togetherness-58241504c7fa?source=rss-589c886671fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/58241504c7fa</guid>
            <category><![CDATA[overcoming-obstacles]]></category>
            <category><![CDATA[team]]></category>
            <category><![CDATA[togetherness]]></category>
            <category><![CDATA[trekking-in-nepal]]></category>
            <category><![CDATA[mountains]]></category>
            <dc:creator><![CDATA[LAJAH SHRESTHA]]></dc:creator>
            <pubDate>Sun, 03 Dec 2023 13:41:31 GMT</pubDate>
            <atom:updated>2023-12-03T15:32:41.730Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jdX56wf7Pe1Y11mopDoAeg.jpeg" /></figure><p>It was a crisp afternoon when our group of nine embarked on an 8-day trek to Langtang from Syaprubesi. The journey began with a mix of excitement and anticipation, each step promising breathtaking views and unforgettable experiences. As we set out at 3:30 PM, a subtle reminder of time echoed in the back of our minds. Our destination for the day was Bamboo, a seemingly manageable three-hour walk. However, the unpredictable nature of mountain trails had something else in store for us.</p><p>Around 5 PM, as dusk began to settle, we reached a crucial point: Pahiro, a location approximately 1.5 hours away from Bamboo. It was at this juncture that a passing traveler questioned my choice between Pahiro and Bamboo. &quot;Bamboo,&quot; I confidently replied, only to be met with a cryptic, &quot;Wrong decision, hai.&quot;</p><p>Undeterred, we pressed on, realizing that three of our friends had forged ahead. The suggestion to stay the night in Pahiro arose, but a commitment to the unity of our group prevailed. A friend of mine, became my companion throughout this trek. I led her continuously, ensuring she kept up, even as others paused for pictures because the pace differece we were facing.</p><p>Upon reaching Pahiro, the group was faced with a decision – to rest in Pahiro or push on. Recognizing that splitting up might jeopardize our plans for the next day, I advocated for continuing to Bamboo. Unbeknownst to us, this decision would soon unveil a challenge that tested our unity.</p><p>As the darkness enveloped us, the group naturally divided into pairs. Torchlights became our guiding beacons in the obsidian night. Unbeknownst to me, The two of us found ourselves alone, separated from the group. Panic set in when she suggested that we might have lost our way, her fear mirrored in the absence of any familiar faces as I had my doubts as well that we might have diverse fro the trail.</p><p>Amidst the uncertainty, the realization struck that we were stranded – lost in the heart of the jungle, with no one ahead or behind. Resigned to spending the night in the wilderness, a glimmer of hope emerged as a group of fellow trekkers emerged from the darkness. They were heading to Bamboo, and we had not strayed off course.</p><p>United once again, we followed our newfound companions, overcoming physical and mental hurdles. After what felt like an eternity, we reached Bamboo, greeted by the relieved faces of friends who had retraced their steps to find us.</p><p>—</p><p>In retrospect, our trek to Langtang was not solely defined by the challenges . Beyond the initial struggle, our journey unfolded into an unforgettable adventure, weaving together the threads of friendship, determination, and awe-inspiring natural beauty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*FUcrF653fkHH8_GrlK6rbw.jpeg" /><figcaption>Himalayan water flow(Rasuwa)</figcaption></figure><p>Amidst the breathtaking landscapes and camaraderie, the Langtang trek became a profound journey of self-discovery. One realization that resonated deeply was the seemingly boundless potential of the human body. As we navigated the challenging terrains, I found myself walking for hours on end, tirelessly pushing against the limits of physical endurance.</p><p>The rhythmic cadence of our footsteps echoed the indomitable spirit within, propelling us forward even when fatigue threatened to settle in. The realization dawned upon me that our bodies, when fueled by determination and a collective goal, are capable of achieving feats that defy conventional notions of limitation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*zPW6vG8VTFMo0etPZdQ7dw.jpeg" /></figure><p>Walking for nine hours straight became a testament to the resilience of the human spirit, an embodiment of the limitless possibilities that unfold when mind and body align towards a shared purpose. The Langtang trek became a canvas upon which I painted the portrait of my own capabilities, discovering that strength and endurance are not confined to physical boundaries but are instead nurtured by the unwavering will to overcome challenges.</p><p>In the realm of the mountains, I unearthed a newfound appreciation for the untapped potential within, a reminder that our bodies are vessels capable of carrying us through terrains both physical and metaphorical. The Langtang trek, with its arduous paths and awe-inspiring landscapes, served as a crucible where I witnessed the inexhaustible wellspring of energy that lies within the human form, awaiting discovery with each adventurous step taken.</p><p>As the days unfolded, we found ourselves traversing magnificent trails that unfolded like ancient stories written by the mountains themselves. Each step revealed breathtaking mountain vistas, valleys that seemed to stretch into eternity, and the crisp, invigorating air that only high-altitude adventures could offer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gwUsafzkianVS5XQumMYwQ.jpeg" /><figcaption>Sky picture taken from Ghodatabela(2nd day camp site)</figcaption></figure><p>The nights, adorned with a celestial display, offered a canvas painted with innumerable stars. Our campsites were transformed into open-air theaters, allowing us to marvel at the cosmic spectacle above, reinforcing the insignificance of our worries in the grandeur of the universe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qvtVCQgJ3gWjVIrmbd4kVw.jpeg" /><figcaption>Langtang Valley</figcaption></figure><p>Encounters with yaks, those majestic mountain companions, added a touch of surrealism to our trek. The rhythmic clinking of their bells echoed in harmony with the distant rivers, creating a symphony of nature&#39;s own composition.The countless suspension bridges we crossed, swaying gently over roaring rivers, became metaphors for our journey – connecting disparate points with resilient bonds, just as we, as a team, bridged gaps to forge a stronger unity. Seabuckthorn, a rare herb-like berry fruit exclusive to the region, captivated our senses with its unique essence. Sipping its nutritious juice unveiled a surreal taste, leaving an indelible mark on our trek as we savored the richness of the Himalayan wilderness.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yfKEWmEBTySWDVw5v_PLlw.jpeg" /><figcaption>Seabuckthrone Juice</figcaption></figure><p>This trek, marked by unexpected twists, embodied the essence of teamwork and togetherness. It taught us the importance of looking out for one another, making decisions that consider everyone’s well-being, and the strength that emerges when faced with adversity. Our journey to the destination became more than a physical challenge — it became a testament to the resilience of unity in the face of unforeseen challenges.</p><p>Perhaps most inspiring was the unwavering mentality that echoed within our group — a collective determination to reach our destination before the first light of dawn. Each day brought new challenges, yet our shared goal propelled us forward, fostering a spirit of camaraderie that transcended the physical demands of the trek.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sGuPtyHhD6A8TDEwUHNOaQ.jpeg" /><figcaption>View from <a href="https://www.nepalindependentguide.com/tsergo-ri/">Tsergo Ri Peak</a>(5000m)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b5ARr-rcdnoQyaGzSSGSYg.jpeg" /><figcaption>Travelers resting shade</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N5wN2kofO6eYtGV38ImD-Q.jpeg" /><figcaption>Our team at Pahiro</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58241504c7fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HA Proxy — Simple Setup and Easy Explanation]]></title>
            <link>https://medium.com/@lajah.aws/ha-proxy-simple-setup-and-easy-explanation-70cbabd2b0b2?source=rss-589c886671fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/70cbabd2b0b2</guid>
            <category><![CDATA[haproxy]]></category>
            <category><![CDATA[easy-tutorials]]></category>
            <category><![CDATA[setup]]></category>
            <category><![CDATA[load-balancing]]></category>
            <dc:creator><![CDATA[LAJAH SHRESTHA]]></dc:creator>
            <pubDate>Mon, 14 Aug 2023 02:22:33 GMT</pubDate>
            <atom:updated>2023-08-14T02:22:33.685Z</atom:updated>
            <content:encoded><![CDATA[<h3>HA Proxy — Simple Setup and Easy Explanation</h3><p><em>-Lajah Shrestha</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*Sv26VbW2e61BrVseZc0BlA.png" /></figure><h3>Objective:</h3><ol><li>Learn why HA proxy is used and compare it with Nginx and apache2. Create a summary document on this.</li><li>Learn and do demo on all of the concepts shown in this guide <a href="https://phoenixnap.com/kb/haproxy-load-balancer">How to Configure and Use HAProxy for Load Balancing</a> .</li></ol><h3>HA Proxy vs NGINX/APACHE2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*MCTb22vw20i1F4zMGOhARg.png" /></figure><p>HAProxy is a widely-used open-source software solution for load balancing and proxying network traffic. It stands for High Availability Proxy and is known for its high performance, reliability, and flexibility. HAProxy is designed to distribute incoming network requests across multiple servers to optimize resource utilization, improve scalability, and ensure high availability of services.</p><p>Key features of HAProxy include:</p><ol><li>Load Balancing: HAProxy acts as a traffic distributor, forwarding client requests to backend servers based on various algorithms, such as round-robin, least connections, source IP, and more. This helps evenly distribute the workload and prevent individual servers from becoming overwhelmed.</li><li>High Availability: HAProxy ensures that even if one server fails or becomes unresponsive, the traffic is automatically rerouted to healthy servers, minimizing downtime and maintaining service availability.</li><li>SSL/TLS Termination: HAProxy can handle SSL/TLS encryption and decryption, offloading the processing overhead from backend servers and improving performance.</li><li>Health Checks: HAProxy can regularly check the health of backend servers to ensure they are responsive and capable of handling requests. If a server fails the health check, it is temporarily removed from the pool until it becomes healthy again.</li><li>Session Persistence: HAProxy supports session persistence, allowing clients to maintain their session with the same backend server for the duration of their interaction. This is essential for applications that require consistent state or session data.</li><li>Fine-grained Configuration: HAProxy provides a flexible and concise configuration language that allows administrators to define complex load balancing rules, customize request handling, and apply various optimizations.</li><li>Logging and Monitoring: HAProxy generates detailed logs that provide insights into traffic patterns, server health, and potential issues. It also integrates with monitoring systems to enable real-time monitoring and alerting.</li></ol><p>Due to its performance, reliability, and extensive feature set, HAProxy is commonly used in web applications, APIs, microservices architectures, and any scenario where load balancing, high availability, and scalability are crucial. It is available as an open-source solution, but there are also commercial offerings that provide additional features, support, and enterprise-grade capabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*6WrWefHZlEKaC08RP73z4w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*cmM67ZfiMIv8eFookr2czw.png" /></figure><h3>Implementation of HA proxy</h3><p>Install HA-proxy</p><pre>sudp apt udpate<br>sudo apt install haproxy</pre><p>configure config file</p><pre>sudo vim /etc/haproxy/haproxy.cfg</pre><pre>global<br>        log /dev/log    local0<br>        log /dev/log    local1 notice<br>        chroot /var/lib/haproxy<br>        stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners<br>        stats timeout 30s<br>        user haproxy<br>        group haproxy<br>        daemon</pre><pre>        # Default SSL material locations<br>        ca-base /etc/ssl/certs<br>        crt-base /etc/ssl/private</pre><pre>        # See: &lt;https://ssl-config.mozilla.org/#server=haproxy&amp;server-version=2.0.3&amp;config=intermediate&gt;<br>        ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384<br>        ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256<br>        ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets</pre><pre>defaults<br>    mode http<br>    timeout client 10s<br>    timeout connect 5s<br>    timeout server 10s<br>    timeout http-request 10s</pre><pre>frontend my_frontend<br>    bind 127.0.0.1:80</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i2jXA1gOJgpdaSWw9NlsIg.png" /></figure><p>The file has two main sections:</p><ul><li>The <strong>global</strong> section. Contains configuration for HAProxy, such as <a href="https://phoenixnap.com/kb/what-is-an-ssl-certificate">SSL</a> locations, logging information, and the user and group that execute HAProxy functions. There is only one <strong>global</strong> in a configuration file, and the values should not be altered.</li><li>• The <strong>defaults</strong> section. Sets the default values for all nodes defined below it. Multiple <strong>defaults</strong> sections are possible, and they override previous default values.</li></ul><pre>sudo systemctl restart haproxy</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*cU1BzVV50Lld-yqiQI1XCQ.png" /></figure><p>This happened because there is absence of backend</p><p>Appending the backend configuration in the previous file</p><pre>defaults<br>    mode http<br>    timeout client 10s<br>    timeout connect 5s<br>    timeout server 10s<br>    timeout http-request 10s</pre><pre>frontend my_frontend<br>    bind 127.0.0.1:80<br>    default_backend my_backend</pre><pre>backend my_backend<br>    balance leastconn<br>    server server1 127.0.0.1:8001<br>    server server2 127.0.0.1:8002</pre><p>Each line has the following information:</p><ul><li><strong>default_backend</strong> in the <strong>frontend</strong> section establishes communication between the front and back.</li><li><strong>backend</strong> contains a descriptive name (<strong>my_backend</strong>) for the server pool, which we use to connect with the frontend.</li><li><strong>balance</strong> is the load balancing algorithm. If omitted, the algorithm defaults to round-robin.</li><li><strong>server</strong> defines a new server on each line with a unique name, IP address, and port.</li></ul><p><strong>1st Terminal</strong></p><pre>python3 -m http.server 8001 --bind 127.0.0.1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*rafgByIoLDUzpT3vAbDsVA.png" /></figure><p>2nd Terminal</p><pre>python3 -m http.server 8002 --bind 127.0.0.1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*MTADgnBn37Ak_h8pvM6xfg.png" /></figure><p>In the 3rd terminal</p><pre>curl 127.0.0.1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H00TBeXVdiMf6JEn1SMtgQ.png" /></figure><p>update on terminal 1:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*TXMEWSn3Cs_kGuX-38O47A.png" /></figure><p>update in terminal 2:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*nxL1EEpbrWbh4ogd8TgAjw.png" /></figure><p>Updating configuration rules:</p><pre>defaults<br>    mode http<br>    timeout client 10s<br>    timeout connect 5s<br>    timeout server 10s<br>    timeout http-request 10s</pre><pre>frontend my_frontend<br>    bind 127.0.0.1:81, 127.0.0.1:82, 127.0.0.1:83<br>    use_backend first if { dst_port = 81 }<br>    use_backend second if { dst_port = 82 }<br>    default_backend third<br>backend first<br>    server server1 127.0.0.1:8001<br>backend second<br>    server server2 127.0.0.1:8002<br>backend third<br>    server server3 127.0.0.1:8003</pre><p>The code does the following:</p><ul><li>Binds the address to three ports (<strong>81</strong>, <strong>82</strong>, and <strong>83</strong>).</li><li>Sets a rule to use the <strong>first</strong> backend if the destination port is <strong>81</strong>.</li><li>Adds another rule to use the <strong>second</strong> backend if the destination port is <strong>82</strong>.</li><li>Defines a default backend (<strong>third</strong>) for all other cases.</li></ul><p>Use multiple backends and rules to forward traffic to different websites or apps.</p><p>The provided configuration is an example of a basic setup for an HTTP load balancer using the HAProxy software. Here’s a breakdown of the configuration:</p><ol><li>Defaults section:</li></ol><ul><li>Sets the default mode to HTTP.</li><li>Specifies various timeout values for client, connect, server, and HTTP requests.</li></ul><ol><li>Frontend section (my_frontend):</li></ol><ul><li>Binds the frontend to three different IP addresses (127.0.0.1) and their corresponding ports (81, 82, 83).</li><li>Directs traffic to different backends based on the destination port:</li><li>If the destination port is 81, the traffic is directed to the “first” backend.</li><li>If the destination port is 82, the traffic is directed to the “second” backend.</li><li>For any other destination port, the traffic is directed to the “third” backend.</li></ul><ol><li>Backend sections:</li></ol><ul><li>“first” backend:</li><li>Specifies a single server named “server1” with the IP address 127.0.0.1 and port 8001.</li><li>“second” backend:</li><li>Specifies a single server named “server2” with the IP address 127.0.0.1 and port 8002.</li><li>“third” backend:</li><li>Specifies a single server named “server3” with the IP address 127.0.0.1 and port 8003.</li></ul><p>In summary, this configuration sets up an HAProxy load balancer that listens on three different ports (81, 82, 83) on the localhost (127.0.0.1). Requests coming to these ports are directed to different backends based on the destination port. Port 81 is routed to server1, port 82 is routed to server2, and any other port is routed to server3.</p><p>Monitoring</p><pre>global<br>    stats socket /run/haproxy/admin.sock mode 660 level admin<br>defaults<br>    mode http<br>    timeout client 10s<br>    timeout connect 5s<br>    timeout server 10s<br>    timeout http-request 10s<br>frontend my_frontend<br>    bind 127.0.0.1:80<br>    default_backend my_backend<br>backend my_backend<br>    balance leastconn<br>    server server1 127.0.0.1:8001<br>    server server2 127.0.0.1:8002<br>listen stats<br>    bind :8000<br>    stats enable<br>    stats uri /monitoring<br>    stats auth username:password</pre><p>This updated configuration includes additional sections for global settings and a separate section for enabling HAProxy statistics. Here’s a breakdown of the updated configuration:</p><ol><li>Global section:</li></ol><ul><li>Specifies the location and permissions for the HAProxy admin socket, which allows administrative control over HAProxy. In this example, the socket is located at “/run/haproxy/admin.sock” and has mode 660 (read and write permissions for the owner and group, no permissions for others).</li></ul><ol><li>Defaults section:</li></ol><ul><li>Sets the default mode to HTTP.</li><li>Specifies various timeout values for client, connect, server, and HTTP requests.</li></ul><ol><li>Frontend section (my_frontend):</li></ol><ul><li>Binds the frontend to the IP address 127.0.0.1 and port 80.</li><li>Routes all traffic to the backend named “my_backend” by default.</li></ul><ol><li>Backend section (my_backend):</li></ol><ul><li>Uses least connection load balancing algorithm (balance leastconn).</li><li>Specifies two servers:</li><li>“server1” with the IP address 127.0.0.1 and port 8001.</li><li>“server2” with the IP address 127.0.0.1 and port 8002.</li></ul><ol><li>Listen section (stats):</li></ol><ul><li>Binds the listen section to all available IP addresses and port 8000.</li><li>Enables statistics for monitoring HAProxy.</li><li>Sets the URI for accessing the statistics page to “/monitoring”.</li><li>Specifies authentication credentials for accessing the statistics page (username:password).</li></ul><p>In summary, this updated configuration adds global settings for the HAProxy admin socket and includes a separate section for enabling and configuring HAProxy statistics. The frontend and backend configurations remain similar to the previous example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3b-_Z5piv6GHLyGs1Xpy2g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cBYwdhlsynYVTjrKmOZPdQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70cbabd2b0b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NextCloud Part 2: Connect AWS S3 Bucket to your NextCloud System for free| Get Unlimited Cloud…]]></title>
            <link>https://medium.com/@lajah.aws/nextcloud-part-2-connect-aws-s3-bucket-to-your-nextcloud-system-for-free-get-unlimited-cloud-511b4b996696?source=rss-589c886671fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/511b4b996696</guid>
            <dc:creator><![CDATA[LAJAH SHRESTHA]]></dc:creator>
            <pubDate>Thu, 27 Jul 2023 16:03:56 GMT</pubDate>
            <atom:updated>2023-07-27T16:25:43.396Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>NextCloud Part 2: Connect AWS S3 Bucket to your NextCloud System for free| Get Unlimited Cloud Storage</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mNCl4Py48uBA1CTWshkgRQ.png" /></figure><p>Hello folks. I’ll guide you how to connect AWS S3 bucket to the next cloud in this blog</p><h3>Introduction:</h3><p>Welcome back to the second part of our Nextcloud journey! In the previous <a href="https://medium.com/@lajah.aws/nextcloud-part-1-unlimited-personal-cloud-storage-easy-way-to-setup-private-cloud-using-4988675190bb">blog</a> post, we learned how to set up our very own private cloud using Nextcloud, enabling us to have unlimited personal cloud storage and data control. Now, it’s time to take our Nextcloud installation to the next level by integrating Amazon Web Services (AWS) S3 storage, a scalable and secure object storage solution.</p><p>In this guide, I will walk you through the step-by-step process of connecting AWS S3 storage to your existing Nextcloud system. By doing so, you can expand your cloud storage capacity, ensure data redundancy, and leverage the powerful features offered by AWS for a more seamless and robust cloud experience.</p><p>Let’s dive right in!</p><p><strong>Prerequisites:</strong></p><ol><li>A functional NextCloud installation (as covered in Part 1 of this blog series).</li><li>An active AWS account with access to Amazon S3 services.</li><li>AWS IAM credentials with appropriate permissions to create and manage S3 buckets and objects.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xltuVhPrm5Qa1UZvIiSpNQ.png" /><figcaption>System architecture we’re trying achieve</figcaption></figure><h3>Step 1: Create an AWS S3 Bucket</h3><p>To get started, log in to your AWS Management Console and navigate to the S3 service. Create a new S3 bucket to store your NextCloud data. Remember to choose a region that is geographically close to your Nextcloud server for better performance. I have created an S3 bucket named cloud lajah-nextcloud-s3. To learn how to create a bucket you can refer to this <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html">documentation</a> provided by AWS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SyXGC2Wzxx9uvJ0YvUiDPA.png" /></figure><h3>Step 2: Configure IAM User for Nextcloud</h3><p>For security purposes, it’s essential to create a dedicated IAM user in AWS with the least privileges required for Nextcloud to access the S3 bucket. Generate Access Key ID and Secret Access Key for this IAM user, as we’ll need them later for configuring Nextcloud.</p><p>Navigate to IAM from the console and create a user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FjPqyO1JUFoUPdWY84foOg.png" /></figure><p>I have created the user named <strong>nextcloud-s3Access</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jPgIVBSFvSkj16aE1ArFig.png" /></figure><p>Now we have to attach permission/policies to this user so that this user can access the s3 bucket. Navigate to permissions tab and attach policies directly</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RLvbZXDKfkA8XbEz380rPw.png" /></figure><p>Select AmazonS3FullAccess and attach this to the user.</p><p>Now generate access keys for this user. Access keys are used by 3rd party tools to gain access to AWS services via that user. In our case we will access amazon S3 bucket we created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7QGpO6qp5zDeV9hyknooWw.png" /></figure><p>Under the security credentials tab of the user you ma find access key section where you can generate a new access. keep the note of the new keys. We will use it further in our next cloud.</p><h3>Step 3: Install and Configure Nextcloud S3 Integration App</h3><p>In your Nextcloud instance, head to the Apps section and search for the “External storage support” app. Install and enable it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/1*2bFd__Va5uCVSW4AWpwjNQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RNl1TPXalL0zX5EU0SXqiA.png" /></figure><h3>Step 4: Add S3 Storage as External Storage</h3><p>In the “External storages” settings, locate the external storage section and add the provide the required details to connect your AWS S3 bucket to Nextcloud. You’ll need to enter the Access Key ID, Secret Access Key, the bucket name, and the AWS region you chose earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M4Q1dAwWUZBwjMbBLLXJ8w.png" /></figure><p>Give appropriate folder name that you wish. I have used AmazonS3</p><h3>Step 5: Test the Connection</h3><p>After saving the settings, test the connection to ensure Nextcloud can access your S3 bucket successfully. If the test is successful, you can proceed with enabling the external storage for all users or specific user groups as per your preference.</p><p>As I refresh my files tab of next cloud a new folder named AmazonS3 appears on my home directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*idyD8HOce6HTMgz5DLqbFg.png" /></figure><p>I can easily access S3 storage via this folder.</p><h3>Step 6: Transfer Data to AWS S3</h3><p>To start utilizing AWS S3 storage effectively, consider moving some or all of your existing Nextcloud data to the newly connected S3 bucket. This step is particularly useful if you wish to free up space on your server and take advantage of the scalability offered by AWS.</p><p>For now let us check the storage by uploading some files to this s3 folder. I’ll upload some images here by clicking the upload file button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nR8Wc3otiNWs9A2QRAqNBw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8tZzd0C7kVnIycAKfGWKSA.png" /></figure><p>I uploaded pdf version of my previous <a href="https://medium.com/@lajah.aws/nextcloud-part-1-unlimited-personal-cloud-storage-easy-way-to-setup-private-cloud-using-4988675190bb">blog</a>. Now lets check the bucket storage on AWS and verify whether the files are synced or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5rIN-ku4aqMwuAgmgCT9eQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SyXGC2Wzxx9uvJ0YvUiDPA.png" /></figure><p>As you can see the pdf appears on AWS as well. the files are perfectly synced and can be synced via mobile app as well.</p><h3>Conclusion:</h3><p>Congratulations! You’ve successfully integrated AWS S3 storage with your Nextcloud instance, significantly enhancing your cloud storage capacity and data management capabilities. With this powerful combination, you can ensure data redundancy, improved performance, and a more robust private cloud experience.</p><p>In the next part of our blog series, we’ll explore advanced configurations and tips to optimize your Nextcloud-AWS setup further. Stay tuned for more exciting insights into maximizing your private cloud’s potential!</p><p>Remember to stay updated with the latest AWS and Nextcloud developments to leverage new features and enhancements for your cloud storage needs. Happy cloud computing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=511b4b996696" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NextCloud Part 1: Unlimited Personal Cloud Storage | Easy way to Setup Private Cloud using…]]></title>
            <link>https://medium.com/@lajah.aws/nextcloud-part-1-unlimited-personal-cloud-storage-easy-way-to-setup-private-cloud-using-4988675190bb?source=rss-589c886671fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/4988675190bb</guid>
            <dc:creator><![CDATA[LAJAH SHRESTHA]]></dc:creator>
            <pubDate>Fri, 21 Jul 2023 03:43:27 GMT</pubDate>
            <atom:updated>2023-07-27T16:30:30.856Z</atom:updated>
            <content:encoded><![CDATA[<h3>NextCloud Part 1: Unlimited Personal Cloud Storage | Easy way to Setup Private Cloud using NextCloud on AWS Infrastructure</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZoG0SFUQS_a-5pGAWKH21A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YvL3Gd39UNxUx3lzai9G8w.png" /></figure><p>Hello. In this guide I’ll walk you guys through how you can setup a next cloud server on an AWS server.</p><p><strong>IINTRODUCTION</strong></p><p>Before getting into the installation part let me explain a bit what is next cloud and what we are trying to achieve.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4llb6uT46FYDEB0ODinHZw.png" /></figure><p><strong>Nextcloud</strong> is an open-source, self-hosted cloud storage and collaboration platform that allows individuals and organizations to store, share, and access their files, documents, and data from anywhere using various devices. It offers a secure and private alternative to centralized cloud storage services like Dropbox, Google Drive, or Microsoft OneDrive. Some of the features provided by the next Cloud platform are: File syncronization, Calendar, Project mangement tools, Email, Document Editing and Collaboration, Communication/Conferencing, Third party Integration .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tZYQkjKn3QmeX5dv9mKNdw.png" /></figure><p>Now Let us get to the <strong>INSTALLATION</strong> part</p><p>For setting up the next cloud we will need a server that can host out system. TThe server shall host the NextCloud platform that requires a database aswell that stores the user authentication data.</p><p>The server may be onsite or in the cloud. For this tutorial we will use a virtual <a href="http://server.so/">server.So</a> let us create a EC2 Instance on AWS. Detail Steps to create an EC2 instance can be found here: <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html">Tutorial: Get started with Amazon EC2 Linux instances — Amazon Elastic Compute Cloud</a></p><p>I have created a EC2 instance with the following configuration:</p><p><strong>Instance name:</strong> nextCloud</p><p><strong>AMI :</strong> Ubuntu 22.04</p><p>Instance type: t3a.small</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*sV8huL7wLgs8mTFvfG3RpA.png" /></figure><p>Here I will be using a spot instance to minimize the cost. learn more about spot instances on: <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html">Spot Instances — Amazon Elastic Compute Cloud</a></p><h3>STEP 1: DATABASE INSTALLATION 🐘</h3><p>1.1 I<strong>nstall the web and database servers</strong></p><p>Database server can be installed from the terminal with the following commands:</p><p>First let us update the dependencies:</p><pre>sudo apt update</pre><p>and then installing the database server:</p><pre>sudo apt-get install apache2 mysql-server -y</pre><p>After installing the server the database server shall be initiated.</p><p>Enable the servers with the following commands:</p><pre>sudo systemctl start apache2<br>sudo systemctl enable apache2<br>sudo systemctl start mysql<br>sudo systemctl enable mysql</pre><p>remaining dependencies</p><pre>sudo apt-get install php zip libapache2-mod-php php-gd php-json php-mysql php-curl php-mbstring php-intl php-imagick php-xml php-zip php-mysql php-bcmath php-gmp zip -y</pre><p>1.2 S<strong>ecure the MySQL server and create the database.</strong></p><pre>sudo mysql_secure_installation</pre><p>Initially we have to create a user with admin priviledge that has full access to the database. To do so we shall get inside the database console which can be achived with the following command:</p><pre>sudo mysql</pre><p>now after getting inside the database console:</p><p>We create a user and assign the required access:</p><pre>mysql&gt; CREATE USER &#39;admin&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;admin123&#39;;<br>mysql&gt;GRANT ALL PRIVILEGES ON nextcloud.* TO &#39;admin&#39;@&#39;localhost&#39;;<br>mysql&gt;FLUSH PRIVILEGES;<br>mysql&gt;quit;</pre><h3>STEP 2: NEXTCLOUD INSTALLATION 🌀 ☁️</h3><p>In order to install the next cloud we the next cloud file need to be downloded into the system and then after unzipping the zipped file:</p><pre>wget &lt;https://download.nextcloud.com/server/releases/nextcloud-22.0.0.zip&gt;<br>unzip nextcloud-22.0.0.zip</pre><p>Move the newly created nextcloud directory to the Apache document root:</p><pre>sudo mv nextcloud /var/www/html/</pre><h3>2.2 Configure Apache for NextCloud</h3><p>For our instance to host our nextcloud platform it needs a web server application such as nginx, apache. We will use apache server for this tutorial. Apache server can enables the instance to accept the http requests. Make sure the http and https port are enabled in the EC2. Ports can be configured from the security group of the instance.</p><p>To install the apache:</p><pre>sudo apt update<br>sudo apt install apache2</pre><p>Create a file in /etc/apache2/sites-available/nextcloud.conf and paste the following content.</p><pre>&lt;VirtualHost *:80&gt;<br>ServerName lajah.test.mercantilecloud.com.np<br>DocumentRoot /var/www/html/nextcloud<br>&lt;Directory /var/www/html/nextcloud/&gt;<br> Require all granted<br> Options FollowSymlinks MultiViews<br> AllowOverride All<br> &lt;IfModule mod_dav.c&gt;<br> Dav off<br> &lt;/IfModule&gt;<br>&lt;/Directory&gt;<br>ErrorLog /var/log/apache2/yourdomain.com.error_log<br>CustomLog /var/log/apache2/yourdomain.com.access_log common<br>&lt;/VirtualHost&gt;</pre><p>Here in the ServerName section update with your instance public IP or your domain naim if configured.</p><pre>sudo systemctl start apache2</pre><p>ERROR:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lXbngrJQqZi7zr9Jj-66Iw.png" /></figure><p>we received an error because the new configuration have not been enabled. This can be solved by:</p><p>Enabling the new site with the command:</p><pre>sudo a2ensite nextcloud<br>systemctl reload apache2</pre><p><strong>2.3 Enable the Apache2 Module by using the below command</strong></p><pre>sudo a2enmod rewrite<br>systemctl restart apache2</pre><p><strong>Disable the Apache default welcome page by using the below command</strong></p><pre>sudo a2dissite 000-default.conf</pre><p><strong>Check the syntax of conf file by using the below command</strong></p><pre>apachectl -t</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*wXXIje-mvtq9R_Fy6Vl0Pw.png" /></figure><p>Now you can check wether the changes have been implemented or not by checking the content hosted by the instance. In a new browser tab enter the public IP address of the the instance. Here I have configured my Ip with a custom domain name provided by AWS Route 53. You can learn more on how to do this documentation provided by AWS : <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-ec2-instance.html">Routing traffic to an Amazon EC2 instance — Amazon Route 53</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mWv6rG21Zae6mFz8u69bMQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*Hqf0mFMcP3G6IAK8JxiAKQ.png" /></figure><p>Now here I enter the admin credentials we created on database configuration part.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Aw_8GIjNau52XlU39TV3aQ.png" /></figure><p>We can finally access the next cloud platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xbVzstBZZhsCVThAfEfpjw.png" /></figure><p>This is the file management platform interface provided by the next cloud which can be used like any other platforms lie google drive, Dropbox etc. It can also be access via mobile app.</p><p>In the next part I will walk you guys through how to connect AWS services like AWS S3 to achieve unlimited cloud storage</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4988675190bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>