diff --git a/templates/standalone-ha.xml.j2 b/templates/standalone-ha.xml.j2
index 00b4c5d..e57adb8 100644
--- a/templates/standalone-ha.xml.j2
+++ b/templates/standalone-ha.xml.j2
@@ -195,7 +195,11 @@
+ {% if keycloak_use_external_db %}
+
+ {% else %}
+ {% endif %}
diff --git a/templates/standalone.xml.j2 b/templates/standalone.xml.j2
index 973395b..34b08b4 100644
--- a/templates/standalone.xml.j2
+++ b/templates/standalone.xml.j2
@@ -193,7 +193,11 @@
+ {% if keycloak_use_external_db %}
+
+ {% else %}
+ {% endif %}