Skip to content

Gitea

Helm chart for deploying Gitea self-hosted Git service on Kubernetes using the official gitea/gitea rootless Docker image.

Key Features

  • Official rootless image based on gitea/gitea:<version>-rootless (UID 1000)
  • Database backends SQLite3 (default), PostgreSQL, or MySQL with auto-detection
  • PostgreSQL and MySQL subcharts optional bundled database deployments
  • HTTP + SSH services separate services for web UI and Git SSH access
  • Admin user creation optional post-install Job to bootstrap an admin account
  • S3-compatible backup database-aware CronJob (SQLite tar, pg_dump, mysqldump)
  • Ingress support configurable ingress with TLS for HTTP access

Installation

HTTPS Repository

helm repo add helmforge https://repo.helmforge.dev
helm repo update
helm install gitea helmforge/gitea

OCI Registry

helm install gitea oci://ghcr.io/helmforgedev/helm/gitea

Basic Example

gitea:
  rootUrl: https://git.example.com/
  sshDomain: git.example.com
  disableRegistration: true

admin:
  username: gitea_admin
  password: 'change-me-now'
  email: [email protected]

postgresql:
  enabled: true
  auth:
    database: gitea
    username: gitea
    password: 'db-password'

ingress:
  enabled: true
  ingressClassName: traefik
  hosts:
    - host: git.example.com
      paths:
        - path: /
          pathType: Prefix
  tls:
    - secretName: gitea-tls
      hosts:
        - git.example.com

backup:
  enabled: true
  schedule: '0 3 * * *'
  s3:
    endpoint: https://s3.amazonaws.com
    bucket: my-backups
    prefix: gitea
    existingSecret: gitea-s3-credentials

Key Values

KeyDefaultDescription
gitea.appName"Gitea: Git with a cup of tea"Application display name
gitea.runModeprodRun mode (dev, prod, test)
gitea.rootUrl""Root URL for links and clone URLs
gitea.sshDomain""SSH domain in clone URLs
gitea.sshPort2222SSH listen port
gitea.lfsEnabledtrueEnable Git LFS
gitea.disableRegistrationfalseDisable self-registration
admin.username""Admin username (triggers admin creation Job)
admin.existingSecret""Existing secret with admin credentials
database.modeautoDatabase mode: auto, sqlite, external, postgresql, mysql
postgresql.enabledfalseDeploy PostgreSQL subchart
mysql.enabledfalseDeploy MySQL subchart
persistence.enabledtrueEnable persistent storage for /var/lib/gitea
persistence.size10GiVolume size
service.http.typeClusterIPHTTP service type
service.http.port3000HTTP service port
service.ssh.enabledtrueEnable SSH service
service.ssh.typeClusterIPSSH service type
service.ssh.port2222SSH service port
service.ssh.nodePort""SSH NodePort (when type is NodePort)
ingress.enabledfalseEnable ingress
ingress.ingressClassName""Ingress class (traefik, nginx, etc.)
backup.enabledfalseEnable S3 backup CronJob
backup.schedule"0 3 * * *"Backup cron schedule
backup.s3.endpoint""S3-compatible endpoint URL
backup.s3.bucket""S3 bucket name
backup.s3.existingSecret""Existing secret with S3 credentials

Database Auto-Detection

When database.mode is auto (default), the chart detects which database to use:

  1. If database.external.host is set → external database
  2. If postgresql.enabled is truePostgreSQL subchart
  3. If mysql.enabled is trueMySQL subchart
  4. Otherwise → SQLite3 (zero configuration)

More Information