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

Just a quick hint, I forgot to think about the apt-repo line.
The branch has changed, it’s now

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

The latest stable version 1.23.8 is now available.

Edit: As I cannot edit my first post any longer, could any admin or mod change the apt src in the first post or add a note that there were follow up posts with additional information?

Hi everyone,

small update: I’ve now added Debian packages for the new Gitea Runner as well.

Since act_runner has been renamed to gitea-runner with the 1.0 release, I created the same kind of setup as for the Gitea server packages:

  • gitea-runner-deb contains the APT repository
  • gitea-runner-deb-builder contains the build scripts

Currently there are packages for:

  • AMD64
  • ARM64

As with my Gitea packages, this is still a simple setup:

  • No package signing yet
  • The package installs the runner binary under /opt/gitea-runner/bin/
  • It creates a gitea-runner system user
  • It installs a systemd unit named gitea-runner
  • The service expects the config at /etc/gitea-runner/config.yaml

How to Install

Add this to /etc/apt/sources.list.d/gitea-runner.list:

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

Then update and install:

apt update && apt install gitea-runner

The package does not register the runner automatically. You still need to create the config / register it against your Gitea instance as usual.

If you prefer to build the packages yourself, the builder repository is here:

gitea-runner-deb-builder repository

This currently follows final Gitea Runner releases only, similar to the Gitea server package builder.

Maybe this is useful for anyone who wants to run Gitea Actions without manually updating the runner binary.

1 Like

Please also have a PR at gitea/awesome-gitea: A curated list of awesome projects related to Gitea and its soft-fork instances - awesome-gitea - Gitea: Git with a cup of tea

@lunny Thx for the link, when I’m back in the office I’ll look up that repo and try to add a PR.

1 Like