All articles
UncategorizedOct 03, 20260 min read— views

How to update Gitea (installed via binary)

This guide will walk you through the steps to update Gitea installed via binary, ensuring a smooth transition to the latest version while preserving your data.

A

Athicha Leksansern

Full-stack Engineer

0. Backup

Reference: Backup and Restore

Stop Gitea service first

sudo systemctl stop gitea

Switch to the user running Gitea: sudo -s then su git, and run

GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea dump -c /etc/gitea/app.ini
# or without package data
GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea dump -c /etc/gitea/app.ini --skip-package-data

1. Download the latest Gitea binary

Reference: Gitea | gitea

Go back to root user, then download the linux-amd64 version

cd /usr/local/bin
wget -O gitea https://dl.gitea.com/gitea/1.27.3/gitea-1.27.3-linux-amd64
chmod +x gitea

Verify its signature

Refernce: Installation from binary | Gitea Documentation

wget https://dl.gitea.com/gitea/1.27.3/gitea-1.27.3-linux-amd64.asc
gpg --keyserver hkps://keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2
gpg --verify gitea-1.27.3-linux-amd64.asc gitea
rm gitea-1.27.3-linux-amd64.asc

Look for the text Good signature from "Teabot <teabot@gitea.io>" to assert a good binary, despite warnings like This key is not certified with a trusted signature!.

2. Restart Gitea service

sudo systemctl start gitea

Switch to the user running Gitea: sudo -s then su git, and run

GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea doctor check --all -c /etc/gitea/app.ini

or if you want to fix the issues automatically, run

GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea doctor check --all -c /etc/gitea/app.ini --fix