diff --git a/changelog.d/10045.docker b/changelog.d/10045.docker
new file mode 100644
index 0000000000000000000000000000000000000000..70b65b0a01a44c99852cc384d769380c1da3f7e8
--- /dev/null
+++ b/changelog.d/10045.docker
@@ -0,0 +1 @@
+Fix bug introduced in Synapse 1.33.0 which caused a `Permission denied: '/homeserver.log'` error when starting Synapse with the generated log configuration. Contributed by Sergio Miguéns Iglesias.
diff --git a/docker/conf/log.config b/docker/conf/log.config
index 34572bc0f36a6e01d94927f44afc7efd0b940d05..a99462692628398829f8c3f1ea2495f9db958fc9 100644
--- a/docker/conf/log.config
+++ b/docker/conf/log.config
@@ -9,10 +9,11 @@ formatters:
 {% endif %}
 
 handlers:
+{% if LOG_FILE_PATH %}
   file:
     class: logging.handlers.TimedRotatingFileHandler
     formatter: precise
-    filename: {{ LOG_FILE_PATH or "homeserver.log" }}
+    filename: {{ LOG_FILE_PATH }}
     when: "midnight"
     backupCount: 6  # Does not include the current log file.
     encoding: utf8
@@ -29,6 +30,7 @@ handlers:
     # be written to disk.
     capacity: 10
     flushLevel: 30  # Flush for WARNING logs as well
+{% endif %}
 
   console:
     class: logging.StreamHandler