Where is the "custom" folder inside a docker installation?

Note: This applies only to your case. When I say /home/gitea/gitea is the path on your outer volume, not the container volume (which would be /data/gitea).


Ok, so if your gitea data folder is in /home/gitea/gitea, here is where you find/put the files and folders:

  • App INI file: /home/gitea/gitea/conf/app.ini
  • Custom Labels: /home/gitea/gitea/options/label (more on labels below)
  • Public assets (css, images, etc): /home/gitea/gitea/public (more on public assets below)
  • Templates: /home/gitea/gitea/templates/custom (more on templates below).

Custom Labels

Custom labels are sets of labels you can import to override the default gitea labels. In order to do that you need to create a plain text file with no extension and give it a name of what you want your label set to appear as. Then you need to add the data in the following format.

For example:
Filename: /home/gitea/gitea/options/label/mycustomset

#ee0701 Bug ; Something is not working
#cccccc Duplicate ; This issue or pull request already exists
#84b6eb Enhancement ; New feature
#006b75 Feature Request ; Feature request
#128a0c Help Wanted ; Need some help
#e6e6e6 Invalid ; Something is wrong
#cc317c Question ; More information is needed
#70c24a Fixed (Released) ; Issue has been fixed in a released version
#ffffff Won't Fix ; This won't be fixed

Public Assets

Public assets are data that you can call from your custom templates. It is also here were you add custom static pages. For example, let’s say you want to add an overriding CSS in order to theme your gitea template. You would add some files as follows:


Now, how we make those appear, is by overriding our templates, which is the next section explained.


In order to add an overriding template, you need to create your templates in the folder /home/gitea/gitea/templates/custom (And I think this is the “custom” folder you were looking for). You would need to follow the templating name specs from the gitea docs from here. But let’s say you wanted to customize the header by adding a new CSS. You would create the following file: /home/gitea/gitea/templates/custom/header.tmpl with the following content:

<link rel="stylesheet" href="{{AppSubUrl}}/css/mycustom.css" media="all" />

The {{AppSubUrl}} as I understand it, accounts for instances where you are running gitea in a subdir, but generally this does not apply to docker installs, so it would be empty, and the resulting path to your public files would be /css/mycustom.css.

I get you, it seems complicated because docker paths are not very well explained in the gitea docs. I would recommend you stay with docker, though. It is a lot simpler to maintain once you know where to find everything. For a little more info on templating, check here: