0. Backup
Reference: Backup and Restore
Stop Gitea service first
sudo systemctl stop giteaSwitch 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-data1. 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 giteaVerify its signature
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.ascLook 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 giteaSwitch 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.inior 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