{"componentChunkName":"component---src-templates-blog-post-jsx","path":"/blog/hosting-my-own-git-server-at-home-just-because-i-could/","result":{"data":{"site":{"siteMetadata":{"name":"Huzaifa Rasheed","title":"Huzaifa Rasheed","description":"Software Engineer","about":"\n      Hey, I'm Huzaifa.\n      <br/><br/>\n      Engineer by trade, builder by instinct - I believe in owning my stack, shipping fast, and occasionally running on chai (tea) and stubbornness. I work best in that sweet spot between deep focus and fast feedback - solo or in sync with a good team.\n      <br/><br/>\n      This site's my little corner of the internet - part portfolio, part lab - where I document what I build, break, or learn.\n      <br/><br/>\n      Outside work, I'm into long walks, pixel-perfect headshots in FPS games (eventually... maybe), plants I probably overwater, and the occasional \"classified\" hobby to stay curious.\n      <br/><br/>\n      Reach out anytime - my digital door's always open. 👋\n    ","twitter":"https://twitter.com/huzRasheed","github":"https://github.com/huzaifa-99","linkedin":"https://www.linkedin.com/in/huzaifa-rasheed/","devto":"https://dev.to/huzaifa99","stackoverflow":"https://stackoverflow.com/users/12579290/huzaifa","leetcode":"https://leetcode.com/rhuzaifa","discord":"https://discordapp.com/users/rhuzaifa","email":"dev@rhuzaifa.com","projects":[{"name":"FFMpeg Web","description":"An experimental browser-based terminal that runs FFmpeg using WebAssembly, enabling media processing directly in the browser.","link":"https://ffmpeg-web.rhuzaifa.com/","github":"https://github.com/huzaifa-99/ffmpeg-web"},{"name":"Feed base 2","description":"A mini browser game where players manipulate 4-bit binary blocks to match target BCD values - part puzzle, part binary logic trainer.","link":"https://feedbase2.rhuzaifa.com/","github":"https://github.com/huzaifa-99/feed-base-2"},{"name":"Fabric browser extension","description":"A Chrome extension that injects engineered Fabric prompts directly into the ChatGPT interface for enhanced workflow automation.","link":"https://github.com/huzaifa-99/fabric-browser-extension","github":"https://github.com/huzaifa-99/fabric-browser-extension"},{"name":"Pure Cinema","description":"An experimental, tongue-in-cheek text-to-video generator that stitches together footage, synthesized voiceovers, and background music with a Node.js + ffmpeg pipeline. Not quite Hollywood, but it renders.","link":"https://cinema.rhuzaifa.com","github":null},{"name":"Aria2c Packload","description":"A Bash script for bulk downloading magnet links or torrents using aria2c - optimized for series or list-based transfers.","link":"https://github.com/huzaifa-99/aria2c-packload","github":"https://github.com/huzaifa-99/aria2c-packload"},{"name":"RSS Watchdog","description":"A lightweight Bash script that watches RSS/Atom feeds and compiles a Markdown-based reading checklist for Unix systems.","link":"https://github.com/huzaifa-99/rss-watchdog","github":"https://github.com/huzaifa-99/rss-watchdog"},{"name":"QuoteGen","description":"A quote graphic generator that produces stylized quote images with random selection and a built-in editor for customization.","link":"https://quotegen.rhuzaifa.com/","github":null},{"name":"WebRTC Video Chat","description":"A basic WebRTC-powered app enabling peer-to-peer video and audio calls between two users.","link":"https://webrtc-video-chat.rhuzaifa.com/","github":null}],"experience":null,"skills":[{"name":"Languages & Frameworks","description":"JavaScript, TypeScript, Python, Bash - Frameworks include Node.js, React, Next.js, Vue, React Native, FastAPI."},{"name":"Databases & Storage","description":"PostgreSQL, MySQL, MongoDB - Experience with schema design, indexing, query optimization, and migrations."},{"name":"Cloud & Infrastructure","description":"AWS (EC2, RDS, S3, Lambda), Vercel, Netlify, Heroku - Comfortable with serverless, autoscaling, and cost optimization."},{"name":"DevOps & Tooling","description":"Docker, Git, CI/CD pipelines (GitHub Actions, GitLab CI) - Experience with observability, containerization, and release workflows."},{"name":"Testing & QA Automation","description":"Jest, Playwright, Puppeteer, Selenium - Focus on E2E testing, mocking APIs, and maintaining test coverage."}]}},"markdownRemark":{"id":"120686c5-54bc-597b-ae0c-d8c7fce533ec","excerpt":"There’s a quiet satisfaction in knowing every moving part of your stack - from the code you write, to the machine it runs on, to the pipe it travels through to…","html":"<p>There’s a quiet satisfaction in knowing every moving part of your stack - from the code you write, to the machine it runs on, to the pipe it travels through to get there.</p>\n<p>A while ago, I started self-hosting various services on a modest homelab. Nothing dramatic - just a few useful tools, dashboards, and internal systems to automate life a little. The stack grew organically: one container here, a reverse proxy there, DNS tweaks, a tunnel or two… Before long, I realized something simple but annoying: I needed a sane, reliable way to <strong>push changes from my laptop to these self-hosted services, from anywhere.</strong></p>\n<h3>Naturally, the answer was Git. But not GitHub. Not GitLab. Not even Gitea.</h3>\n<p>I mean <strong>actual Git</strong>. As in:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token comment\"># On the homelab</span>\n<span class=\"token function\">mkdir</span> -p ~/git/repos/my-service.git\n<span class=\"token builtin class-name\">cd</span> ~/git/repos/my-service.git\n<span class=\"token function\">git</span> init --bare\n\n<span class=\"token comment\"># On the laptop</span>\n<span class=\"token function\">git</span> remote <span class=\"token function\">add</span> origin ssh://my-homelab-domain/git/repos/my-service.git\n<span class=\"token function\">git</span> push origin main</code></pre></div>\n<p>And that was it. A <strong>zero-cost</strong>, no-frills Git server - hosted on a machine I already owned, exposed via a dynamic DNS setup under a domain I already had. </p>\n<p>From then on, pushing code to my services wasn’t just possible - it was delightful.</p>\n<p>Could I have spun up Gitea? Sure. But I’d be knee-deep in YAML instead of pushing real code.</p>\n<h3>🧱 The Setup (In Spirit, Not in Steps)</h3>\n<p>I wasn’t using any GUI. Just pure Git over SSH.</p>\n<p>There are enough tutorials online about how to host Git servers. That’s not the point here.</p>\n<p>What made this setup interesting wasn’t complexity - it was control.</p>\n<ul>\n<li><strong>SSH key-based access</strong> to a hardened port, with users and keys managed manually.</li>\n<li><strong>No GUI</strong>, no web interface. Just Git over SSH - lean and fast.</li>\n<li>My domain’s DDNS handled via Cloudflare’s API and a cron job.</li>\n<li>All changes push directly to my homelab’s repos - instantly triggering post-receive hooks to deploy, rebuild, or restart services, like this:</li>\n</ul>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token shebang important\">#!/bin/bash</span>\n<span class=\"token builtin class-name\">echo</span> <span class=\"token string\">\"Code pushed - deploying...\"</span>\n<span class=\"token builtin class-name\">cd</span> /opt/my-service\n<span class=\"token function\">git</span> pull origin main\n./deploy.sh\nsystemctl restart my-service</code></pre></div>\n<p>This tiny script replaces an entire SaaS pipeline - quietly, reliably, and instantly. No dashboards. Just power.</p>\n<p>And with that - No middlemen. No limits. No monthly fees. Just pure, protocol-level Git, exactly as intended.</p>\n<h3>💻 Why Bother?</h3>\n<p>Because every push felt like magic - not to the cloud, but to my own sky.</p>\n<p>I wasn’t trying to optimize cost (even though this cost $0) or to outperform GitHub.</p>\n<p>I was chasing <strong>agency</strong>.</p>\n<p>When you build your own Git server from the ground up, you start seeing Git as more than a version control tool - it becomes a <strong>transport protocol</strong>, a <strong>filesystem</strong>, and a <strong>trigger for automation</strong>.</p>\n<ul>\n<li>You start seeing the elegance of <code class=\"language-text\">.git/hooks/</code>.</li>\n<li>You realize how easily Git can power your own PaaS-style deployment.</li>\n<li>You stop needing hosted CI/CD tools just to move code from A to B.</li>\n</ul>\n<h3>🌀 The Hidden Joy</h3>\n<p>Every time I <code class=\"language-text\">git push</code> and watch my homelab deploy changes seconds later, I smile.</p>\n<p>It’s not because I built something massive. It’s because I built something <strong>mine</strong> - no logins, no dashboards, no SaaS dashboards blinking red. Just a small system doing its job in the background, quietly, flawlessly.</p>\n<h3>🔮 Bonus Magic</h3>\n<p>I can be on a random Wi-Fi network, make a change, run:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">git</span> push origin main</code></pre></div>\n<p>…and 3 seconds later, my self-hosted service updates on my homelab with logs streaming in.</p>\n<p>And the best part? No accounts. No web UI. No subscriptions.</p>\n<p>Just: <strong><em>You → Git → Homelab → Done</em></strong>.</p>\n<h3>🌐 You Don’t <em>Need</em> This - But You Might Want It</h3>\n<p>This isn’t a tutorial. There’s no repo link at the bottom.</p>\n<p>But if you’ve ever wondered how far you can stretch a home server, how Git really ticks under the hood, or how much you can do with nothing but a VPS, a domain, and some stubborn curiosity…</p>\n<p>Well - this is your sign.</p>\n<p>The next time you <code class=\"language-text\">git push</code>, ask: Who owns the pipe? Who controls the trigger? If the answer isn’t you - why not?</p>","frontmatter":{"title":"🛰️ Hosting My Own Git Server at Home - Just Because I Could","date":"June 05, 2025","description":"No SaaS. No middlemen. Just `git push` and a homelab that listens."}}},"pageContext":{"slug":"/blog/hosting-my-own-git-server-at-home-just-because-i-could/","previous":{"fields":{"slug":"/blog/tracking-email-for-educational-purposes/"},"frontmatter":{"title":"Tracking emails \"for educational purposes\""}},"next":{"fields":{"slug":"/blog/balancing-fast-builds-with-long-term-maintainability/"},"frontmatter":{"title":"Balancing Fast Builds with Long-Term Maintainability"}}}},"staticQueryHashes":["2276319502"]}