<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hosea Varghese</title>
    <description>The latest articles on DEV Community by Hosea Varghese (@hvkz______).</description>
    <link>https://dev.to/hvkz______</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F230956%2Fdda20e25-842f-4b29-879e-0a0db9601885.jpg</url>
      <title>DEV Community: Hosea Varghese</title>
      <link>https://dev.to/hvkz______</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hvkz______"/>
    <language>en</language>
    <item>
      <title>DIY Cloud Wizard 🪄</title>
      <dc:creator>Hosea Varghese</dc:creator>
      <pubDate>Sat, 16 Aug 2025 08:42:36 +0000</pubDate>
      <link>https://dev.to/hvkz______/diy-cloud-wizard-34nb</link>
      <guid>https://dev.to/hvkz______/diy-cloud-wizard-34nb</guid>
      <description>&lt;p&gt;Ever wanted to host your apps running on &lt;strong&gt;localhost&lt;/strong&gt; straight to the internet?&lt;br&gt;&lt;br&gt;
Be careful—now you won’t be able to say &lt;em&gt;“it works on my local”&lt;/em&gt;.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Because sometimes &lt;code&gt;localhost:3000&lt;/code&gt; just isn’t spicy enough.&lt;/em&gt; 🌶️&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  🧙‍♂️ What You’ll Need to Channel Your Inner Tech Sorcerer
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A domain&lt;/strong&gt; – Your digital real estate. Your little castle in the vast internet kingdom.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A personal computer&lt;/strong&gt; – Your trusty steed. Doesn’t need to be a supercomputer, just something that won’t faint when you open 47 Chrome tabs.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  1️⃣ Register Your Domain with Cloudflare
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;(AKA Claim Your Internet Throne)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;First things first—register your domain with Cloudflare.  &lt;/p&gt;

&lt;p&gt;You can use &lt;a href="https://developers.cloudflare.com/registrar/get-started/" rel="noopener noreferrer"&gt;Cloudflare’s documentation&lt;/a&gt; and follow the instructions.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can either buy a domain directly from Cloudflare
&lt;/li&gt;
&lt;li&gt;Or transfer an existing one (I got mine from &lt;a href="https://www.hostinger.com/" rel="noopener noreferrer"&gt;Hostinger&lt;/a&gt;)
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you hook it up, it’ll show up in your Cloudflare dashboard.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Congrats 🎉 Step 1 complete!&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fit3pu5iga79c6am4jn8n.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fit3pu5iga79c6am4jn8n.webp" alt="success" width="800" height="849"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  2️⃣ Install Cloudflare Tunnel
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;(Your Secret Underground Passage)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now it’s time to install &lt;strong&gt;Cloudflare Tunnel&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
This acts as a &lt;strong&gt;hidden passageway&lt;/strong&gt; between your computer and the internet.&lt;/p&gt;

&lt;p&gt;Check &lt;a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/" rel="noopener noreferrer"&gt;Cloudflare’s docs&lt;/a&gt; for setup.&lt;br&gt;&lt;br&gt;
When you run &lt;code&gt;cloudflared&lt;/code&gt; for the first time, it:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creates a config file
&lt;/li&gt;
&lt;li&gt;Generates credentials
&lt;/li&gt;
&lt;li&gt;Adds a certificate (authorizing your system to handle the tunnel)
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You’ll use this config file to define &lt;strong&gt;ingress rules&lt;/strong&gt; (where traffic should go). It will look something like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;ingress&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;hostname&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;my-awesome-project.myDomain&lt;/span&gt;
    &lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://localhost:1000&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http_status:404&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3️⃣ Tweak Your DNS Records
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;(The Secret Handshake of the Internet)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is where you say:  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“When someone visits &lt;code&gt;mycoolapp.mydomain.com&lt;/code&gt;, send them to port 3000 on my computer.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;How? By tweaking your DNS records in Cloudflare.  &lt;/p&gt;

&lt;p&gt;Steps:  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your Cloudflare dashboard → Select your domain → Go to &lt;strong&gt;DNS Records&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;Add a &lt;strong&gt;CNAME record&lt;/strong&gt; for your subdomain.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Name&lt;/strong&gt; → your subdomain (e.g. &lt;code&gt;app&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Target&lt;/strong&gt; → &lt;code&gt;&amp;lt;YOUR_TUNNEL_ID&amp;gt;.cfargotunnel.com&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;You’ll find the tunnel ID in the credentials file Cloudflare generated.
&lt;/li&gt;
&lt;li&gt;Set &lt;strong&gt;Proxy Status&lt;/strong&gt; to &lt;em&gt;Proxied&lt;/em&gt;.
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That’s it—now the world knows where to find your localhost.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frv9prpk6mnud5fxq2dqf.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frv9prpk6mnud5fxq2dqf.webp" alt="dns" width="640" height="480"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  4️⃣ Fire Up the Tunnel and Watch the Magic Happen
&lt;/h2&gt;

&lt;p&gt;Run &lt;code&gt;cloudflared&lt;/code&gt; on your system and boom—your tunnel is &lt;strong&gt;alive&lt;/strong&gt; ⚡.  &lt;/p&gt;

&lt;p&gt;Start your project locally (Node.js app, Flask server, portfolio site… whatever).&lt;br&gt;&lt;br&gt;
Cloudflare Tunnel takes care of the rest.  &lt;/p&gt;

&lt;p&gt;Visitors → Your subdomain → Cloudflare Tunnel → Your local server.&lt;br&gt;&lt;br&gt;
It follows the ingress rules you defined and routes traffic correctly.  &lt;/p&gt;




&lt;h2&gt;
  
  
  5️⃣ Go Full Automation Freak 🛠️
&lt;/h2&gt;

&lt;p&gt;If you’re like me, you’ll want to &lt;strong&gt;automate everything&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;Check out &lt;a href="https://github.com/hvkalayil/migaku" rel="noopener noreferrer"&gt;Migaku&lt;/a&gt;—a simple script I use to:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clone all my projects
&lt;/li&gt;
&lt;li&gt;Set them up
&lt;/li&gt;
&lt;li&gt;Run them in one go
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How it works:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uses &lt;strong&gt;Docker Compose&lt;/strong&gt; to spin up each project in its own container.
👉 This means each project needs a &lt;strong&gt;Dockerfile&lt;/strong&gt; that tells Docker how to build it. If you don’t know how to write one yet, it’s worth learning—Docker is a super valuable skill to have anyway.&lt;/li&gt;
&lt;li&gt;Assigns each container a specific port
&lt;/li&gt;
&lt;li&gt;Matches those ports to Cloudflare Tunnel ingress rules
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2uztnzfazvhw9m5gdozx.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2uztnzfazvhw9m5gdozx.webp" alt="automate" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  💠 Side Quest: The Rune-Keeper (Environment Variables)
&lt;/h2&gt;

&lt;p&gt;I keep a separate repo for &lt;strong&gt;environment variables&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All &lt;code&gt;.env&lt;/code&gt; files are stored as &lt;strong&gt;encrypted &lt;code&gt;.enc&lt;/code&gt; files&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Migaku decrypts them with a secret key when needed
&lt;/li&gt;
&lt;li&gt;Docker Compose consumes them seamlessly
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yes, I’m literally storing my env files on GitHub.&lt;br&gt;&lt;br&gt;
But don’t worry—it’s secure: &lt;strong&gt;AES-256 encryption&lt;/strong&gt; with one password stored only in my brain 🧠.&lt;br&gt;&lt;br&gt;
Without the password, the &lt;code&gt;.enc&lt;/code&gt; files are useless.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7m19or3741ufdfu9pbfv.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7m19or3741ufdfu9pbfv.webp" alt="offline" width="640" height="480"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🎉 And Voilà! You’re a Self-Hosting Superstar
&lt;/h2&gt;

&lt;p&gt;With &lt;strong&gt;Cloudflare Tunnel&lt;/strong&gt;, your projects are:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Live 🌍
&lt;/li&gt;
&lt;li&gt;Secure 🔒
&lt;/li&gt;
&lt;li&gt;Accessible 🚀
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All from your &lt;strong&gt;own computer&lt;/strong&gt;—no cloud bills, no corporate overlords.  &lt;/p&gt;

&lt;p&gt;So go forth, show off your work, and let the internet bask in your brilliance.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffcvx8a3ke51cmmb2wcsj.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffcvx8a3ke51cmmb2wcsj.gif" alt="leo" width="480" height="204"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally posted on &lt;a href="https://learnio.hvk.life/" rel="noopener noreferrer"&gt;Learn.io&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
