diff --git a/templates/gitlab.rb.j2 b/templates/gitlab.rb.j2
index e8e9cb104489c65a0be16802a7ab0de5b8e95ed6..74676f19da99e4c95eae3f7af901c91a828dd6ed 100644
--- a/templates/gitlab.rb.j2
+++ b/templates/gitlab.rb.j2
@@ -653,6 +653,7 @@ gitlab_rails['registry_enabled'] = true
 
 {% if gitlab.registry_path %}
 gitlab_rails['registry_path'] = "{{ gitlab.registry_path }}"
+{% endif %}
 
 # Notification secret, it's used to authenticate notification requests to GitLab application
 # You only need to change this when you use external Registry service, otherwise