gitea log configuration for fail2ban

Gitea since 1.21 has a different logging configuration format.
TL;DR If you want to configure fail2ban to ban those failed ssh login attempts,
use this log section in app.ini

Sadly you can’t turn off all logging except the SSH log. You have to wear your SSD.
The actual fail2ban configuration is described on their website under Administration / Fail2Ban Setup

How to run gitea securely with snapcraft’s gitea snap on CentOS/Rocky/Alma etc

Install gitea snap

Add user

systemctl edit snap.gitea.web.service

In app.ini

add firewall forward rule