Skip to content
Mementropy
RecipesHomelab recipesReference

Installing Gitea on K3s as a single node

Gitea with its own Postgres, SSH on 2222, and the Recreate strategy.

By Ryan Hammang

A small single-node Gitea on K3s without the chart’s HA defaults.

  • K3s with Traefik and the local-path provisioner
  • The gitea Helm chart (12.7.0 tested)
  1. Values that matter:
strategy:
type: Recreate
postgresql-ha:
enabled: false
valkey-cluster:
enabled: false
postgresql:
enabled: true
service:
ssh:
type: LoadBalancer
port: 2222
gitea:
config:
server:
SSH_PORT: 2222
SSH_LISTEN_PORT: 2222
cache:
ADAPTER: memory
queue:
TYPE: level
  1. Install:
Terminal window
helm upgrade --install gitea gitea-charts/gitea -n gitea --create-namespace -f values.yaml
  1. Register your SSH keys and switch remotes to port 2222 (see the SSH keys recipe).
  • Gitea and its Postgres pods Running. About 160 MiB total in this lab.
  • git push over ssh://git@<host>:2222/... works.
  • The chart defaults to a 3-node Postgres HA and a 3-node Valkey cluster.
  • With the on-disk LevelDB queue, RollingUpdate crash-loops: unable to lock level db. Use Recreate.
  • Host sshd stays on 22; Gitea uses 2222 to avoid a clash.
  • Right after the first push to an empty repo, the commits API can return 409 for about a second.