diff --git a/templates/jail.Ubuntu20.j2 b/templates/jail.Ubuntu20.j2
index 318e66e0a78dbacde4b30fbd71f181fcfa8ce355..b0d0770c1419faa20bc4e3a67ad4a9de3f012ac2 100644
--- a/templates/jail.Ubuntu20.j2
+++ b/templates/jail.Ubuntu20.j2
@@ -334,7 +334,7 @@ maxretry = 2
 
 
 {% endif %}
-{% if inventory_hostname in groups.docker %}
+{% if inventory_hostname in groups.docker and inventory_hostname not in groups.docker_nextcloud %}
 #
 # Docker containers
 #