Move Gitea to another server

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

Thanks
Tim

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.

Regards

Hi @trnc

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

Tim

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.