1. install new gogs app

  2. cp custom/conf/app.ini to new server,and edit

  3. migrate mysql data

  4. migrate gogs-repositories dir

  5. config autostart

  6. Resync pre-receive, update and post-receive hooks of all repositories

refrence

GOGS代码仓库迁移教程