Table of Contents

Installing Gitea

Gitea can be deployed as a Docker Compose stack or as a Helm release on K3s. Both approaches are documented below.

What this page covers

  • Docker Compose installation (Docker-only track)
  • Helm installation on K3s (K3s track)
  • Database choice: SQLite (development) vs. PostgreSQL (production)
  • Persistent data volumes
  • Reverse proxy integration

Docker-only track: Docker Compose

A minimal docker-compose.yml for Gitea with a PostgreSQL database will be documented here, including:

  • Named volumes for Gitea data and PostgreSQL data
  • Environment variables for initial admin configuration
  • Traefik labels for HTTPS routing
# docker-compose.yml (excerpt — full config to be documented)
services:
  gitea:
    image: gitea/gitea:latest
    environment:
      - GITEA__database__DB_TYPE=postgres
      - GITEA__database__HOST=db:5432
    volumes:
      - gitea-data:/data
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.gitea.rule=Host(`gitea.example.com`)"

K3s track: Helm

Gitea has an official Helm chart. Installation with persistent storage via Longhorn will be documented here.

helm repo add gitea-charts https://dl.gitea.com/charts/
helm repo update
helm install gitea gitea-charts/gitea --namespace gitea --create-namespace -f values.yaml