Customising Gitea

I now have my own Gitea instance:

oppen.dev

Codeberg have been really hammering home the 'only OSI approved licenses' thing lately so I've set up my own Gitea instance as I use a copy-far-left license, a slightly edited version of the Peer Production License, which is incompatible with their FOSS values:

ÖLAB Software License

Peer Production Licence - Human-readable summary

Note: I've been using the ÖLAB license for quite a while now, please don't message me telling me things I already know - I fully understand the license landscape and have no interest whatsoever in discussing this further. People not using an OSI license is absolutely fine, not an invitation for you to start a debate. Also - stop bullying people you ghouls.

Installing Gitea - the easy way

Linode have a Gitea Linode available in their marketplace. After registering for a Linode account I setup a spare domain I had (oppen.dev) in Domains at the dashboard top-level, and updated the name servers to point at Linodes from my domain registrar. I then just selected Linodes > Create > Marketplace, chose Gitea and worked through the guide below, you'll need an access token setting up so do that first:

Deploying Gitea through the Linode Marketplace

Get an Access Token

marketplace/apps/linode/gitea/

Those few fields were all it took to get a Gitea instance up and running, it provisioned in about 2 minutes and was available fully within 5 (I assume the LetsEncrypt step takes a little while). The only issues are there's no email support (because I'm impatient and didn't set everything up), which is fine, only I'll be using this.

Customising Gitea

Out of the box Gitea looks great but everyone's going to want to customise their instance - especially the main icon. The official docs really weirdly make it sound like you need to build Gitea from source to customise the icon:

Changing the logo

You don't need to do any of that, just go to yourgiteaurl/admin/config (eg. https://oppen.dev/admin/config) and note the 'Custom File Root Path', in my case: /var/lib/gitea/custom - navigate to the directory via SSH and create a sub-directory called 'templates'. Also note the 'Gitea Version', you can then use wget to pull any of the template files for your version:

templates for Gitea 1.13.0

Let's say you wanted to change the icon in the Gitea header, just create a 'base' directory in 'templates' and pull the raw file:

cd /var/lib/gitea/custom
mkdir templates
cd templates
mkdir base
cd base
wget https://raw.githubusercontent.com/go-gitea/gitea/v1.13.0/templates/base/head_navbar.tmpl

You can then change the icon to any url you like, just edit the file then restart the Gitea Linode from the Linode dashboard.