SKIP TO CONTENT
FL1GHT5 Network

Jan 05, 2026 · Linux & Servers / Intermediate · ~2 MIN READ

Run a Personal Git Server with Gitea

Host repositories for scripts, Compose files, Ansible playbooks, and homelab documentation on your own server.

Who This Is For

Intermediate.

Think of it like a shared recipe box that keeps every past version of every card. If someone “improves” a recipe and ruins it, you can just flip back to the version before the change.

What You’ll Build

A private repository containing at least one Docker Compose stack or Ansible project.

Prerequisites

  • Docker host
  • An SSH key pair

Good Repository Ideas

  • Infrastructure-as-code
  • Docker Compose stacks
  • Ansible roles
  • Website files
  • Network documentation exports
  • Utility scripts

Deploy with Docker Compose

$ services:
$   gitea:
$     image: gitea/gitea:latest
$     ports:
$       - "3000:3000"
$       - "222:22"
$     volumes:
$       - ./data:/data

Choose a Database

SQLite is fine for personal use; Postgres/MySQL if you expect heavier concurrent use.

SSH vs HTTPS Git Access

SSH is generally preferred for regular use once keys are set up; HTTPS is simpler for occasional/first-time clones.

Create Your First Private Repository

Push an existing project, your Compose stacks folder is a great first candidate.

Organization and Team Permissions

Even solo, organizations are useful for grouping related repos (e.g. “homelab”, “website”).

Gitea Actions (CI/CD)

Optional, and powerful, but runners execute arbitrary pipeline code with real host access. Treat a CI runner as a privileged system, never run untrusted code against it.

Security & Backup Notes

  • Never run untrusted code through a Gitea Actions runner with unrestricted host access, treat CI runners as privileged infrastructure

Troubleshooting

  • SSH git clone fails, confirm the SSH port mapping (often 222 → 22) and that your key is added to your Gitea account
  • Reverse proxy callback URLs wrong, set Gitea’s ROOT_URL to match exactly how users will reach it
  • Incorrect root URL, mismatched ROOT_URL breaks clone URLs and webhooks
  • Actions runner permissions, scope runner capabilities tightly; don’t give it broad host access by default

Lab Finish Line

A private repository containing one Docker Compose stack or Ansible project.

What to Build Next

NEXT STEP

Want this running in your business?

Everything in the Lab is a service we deliver. If this guide describes your problem, skip the DIY weekend — send the brief.

FIVE MINUTES TO WRITE · A WRITTEN PLAN BACK · NO SALES CALL UNLESS YOU WANT ONE