Debian repository

Hi everyone,

I was getting a bit tired of manually upgrading Gitea, so I initially considered writing an Ansible playbook to automate the process.

However, after some research, I discovered Gitea’s fantastic feature of hosting Debian repositories and decided to build my own APT repository instead.

Since this is my first time building a Debian package, it’s far from perfect, but I plan to improve it over time. Currently:

:white_check_mark: No package signing yet (will be added later)

:white_check_mark: No user or config files are created

:white_check_mark: It simply replaces the binary under /opt/gitea/bin/

:white_check_mark: Comes with a systemd unit that expects Gitea to run under the gitea user

How to Install

If you want to try it, just add the following line to /etc/apt/sources.list.d/gitea.list:
deb [trusted=yes] https://git.24unix.net/tracer/gitea-deb/raw/branch/apt-repo/ ./

Then update and install:
apt update && apt install gitea

If you prefer not to install binaries from a third party (which I totally understand – I’m neither a Debian maintainer nor affiliated with Gitea), you can build the packages yourself.

Just clone:

Maybe someone finds this useful! :slightly_smiling_face:

Edit: There a currently packages for AMD64 and ARM64.

1 Like

Follow-up: Improved Debian Packaging Setup

Hi everyone,

I wanted to share an update on the Debian repository I posted about earlier!

:white_check_mark: I’ve reorganized things and added a second dedicated repository just for building the .deb packages.
This separation keeps the release repository (gitea-deb) clean and focused, while the new gitea-deb-builder handles the automated fetching, verifying, and packaging process.

:white_check_mark: The current setup only handles final releases — it does not automatically package release candidates (RC) or pre-release versions.
For example, there’s an RC out right now that’s not picked up by my build script.
If there’s enough interest, I might extend the script to optionally include RC builds in a separate repo or section.

As before, the .deb packages currently:

  • Replace only the binary under /opt/gitea/bin/
  • Expect the systemd unit to run Gitea under the gitea user
  • Do not include package signing (yet; planned for later)

If you’re using the APT repo, the install line remains:

deb [trusted=yes] https://git.24unix.net/tracer/gitea-deb/raw/branch/apt-repo/ ./

Let me know if you’re interested in seeing RC or nightly builds included!
And thanks again to the Gitea team for making it so easy to hook into. :slightly_smiling_face:

If you prefer to build the packages yourself, the build scripts and setup are available here:
gitea-deb-builder repository