Homelab / development

Forgejo Git Backend

How a self-hosted Git service became the lab's local history layer for Docker Compose, Ansible, documentation, projects, and AI-agent work.

Forgejo started as a way to learn how self-hosted Git works and to support Git-backed Docker workflows. It has grown into the local version-control backbone for the lab: Compose stacks, Ansible playbooks, homelab documentation, small development projects, and AI-agent work all benefit from having visible history.

What It Supports

  • Portainer pulls Compose stacks from Git-backed configuration.
  • Automation experiments can use versioned playbooks instead of loose files.
  • Homelab notes and documentation can be changed, reviewed, and rolled back.
  • AI agents get a safer workspace because their edits are visible in Git history.
  • Small app, website, and game experiments have a local place to live before anything needs to be public.

Why Self-Host Git

The point is not replacing hosted Git for every use case. The point is having a local, controlled backend for private experiments and infrastructure configuration.

That matters most for agent-assisted work. When an agent changes files, Git gives the work a paper trail: what changed, when it changed, and how to roll it back if the result is wrong.

Current Maturity

The workflow is still growing. The current pattern is mostly straightforward push/pull work, Git-backed Compose stacks, and configuration history. Deeper workflows such as branches, pull requests, forks, and worktrees are still learning areas.

Lessons

Version control is not just for software projects. In a homelab, it becomes the history layer for infrastructure, documentation, automations, and agent-driven changes.