A GitHub outage doesn’t stop you from committing in a local clone. It can stop you from opening pull requests, using GitHub-hosted issues, or pushing to that remote. NetworkChuck’s answer is to move those day-to-day workflows to Gitea, an open-source Git hosting service he runs on his own VPS, and use GitHub as an optional public mirror. Git’s documentation explains why the local repository still works without a host.
The distinction that matters: Gitea can be your primary host, GitHub can be a second copy of published Git history, and a separate backup lets you recover the Gitea service. A mirror doesn’t cover all three jobs.
Watch NetworkChuck’s Gitea Walkthrough
Video by NetworkChuck, November 26, 2026. Watch on YouTube, follow the written walkthrough, or jump to the chapters.
Hostinger sponsored the video. NetworkChuck’s Hostinger offer lists code NETWORKCHUCK; check pricing, renewals and code eligibility at checkout. You can also run Gitea on a home lab or another provider.
Install Gitea and Decide Who Can Reach It
The demo uses Ubuntu, Docker Compose and PostgreSQL. Chuck starts with Gitea’s Compose example, adds the override in his guide and obtains a Let’s Encrypt certificate. Retain persistent storage for the database and Gitea data, keep credentials out of Git, and use the final HTTPS address for ROOT_URL. Certificate setup depends on how you expose the service; follow Gitea’s HTTPS guidance for direct TLS or a reverse proxy.
For the private instance shown, Chuck disables self-registration and requires sign-in to view pages. Gitea documents those settings as DISABLE_REGISTRATION and REQUIRE_SIGNIN_VIEW. They limit who can register and view content; they don’t make a public server private at the network level. For an internal forge, consider keeping it on a private network. Gitea configuration reference.
Need the Docker basics first? See Docker’s Ubuntu install guide and NetworkChuck’s videos on Docker and Docker Compose.
Move One Test Repo Before Moving the Team
Create an empty Gitea repository and add your public SSH key. Verify the server fingerprint through a trusted channel and use the clone URL Gitea shows. The demo uses port 222 for Git over SSH, separate from the VPS admin SSH port. If your original origin is GitHub and no remote is already named github, this preserves that URL under a new name while making Gitea the upstream for main:
git remote -v
git remote rename origin github
git remote add origin ssh://git@git.example.com:222/OWNER/git-good.git
git push -u origin main
git branch -vv
Replace the example URL and branch with yours. The example pushes just main; check which other branches, tags, and large files need to move. Existing branches may still track the renamed GitHub remote. Clone from Gitea in a separate folder to verify the result. The companion guide has the full setup and Windows notes.
Give the Agent an Account, Not Your Admin Token
At 13:31, Chuck connects Claude Code through Gitea’s MCP server. The agent starts by reading issues. It can’t open the PR until its account is added as a collaborator. That’s the useful lesson: grant access to one test repository, start read-only, and add only the permissions needed to create a branch and propose a PR. Keep the token out of prompts and shared config.
The tutorial uses broad access for the demo. For real work, use separate, revocable credentials for the bot and the GitHub mirror. Protect main against direct and force pushes, restrict merges to human maintainers, and review the diff and test evidence yourself. Gitea’s branch protection rules enforce this on the server; a prompt saying “don’t merge” doesn’t.
Test the Gitea connection without making changes
The Same Git Workflow With a Local Model
Chuck repeats the issue-to-PR exercise using Gemma 4 31B. Ollama’s Claude Code integration lets the harness use a local model instead of a hosted one. The command shown is:
ollama launch claude --model gemma4:31b
Local inference doesn’t make the entire workflow offline. The agent still calls Gitea on the VPS, and tools you enable can still contact other services. The demo was a small Markdown change, not a test of how well the model handles complex code. Try a small repo and check memory, speed and tool reliability on your own machine.
A Push Mirror Is for Distribution, Not Recovery
At 18:46, Gitea becomes the source of truth and pushes Git history to GitHub. Set a dedicated destination, verify that it’s private unless you intend to publish, and check what branches and tags will be sent. Don’t mirror a mixed private-and-public repo to a public destination. Use an expiring, least-privilege credential; GitHub recommends fine-grained tokens where supported. Verify access on your test mirror before relying on it.
Don’t write to both remotes as if they were peers. The Gitea push-mirror docs warn that synchronization can force-push over changes at the destination. Treat the GitHub side as read-only for code, verify a harmless test commit arrives, and monitor sync failures. Git mirroring is for branches, tags and commits; it doesn’t move Gitea issue threads, reviews, repository settings or secrets. Git LFS objects need their own verification; a visible pointer file doesn’t prove you can recover the object.
Harden the Host and Prove You Can Restore It
- SSH and 2FA solve different problems. Before disabling password login, prove key login works from a second session and that your provider’s recovery console is available. Prefer a named admin account with
sudo. Enable Gitea 2FA and store recovery codes separately. Browser 2FA is not a replacement for protecting API tokens. - Check the actual exposure. Docker warns that published ports can bypass UFW rules. Don’t publish the database or the app’s internal HTTP port to the internet. Expose only what is required, use a provider firewall or Docker-aware rules as appropriate, and verify from another network. Don’t rely on
ufw statusalone. - Back up more than code. Use Gitea’s backup and restore procedure for your install type. Keep a consistent copy of the database, repositories, configuration and app data such as attachments outside the VPS. Restore to an isolated instance and verify a clone, an issue, a PR and any LFS objects you rely on. Keep outbound mirrors and jobs disabled during the restore test.
Self-hosting makes sense if you want control of the forge and can own patching, monitoring and recovery. If you only want to keep coding during a GitHub outage, a maintained local clone and independent backups are a simpler starting point. Try both the migration and the restore with a disposable repo before making Gitea anyone’s only home.