diff --git a/contrib/update.sh b/contrib/update.sh
index db3a4b3a3eb7e8704304acad1fb8e7bdaad06840..5aaa71d54b1c1dc4aa26d606fd06267f2eb3f46b 100755
--- a/contrib/update.sh
+++ b/contrib/update.sh
@@ -24,7 +24,8 @@ trap "rm -f $tmp_file 2>/dev/null" EXIT
 gitlab-deps list-projects $opts \
     | egrep "${PROJECT_REGEXP:-.*}" \
     | gitlab-deps deps $opts \
-                  > $tmp_file
+        ${GITLAB_REGISTRY_HOSTNAME:+--registry=${GITLAB_REGISTRY_HOSTNAME}} \
+        > $tmp_file
 
 if ! cmp --quiet $tmp_file $deps_file; then
     mv -f $tmp_file $deps_file
diff --git a/debian/gitlab-deps.default b/debian/gitlab-deps.default
index 8c294d2fa8bb50f597db2dc2b7687a83d5945bb8..5c0acc2bc0598cb80cc2449b5b9e0a1b9c7c4863 100644
--- a/debian/gitlab-deps.default
+++ b/debian/gitlab-deps.default
@@ -1,6 +1,9 @@
 # Set to the public URL of your Gitlab repository.
 GITLAB_URL=
 
+# Set to the registry hostname (https:// is assumed) if necessary.
+GITLAB_REGISTRY_HOSTNAME=
+
 # File with the authorization token.
 GITLAB_TOKEN_FILE=/var/lib/gitlab-deps/auth_token