Move Gitea to another server

I will have to move my Gitea installation to another server.
Has anyone already done this? Maybe someone can give me some advices.


I did it once it’s super easy!! All you need to do is backup your database, I suppose you’re using MySQL/MariaDB.

# mysqldump -u root -p gitea_database > gitea_database.sql

Now backup your repositories, these are located under /home/git/gitea-repositories. I’m assuming you installed Gitea as their site reads if so you’re good to go.

On the new server install Gitea the same way you did it before and once you have it up and running stop the Gitea service then restore your database backup

# mysql -u root -p gitea_database < /path/to/your/sql/file

When the task finish restore your repositories backup and start Gitea service.

Maybe this is not the real procedure to migrate gitea to a new server, but it worked for me.


Hi @trnc

Thank you very much. I will try this. :slight_smile:


It’s also important to run the following tasks from the admin panel:

  • Update the ‘.ssh/authorized_keys’ file with Gitea SSH keys. (Not needed for the built-in SSH server.)
  • Resynchronize pre-receive, update and post-receive hooks of all repositories.