diff --git a/templates/d8_settings.php.jinja2 b/templates/d8_settings.php.jinja2
index 9647d7f4705b9a179f80e66c193a9a9a8284dfab..17578690ca3ed255e4336d6d1a0b38e29a8d26a9 100644
--- a/templates/d8_settings.php.jinja2
+++ b/templates/d8_settings.php.jinja2
@@ -57,9 +57,13 @@ $settings['trusted_host_patterns'] = array(
 // As soon as Drupal 8.8+ will be used everywhere, the following line can be removed.
 $config['system.file']['path']['temporary'] = {% if drupal.jail is defined %}is_dir('{{ jailroot }}/{{ drupal.jail.name }}/tmp') ? '{{ jailroot }}/{{ drupal.jail.name }}/tmp' : '/tmp'{% else %}'/tmp'{% endif %};
 
+{% if drupal.isversion9|default(no) %}
+$settings['config_sync_directory'] = 'sites/{{ item.shortname|default("default") }}/files/{{ item.config|default("config") }}/sync';
+{% else %}
 {% for key in drupal_config_directories %}
 $config_directories['{{ key }}'] = 'sites/{{ item.shortname|default("default") }}/files/{{ item.config|default("config") }}/{{ drupal_config_directories[key] }}';
 {% endfor %}
+{% endif %}
 
 {% for line in item.extra_settings|default([]) %}
 {{ line }}