Skip to main content

Gitea Updates: quick'n'dirty

·232 words·2 mins

Okay, let’s get right into it.

The gitea stuff is located at /var/lib/gitea.

The gitea config file is located at /etc/gitea/app.ini.

The gitea.service file is located at /etc/systemd/system/gitea.service and contains:


ExecStart=/var/lib/gitea/gitea web -c /etc/gitea/app.ini
Environment=USER=git HOME=/var/lib/gitea/data/home GITEA_WORK_DIR=/var/lib/gitea


Check the Changelog for breaking changes.

Create a backup first (or after renamed the executable file gitea to gitea.back):

# sudo -u git ./gitea.back dump -c /etc/gitea/app.ini

That creates a file

# ll gitea-dump*
.rw-------. git  git  835 MB Sun Mar 12 07:32:49 2023 

Just for the record: I’ll include a recovery routine here, which is basically unzipping the dump file from above and moving the contained files to the right directory.

# unzip
# cd gitea-dump-1610949662
# mv data/conf/app.ini /etc/gitea/app.ini
# mv data/* /var/lib/gitea/data/
# mv log/* /var/lib/gitea/log/
# mv repos/* /var/lib/gitea/repositories/
# chown -R gitea:gitea /etc/gitea/conf/app.ini /var/lib/gitea

# mysql --default-character-set=utf8mb4 -u$USER -p$PASS $DATABASE <gitea-db.sql

# systemctl restart gitea

Have a look at for a full and/or actual version of the recovery process.

Download the new binary file from

I usually download to my root’s home folder.

# wget
# cd /var/lib/gitea
# cp gitea gitea.back
# mv ~/gitea-1.18.5-linux-amd64 gitea
# systemctl restart gitea

That’s it. I won’t need this again but I like to keep this information somewhere I can find it ;-)