diff --git a/image_build/prosody-0.10-1nightly468.tar.gz b/image_build/prosody-0.10-1nightly468.tar.gz
deleted file mode 100644
index 9b96be66..00000000
Binary files a/image_build/prosody-0.10-1nightly468.tar.gz and /dev/null differ
diff --git a/image_build/prosody-0.10-1nightly478.tar.gz b/image_build/prosody-0.10-1nightly478.tar.gz
new file mode 100644
index 00000000..66277a18
Binary files /dev/null and b/image_build/prosody-0.10-1nightly478.tar.gz differ
diff --git a/src/freedombone-app-gogs b/src/freedombone-app-gogs
index 8a2e4c0a..5e0ca0a9 100755
--- a/src/freedombone-app-gogs
+++ b/src/freedombone-app-gogs
@@ -150,6 +150,18 @@ function upgrade_gogs {
         return
     fi
 
+    GOGS_CONFIG_PATH=/home/${GOGS_USERNAME}/custom/conf
+    GOGS_CONFIG_FILE=$GOGS_CONFIG_PATH/app.ini
+
+    # Change port number if necessary
+    if ! grep -q "HTTP_PORT = ${GOGS_PORT}" "${GOGS_CONFIG_FILE}"; then
+        sed -i "s|HTTP_PORT =.*|HTTP_PORT = ${GOGS_PORT}|g" "${GOGS_CONFIG_FILE}"
+        read_config_param GIT_DOMAIN_NAME
+        sed -i "s|proxy_pass .*|proxy_pass http://localhost:${GOGS_PORT};|g" "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
+        systemctl restart gogs
+        systemctl restart nginx
+    fi
+
     CURR_GOGS_VERSION=$(get_completion_param "gogs version")
     echo "gogs current version: ${CURR_GOGS_VERSION}"
     echo "gogs app version: ${GOGS_VERSION}"
@@ -157,8 +169,6 @@ function upgrade_gogs {
         return
     fi
 
-    GOGS_CONFIG_PATH=/home/${GOGS_USERNAME}/custom/conf
-    GOGS_CONFIG_FILE=$GOGS_CONFIG_PATH/app.ini
     cp "$GOGS_CONFIG_FILE $INSTALL_DIR/gogs_config.ini"
 
     if [ -d "$INSTALL_DIR/gogs-repositories" ]; then
diff --git a/src/freedombone-app-xmpp b/src/freedombone-app-xmpp
index aef7fb30..0de55ab2 100755
--- a/src/freedombone-app-xmpp
+++ b/src/freedombone-app-xmpp
@@ -43,8 +43,8 @@ XMPP_CIPHERS='"EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA256:EECDH:+
 XMPP_ECC_CURVE='"secp384r1"'
 
 prosody_latest_version='0.10'
-prosody_nightly=468
-prosody_nightly_hash='c72aaab1182a86090188284f443d2f819889ca242d4e955258ef60f4c7c9a1ba'
+prosody_nightly=478
+prosody_nightly_hash='884e773920dbcd0a748d05391235df3ff2b82285357b13cb347c99564512593e'
 prosody_filename=prosody-${prosody_latest_version}-1nightly${prosody_nightly}
 prosody_nightly_url="https://prosody.im/nightly/${prosody_latest_version}/latest/${prosody_filename}.tar.gz"