diff --git a/CHANGELOG.md b/CHANGELOG.md
index 103934318319b9ac38657b815440298ae58dcbdc..1f6fb421ec470b6eb11a233a300dd10320b89991 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # Changelog
 
+## Unreleased
+
+* Fix `http://localhost` links in emails by setting `overwrite.cli.url`.
+
 ## 0.15.29 - 2024-08-23
 
 * Attempt to reduce test flakiness by checking whether the newly created office
diff --git a/templates/nextcloud-onlyoffice-config.yaml b/templates/nextcloud-onlyoffice-config.yaml
index 0b1d42794a543066a824ee79f96ba53d62595109..f09cdf38addfbd79de857c5fcf8097cff498d216 100644
--- a/templates/nextcloud-onlyoffice-config.yaml
+++ b/templates/nextcloud-onlyoffice-config.yaml
@@ -37,6 +37,7 @@ data:
             "trusted_proxies": ["10.42.0.0/16"],
             "trusted_domains": ["localhost", {{ .Values.nextcloud.nextcloud.host | quote }}],
             "overwriteprotocol": "https",
+            "overwrite.cli.url": "https://{{ .Values.nextcloud.nextcloud.host }}",
             "appstoreenabled": false,
             {{- if not .Values.nextcloud.skeleton }}
             "skeletondirectory": "",