# Debian repository

**URL:** <https://forum.gitea.com/t/debian-repository/10849>\
**Category:** Install/Maintain/Configure\
**Created:** [February 23, 2025, 5:28pm UTC](https://forum.gitea.com/t/debian-repository/10849 "2025-02-23T17:28:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![24unix](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/24unix/32/1884_2.png) [@24unix](https://forum.gitea.com/u/24unix)\
**Post date:** [February 23, 2025, 5:28pm UTC](https://forum.gitea.com/t/debian-repository/10849/1 "2025-02-23T17:28:43Z")

</div>

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:

✅ No package signing yet (will be added later)

✅ No user or config files are created

✅ It simply replaces the binary under /opt/gitea/bin/

✅ 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:

> **[gitea-deb](https://git.24unix.net/tracer/gitea-deb.git)**
>
> gitea-deb

Maybe someone finds this useful! 🙂

Edit: There a currently packages for AMD64 and ARM64.

---

<div class="post-metadata">

**Author:** ![24unix](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/24unix/32/1884_2.png) [@24unix](https://forum.gitea.com/u/24unix)\
**Post date:** [May 4, 2025, 4:54pm UTC](https://forum.gitea.com/t/debian-repository/10849/2 "2025-05-04T16:54:50Z")

</div>

Follow-up: Improved Debian Packaging Setup

Hi everyone,

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

✅ 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.

✅ 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:

```auto
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. 🙂

If you prefer to build the packages yourself, the build scripts and setup are available here:  
[gitea-deb-builder repository](https://git.24unix.net/tracer/gitea-deb-builder)

---

<div class="post-metadata">

**Author:** ![24unix](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/24unix/32/1884_2.png) [@24unix](https://forum.gitea.com/u/24unix)\
**Post date:** [May 15, 2025, 5:02pm UTC](https://forum.gitea.com/t/debian-repository/10849/3 "2025-05-15T17:02:29Z")

</div>

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

```auto
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?

---

<div class="post-metadata">

**Author:** ![24unix](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/24unix/32/1884_2.png) [@24unix](https://forum.gitea.com/u/24unix)\
**Post date:** [May 8, 2026, 5:34pm UTC](https://forum.gitea.com/t/debian-repository/10849/4 "2026-05-08T17:34:48Z")

</div>

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`:

```bash
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.

```auto

```

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [May 11, 2026, 5:42pm UTC](https://forum.gitea.com/t/debian-repository/10849/5 "2026-05-11T17:42:43Z")

</div>

> [@24unix](#):
>
> `https://git.24unix.net`

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](https://gitea.com/gitea/awesome-gitea)

---

<div class="post-metadata">

**Author:** ![24unix](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/24unix/32/1884_2.png) [@24unix](https://forum.gitea.com/u/24unix)\
**Post date:** [May 11, 2026, 6:41pm UTC](https://forum.gitea.com/t/debian-repository/10849/6 "2026-05-11T18:41:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![24unix](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/24unix/32/1884_2.png) [@24unix](https://forum.gitea.com/u/24unix)\
**Post date:** [October 24, 2026, 4:55pm UTC](https://forum.gitea.com/t/debian-repository/10849/7 "2026-10-24T16:55:47Z")

</div>

Hi everyone,

time for another update on the Debian packages. Quite a bit has changed:

✅ Signed APT repository. The packages are now published in the Debian package registry of my Gitea instance, so the repository is signed and trusted=yes is no longer needed.

✅ One repository per package. I merged the separate builder repositories back in; build scripts and packages now live together:

- gitea-deb – Gitea
- gitea-runner-deb – Gitea Runner
- gitea-cli-deb – new: gt, the new Gitea CLI

✅ New package gitea-cli. It installs /usr/bin/gt plus completions for bash, zsh and fish. The upstream checksums are verified against their signature. Note that it conflicts with Debian’s genometools, which also ships /usr/bin/gt. gt needs Gitea 28 or newer on the server.

✅ Packaging fixes (gitea 28.2.0-3, gitea-runner 5.2.2-3):

- The systemd units moved from /etc/systemd/system/ to /usr/lib/systemd/system/. On upgrade, the old unit is kept as \*.service.dpkg-old. If you changed it, move your changes into a drop-in (systemctl edit gitea).
- Requires=mariadb.service was removed from the Gitea unit. If your Gitea uses a local MariaDB, add a drop-in:  
[Unit]  
Requires=mariadb.service  
After=mariadb.service
- The Gitea package now creates the gitea system user if it doesn’t exist. Existing users are kept.
- The maintainer scripts no longer call systemctl directly, so the packages also install in containers and chroots. A failed upgrade starts the service again.
- Please upgrade: the older packages installed their files owned by uid 5001, the build user, instead of root. The new versions ship root-owned files and hand the affected directories back on upgrade.

Each version also gets a release in the repository, with both architectures attached and the SHA256 sums in the release notes.

How to install (as root):

curl -fsSL [https://git.24unix.net/api/packages/tracer/debian/repository.key](https://git.24unix.net/api/packages/tracer/debian/repository.key) -o /etc/apt/keyrings/24unix-gitea.asc  
echo “deb [signed-by=/etc/apt/keyrings/24unix-gitea.asc] [https://git.24unix.net/api/packages/tracer/debian](https://git.24unix.net/api/packages/tracer/debian) $(. /etc/os-release; echo $VERSION\_CODENAME) main” \> /etc/apt/sources.list.d/24unix-gitea.list  
apt update  
apt install gitea # or gitea-runner, gitea-cli

Packages are published for the current Debian stable (trixie at the moment).

If you use the old source (deb [trusted=yes] [https://git.24unix.net/tracer/gitea-deb/raw/branch/master/](https://git.24unix.net/tracer/gitea-deb/raw/branch/master/) ./ or the gitea-runner-deb one): it keeps working until the end of 2026, then it goes away. Please remove that line and add the registry source above.

As before: if you’d rather build the packages yourself, everything is in the repositories, and each README explains how.
