diff --git a/3.New_server_deployment/4.APT_upgrade/0_setup.sh b/3.New_server_deployment/4.APT_upgrade/0_setup.sh
index aa0c157cb3bdad3c8c7821e105c58fad508bf804..e7fc75a005ef78244ad0a51bce9d0fc8ede1501c 100755
--- a/3.New_server_deployment/4.APT_upgrade/0_setup.sh
+++ b/3.New_server_deployment/4.APT_upgrade/0_setup.sh
@@ -1,6 +1,12 @@
 #!/bin/bash
 source /root/envsetup/global-conf.sh
 
+DEBIAN_FRONTEND=noninteractive
+export DEBIAN_FRONTEND
+
+apt-get update
+apt-get install -y apt-transport-https
+
 # move 50unattended-upgrades conf if any
 if [ -f /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist ]; then
 	mv /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist /etc/apt/apt.conf.d/50unattended-upgrades
@@ -23,8 +29,6 @@ if ( ! test -z ${APT_CACHE_URL} ); then
 fi
 
 # update packages
-DEBIAN_FRONTEND=noninteractive
-export DEBIAN_FRONTEND
 apt-get update
 apt-get install -f -y -o Dpkg::Options::="--force-confold"
 apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold"