diff --git a/src/freedombone-app-gogs b/src/freedombone-app-gogs
index e1c7114d39f58b34778bf3207aa2cdb654a4bd69..fde2e9af54a7cff0dbf480e6663535ea2a22f911 100755
--- a/src/freedombone-app-gogs
+++ b/src/freedombone-app-gogs
@@ -184,7 +184,48 @@ function backup_remote_gogs {
 }
 
 function restore_remote_gogs {
-	echo -n ''
+	export GVM_ROOT=$GVM_HOME
+	if [ -d $GVM_ROOT/bin ]; then
+		cd $GVM_ROOT/bin
+		[[ -s "$GVM_ROOT/scripts/gvm" ]] && source "$GVM_ROOT/scripts/gvm"
+		gvm use go${GO_VERSION} --default
+		systemctl set-environment GOPATH=$GOPATH
+	fi
+
+	if grep -q "Gogs domain" $COMPLETION_FILE; then
+		GIT_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Gogs domain" | awk -F ':' '{print $2}')
+		function_check restore_database_from_friend
+		restore_database_from_friend gogs $GIT_DOMAIN_NAME
+		if [ -d $SERVER_DIRECTORY/backup/gogs ]; then
+			if [ ! -d $GOPATH/src/github.com/gogits/gogs/custom ]; then
+				mkdir -p $GOPATH/src/github.com/gogits/gogs/custom
+			fi
+			cp -r /root/tempgogs/$GOPATH/src/github.com/gogits/gogs/custom/* $GOPATH/src/github.com/gogits/gogs/custom/
+			if [ ! "$?" = "0" ]; then
+				exit 5885
+			fi
+			echo $"Restoring Gogs repos"
+			restore_directory_from_friend /root/tempgogsrepos gogsrepos
+			cp -r /root/tempgogsrepos/home/git/gogs-repositories/* /home/git/gogs-repositories/
+			if [ ! "$?" = "0" ]; then
+				exit 7649
+			fi
+			echo $"Restoring Gogs authorized_keys"
+			restore_directory_from_friend /root/tempgogsssh gogsssh
+			if [ ! -d /home/git/.ssh ]; then
+				mkdir /home/git/.ssh
+			fi
+			cp -r /root/tempgogsssh/home/git/.ssh/* /home/git/.ssh/
+			if [ ! "$?" = "0" ]; then
+				exit 74239
+			fi
+			rm -rf /root/tempgogs
+			rm -rf /root/tempgogsrepos
+			rm -rf /root/tempgogsssh
+			chown -R git:git /home/git
+			echo $"Restore of Gogs complete"
+		fi
+	fi
 }
 
 function remove_gogs {
diff --git a/src/freedombone-restore-remote b/src/freedombone-restore-remote
index 01ef5e25fbdfa0d1bf9b020788777d648675d143..76e884468b685bf360afae0662be79eed1a5f7df 100755
--- a/src/freedombone-restore-remote
+++ b/src/freedombone-restore-remote
@@ -666,54 +666,6 @@ function restore_mailing_list {
 	fi
 }
 
-function restore_gogs {
-	export GVM_ROOT=$GVM_HOME
-	if [ -d $GVM_ROOT/bin ]; then
-		cd $GVM_ROOT/bin
-		[[ -s "$GVM_ROOT/scripts/gvm" ]] && source "$GVM_ROOT/scripts/gvm"
-		gvm use go${GO_VERSION} --default
-		systemctl set-environment GOPATH=$GOPATH
-	fi
-
-	if [[ $RESTORE_APP != 'all' ]]; then
-		if [[ $RESTORE_APP != 'gogs' ]]; then
-			return
-		fi
-	fi
-	if grep -q "Gogs domain" $COMPLETION_FILE; then
-		GIT_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Gogs domain" | awk -F ':' '{print $2}')
-		restore_database_from_friend gogs $GIT_DOMAIN_NAME
-		if [ -d $SERVER_DIRECTORY/backup/gogs ]; then
-			if [ ! -d $GOPATH/src/github.com/gogits/gogs/custom ]; then
-				mkdir -p $GOPATH/src/github.com/gogits/gogs/custom
-			fi
-			cp -r /root/tempgogs/$GOPATH/src/github.com/gogits/gogs/custom/* $GOPATH/src/github.com/gogits/gogs/custom/
-			if [ ! "$?" = "0" ]; then
-				exit 5885
-			fi
-			echo $"Restoring Gogs repos"
-			restore_directory_from_friend /root/tempgogsrepos gogsrepos
-			cp -r /root/tempgogsrepos/home/git/gogs-repositories/* /home/git/gogs-repositories/
-			if [ ! "$?" = "0" ]; then
-				exit 7649
-			fi
-			echo $"Restoring Gogs authorized_keys"
-			restore_directory_from_friend /root/tempgogsssh gogsssh
-			if [ ! -d /home/git/.ssh ]; then
-				mkdir /home/git/.ssh
-			fi
-			cp -r /root/tempgogsssh/home/git/.ssh/* /home/git/.ssh/
-			if [ ! "$?" = "0" ]; then
-				exit 74239
-			fi
-			rm -rf /root/tempgogs
-			rm -rf /root/tempgogsrepos
-			rm -rf /root/tempgogsssh
-			chown -R git:git /home/git
-		fi
-	fi
-}
-
 function restore_wiki {
 	if [[ $RESTORE_APP != 'all' ]]; then
 		if [[ $RESTORE_APP != 'wiki' ]]; then
@@ -934,7 +886,6 @@ restore_mailing_list
 restore_email
 #restore_apps remote
 
-restore_gogs
 restore_wiki
 restore_blog
 restore_cjdns