Hi, I’m new to hosting servers so this may be super obvious. But I can’t figure out how to set a max file size on gitea. It says in the documentation that I can list “MAX_FILE_SIZE” under [indexer], but I tried this and restarted my server and nothing happened. Then I tried:
REPO_INDEXER_ENABLED = true
REPO_INDEXER_PATH = indexers/repos.bleve
UPDATE_BUFFER_LEN = 20
MAX_FILE_SIZE = 1048576
and restarted my server and still nothing happened. Not exactly sure what I’m doing. Does anyone know how to do this?
The indexer is used for code search, and the max file size setting there is to determine the max file size of files to be indexed. If you don’t wan’t files over a certain size committed to your instance you are able to use githooks to prevent that (please note, you should only have trusted users modify githooks)
Thank you for the response. I am new to self-hosting a git server so please forgive my ignorance. Is there a guide on implementing web-hooks for all users so I may limit the file size of files as they are committed, or even maybe as they are being uploaded? My main issue is that I want things over 500MB ish to be capped so users are forced to use git-lfs. Is this a bad approach? I just want to make sure users can’t upload junk files in bulk maliciously.