Nextcloud 24 Office/Collabora Online BUG ERROR - Document failed to load

Nextcloud version: Nextcloud 24.0.0
OS: Debian 11 5.10.0-14-amd64 #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64 GNU/Linux
Nginx version: nginx/1.21.6
PHP version: PHP 7.4.28 (cli) (built: Feb 17 2022 16:17:19) ( NTS )
Collabora Installed Package information:

coolwsd:
  Installed: 21.11.4.2-1
  Candidate: 21.11.4.2-1
  Version table:
 *** 21.11.4.2-1 500
        500 https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-debian11 ./ Packages
        100 /var/lib/dpkg/status

_

Now the logs for my issue:

coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:02.601145 -0400 [ websrv_poll ] ERR  FileServerRequestHandler: File not found: Invalid URI request: [/browser/3eff190/nextcloud/branding.css].| wsd/FileServer.cpp:689
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:02.601975 -0400 [ websrv_poll ] ERR  FileServerRequestHandler: File not found: Invalid URI request: [/browser/3eff190/nextcloud/branding.js].| wsd/FileServer.cpp:689
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:02.617136 -0400 [ websrv_poll ] ERR  FileServerRequestHandler: File not found: Invalid URI request: [/browser/3eff190/branding-desktop.css].| wsd/FileServer.cpp:689
coolwsd[33563]: wsd-33563-34012 2022-05-14 14:29:02.646708 -0400 [ docbroker_005 ] WRN  Waking up dead poll thread [HttpSynReqPoll], started: false, finished: false| ./net/Socket.hpp:720
coolwsd[33563]: wsd-33563-34012 2022-05-14 14:29:05.706740 -0400 [ docbroker_005 ] ERR  #30: read failed, have 0 buffered bytes (EPIPE: Broken pipe)| ./net/Socket.hpp:1124
coolwsd[33563]: wsd-33563-34012 2022-05-14 14:29:05.707010 -0400 [ docbroker_005 ] ERR  #30: Socket write returned -1 (EPIPE: Broken pipe)| ./net/Socket.hpp:1418
coolwsd[33563]: wsd-33563-34012 2022-05-14 14:29:05.707071 -0400 [ docbroker_005 ] ERR  #30: Socket write returned -1 (EPIPE: Broken pipe)| ./net/Socket.hpp:1418
coolwsd[33563]: wsd-33563-34012 2022-05-14 14:29:05.707219 -0400 [ docbroker_005 ] ERR  WOPI::CheckFileInfo failed for URI [https://nextcloud.domain.com/index.php/apps/richdocuments/wopi/files/46120_oczo9l6g28gh?access_token=8fzJCQDr3D0mIqfUzPYmyjsNuFIH8c9m&access_token_ttl=0]: 0 . Headers: #011Body: []| wsd/Storage.cpp:675
coolwsd[33563]: wsd-33563-34012 2022-05-14 14:29:05.707431 -0400 [ docbroker_005 ] ERR  loading document exception: WOPI::CheckFileInfo failed: | wsd/DocumentBroker.cpp:2155
coolwsd[33563]: wsd-33563-34012 2022-05-14 14:29:05.707481 -0400 [ docbroker_005 ] ERR  Failed to add session to [/index.php/apps/richdocuments/wopi/files/46120_oczo9l6g28gh] with URI [https://nextcloud.domain.com/index.php/apps/richdocuments/wopi/files/46120_oczo9l6g28gh?access_token=8fzJCQDr3D0mIqfUzPYmyjsNuFIH8c9m&access_token_ttl=0]: WOPI::CheckFileInfo failed: | wsd/DocumentBroker.cpp:2117
coolwsd[33563]: wsd-33563-34012 2022-05-14 14:29:05.707555 -0400 [ docbroker_005 ] ERR  Storage error while starting session on /index.php/apps/richdocuments/wopi/files/46120_oczo9l6g28gh for socket #25. Terminating connection. Error: WOPI::CheckFileInfo failed: | wsd/COOLWSD.cpp:4395
coolwsd[33563]: wsd-33563-34012 2022-05-14 14:29:05.708180 -0400 [ docbroker_005 ] WRN  Ignoring attempted read from 25| ./net/Socket.hpp:1102
coolwsd[33563]: wsd-33563-34012 2022-05-14 14:29:05.708253 -0400 [ docbroker_005 ] ERR  Invalid or unknown session [049] to remove.| wsd/DocumentBroker.cpp:2200
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:05.777743 -0400 [ websrv_poll ] WRN  DocBroker with docKey [/index.php/apps/richdocuments/wopi/files/46120_oczo9l6g28gh] is unloading. Rejecting client request to load.| wsd/COOLWSD.cpp:2984
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:05.778001 -0400 [ websrv_poll ] ERR  Error while handling Client WS Request: Failed to create DocBroker with docKey [/index.php/apps/richdocuments/wopi/files/46120_oczo9l6g28gh].| wsd/COOLWSD.cpp:4428
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:05.778076 -0400 [ websrv_poll ] WRN  #25 is shutting down but 64 bytes couldn't be flushed and still remain in the output buffer.| ./net/WebSocketHandler.hpp:793
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:05.778121 -0400 [ websrv_poll ] ERR  #25: attempted to remove: 865 which is > size: 0 clamped to 0| ./net/Socket.hpp:1224
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:05.778157 -0400 [ websrv_poll ] WRN  Ignoring attempted read from 25| ./net/Socket.hpp:1102
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:05.778588 -0400 [ websrv_poll ] ERR  #25 Error while handling poll at 0 in websrv_poll: #25BIO error: 337690831, rc: -1: error:1420C0CF:SSL routines:ssl_write_internal:protocol is shutdown:
coolwsd[33563]: 140362953783040:error:1420C0CF:SSL routines:ssl_write_internal:protocol is shutdown:../ssl/ssl_lib.c:1935:
coolwsd[33563]: | net/Socket.cpp:450
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:06.324286 -0400 [ websrv_poll ] WRN  DocBroker with docKey [/index.php/apps/richdocuments/wopi/files/46120_oczo9l6g28gh] is unloading. Rejecting client request to load.| wsd/COOLWSD.cpp:2984
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:06.324583 -0400 [ websrv_poll ] ERR  Error while handling Client WS Request: Failed to create DocBroker with docKey [/index.php/apps/richdocuments/wopi/files/46120_oczo9l6g28gh].| wsd/COOLWSD.cpp:4428
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:06.324642 -0400 [ websrv_poll ] WRN  #25 is shutting down but 64 bytes couldn't be flushed and still remain in the output buffer.| ./net/WebSocketHandler.hpp:793
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:06.324683 -0400 [ websrv_poll ] ERR  #25: attempted to remove: 865 which is > size: 0 clamped to 0| ./net/Socket.hpp:1224
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:06.324718 -0400 [ websrv_poll ] WRN  Ignoring attempted read from 25| ./net/Socket.hpp:1102
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:06.324874 -0400 [ websrv_poll ] ERR  #25 Error while handling poll at 0 in websrv_poll: #25BIO error: 337690831, rc: -1: error:1420C0CF:SSL routines:ssl_write_internal:protocol is shutdown:
coolwsd[33563]: 140362953783040:error:1420C0CF:SSL routines:ssl_write_internal:protocol is shutdown:../ssl/ssl_lib.c:1935:
coolwsd[33563]: | net/Socket.cpp:450
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:08.352238 -0400 [ websrv_poll ] WRN  Prisoner connection disconnected but without valid socket.| wsd/COOLWSD.cpp:3070
coolwsd[33563]: wsd-33563-33587 2022-05-14 14:29:08.352341 -0400 [ websrv_poll ] WRN  Prisoner connection disconnected but without valid socket.| wsd/COOLWSD.cpp:3070
coolwsd[33563]: wsd-33563-34025 2022-05-14 14:29:08.359958 -0400 [ docbroker_006 ] WRN  Waking up dead poll thread [HttpSynReqPoll], started: false, finished: false| ./net/Socket.hpp:720
coolwsd[33563]: wsd-33563-34025 2022-05-14 14:29:08.778788 -0400 [ docbroker_006 ] ERR  #30: read failed, have 0 buffered bytes (EPIPE: Broken pipe)| ./net/Socket.hpp:1124
coolwsd[33563]: wsd-33563-34025 2022-05-14 14:29:08.778989 -0400 [ docbroker_006 ] ERR  #30: Socket write returned -1 (EPIPE: Broken pipe)| ./net/Socket.hpp:1418
coolwsd[33563]: wsd-33563-34025 2022-05-14 14:29:08.779036 -0400 [ docbroker_006 ] ERR  #30: Socket write returned -1 (EPIPE: Broken pipe)| ./net/Socket.hpp:1418
coolwsd[33563]: wsd-33563-34025 2022-05-14 14:29:08.779211 -0400 [ docbroker_006 ] ERR  WOPI::CheckFileInfo failed for URI [https://nextcloud.domain.com/index.php/apps/richdocuments/wopi/files/46120_oczo9l6g28gh?access_token=8fzJCQDr3D0mIqfUzPYmyjsNuFIH8c9m&access_token_ttl=0&permission=edit]: 0 . Headers: #011Body: []| wsd/Storage.cpp:675
coolwsd[33563]: wsd-33563-34025 2022-05-14 14:29:08.779335 -0400 [ docbroker_006 ] ERR  loading document exception: WOPI::CheckFileInfo failed: | wsd/DocumentBroker.cpp:2155
coolwsd[33563]: wsd-33563-34025 2022-05-14 14:29:08.779409 -0400 [ docbroker_006 ] ERR  Failed to add session to [/index.php/apps/richdocuments/wopi/files/46120_oczo9l6g28gh] with URI [https://nextcloud.domain.com/index.php/apps/richdocuments/wopi/files/46120_oczo9l6g28gh?access_token=8fzJCQDr3D0mIqfUzPYmyjsNuFIH8c9m&access_token_ttl=0&permission=edit]: WOPI::CheckFileInfo failed: | wsd/DocumentBroker.cpp:2117
coolwsd[33563]: wsd-33563-34025 2022-05-14 14:29:08.779479 -0400 [ docbroker_006 ] ERR  Storage error while starting session on /index.php/apps/richdocuments/wopi/files/46120_oczo9l6g28gh for socket #25. Terminating connection. Error: WOPI::CheckFileInfo failed: | wsd/COOLWSD.cpp:4395
coolwsd[33563]: wsd-33563-34025 2022-05-14 14:29:08.779755 -0400 [ docbroker_006 ] WRN  Ignoring attempted read from 25| ./net/Socket.hpp:1102
coolwsd[33563]: wsd-33563-34025 2022-05-14 14:29:08.779794 -0400 [ docbroker_006 ] ERR  Invalid or unknown session [04c] to remove.| wsd/DocumentBroker.cpp:2200
coolwsd[33563]: wsd-33563-33572 2022-05-14 14:29:10.783131 -0400 [ prisoner_poll ] WRN  Prisoner connection disconnected but without valid socket.| wsd/COOLWSD.cpp:3070
coolwsd[33563]: wsd-33563-33572 2022-05-14 14:29:10.783329 -0400 [ prisoner_poll ] WRN  Prisoner connection disconnected but without valid socket.| wsd/COOLWSD.cpp:3070

Screenshot of the error in my web browser (chrome, version 101):
coolwsd-fail-screenshot

So I am encountering the classic collabora error of:
Document loading failed. Failed to load Nextcloud OFfice - please try again later

There are plenty of similar issues online, but it appears this is just the blanket error for anything going wrong with collabora.

I have read through those logs above, but I am unsure what conclusion to come to.
All the networking and web proxy’ing appears to be working as the wsd service is logging connections.

There are so many errors in that log:
read failed, have 0 buffered bytes (EPIPE: Broken pipe)
Socket write returned -1 (EPIPE: Broken pipe)
WOPI::CheckFileInfo failed
Storage error while starting session
Error while handling Client WS Request: Failed to create DocBroker with docKey
Prisoner connection disconnected but without valid socket.

I am hoping to get someone more familiar with the inner-workings of this software to comment on where my problem lies. These errors are very verbose, but I don’t know where to start looking.

Configuration files are below.

Nextcloud NGINX configuration:

upstream php-handler {
    server unix:/var/run/php/php7.4-fpm.sock;
}
server {
    listen 443 ssl http2;
    ssl_certificate /etc/letsencrypt/live/nextcloud.domain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/nextcloud.domain.com/privkey.pem;
    include snippets/ssl-params.conf;

    server_name nextcloud.domain.com;

    # set max upload size
    client_max_body_size 10512M;
    fastcgi_buffers 64 4K;

    # Enable gzip but do not remove ETag headers
    gzip on;
    gzip_vary on;
    gzip_comp_level 4;
    gzip_min_length 256;
    gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
    gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;

    # Pagespeed is not supported by Nextcloud, so if your server is built
    # with the `ngx_pagespeed` module, uncomment this line to disable it.
    #pagespeed off;

    # Remove X-Powered-By, which is an information leak
    fastcgi_hide_header X-Powered-By;

    root /var/www/nextcloud;
    index index.php index.html /index.php$request_uri;

    # Rule borrowed from `.htaccess` to handle Microsoft DAV clients
    location = / {
        if ( $http_user_agent ~ ^DavClnt ) {
            return 302 /remote.php/webdav/$is_args$args;
        }
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    # Make a regex exception for `/.well-known` so that clients can still
    # access it despite the existence of the regex rule
    # `location ~ /(\.|autotest|...)` which would otherwise handle requests
    # for `/.well-known`.
    location ^~ /.well-known {
        # The rules in this block are an adaptation of the rules
        # in `.htaccess` that concern `/.well-known`.

        location = /.well-known/carddav { return 301 /remote.php/dav/; }
        location = /.well-known/caldav  { return 301 /remote.php/dav/; }

        location /.well-known/acme-challenge    { try_files $uri $uri/ =404; }
        location /.well-known/pki-validation    { try_files $uri $uri/ =404; }

        # Let Nextcloud's API for `/.well-known` URIs handle all other
        # requests by passing them to the front-end controller.
        return 301 /index.php$request_uri;
    }

    # Rules borrowed from `.htaccess` to hide certain paths from clients
    location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/)  { return 404; }
    location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console)                { return 404; }

    location ~ \.php(?:$|/) {
        # Required for legacy support
        rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;

        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        set $path_info $fastcgi_path_info;

        try_files $fastcgi_script_name =404;

        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $path_info;
        fastcgi_param HTTPS on;

        fastcgi_param modHeadersAvailable true;         # Avoid sending the security headers twice
        fastcgi_param front_controller_active true;     # Enable pretty urls
        fastcgi_pass php-handler;

        fastcgi_intercept_errors on;
        fastcgi_request_buffering off;
    }
    location ~ \.(?:css|js|svg|gif|png|jpg|ico)$ {
        try_files $uri /index.php$request_uri;
        expires 6M;         # Cache-Control policy borrowed from `.htaccess`
        access_log off;     # Optional: Don't log access to assets
    }
    location ~ \.woff2?$ {
        try_files $uri /index.php$request_uri;
        expires 7d;         # Cache-Control policy borrowed from `.htaccess`
        access_log off;     # Optional: Don't log access to assets
    }
    location /remote {
        return 301 /remote.php$request_uri;
    }
    location / {
        try_files $uri $uri/ /index.php$request_uri;
    }
}

Coolwsd configuration file:

<!-- -*- nxml-child-indent: 4; tab-width: 4; indent-tabs-mode: nil -*- -->
<config>

    <!-- For more detailed documentation on typical configuration options please see:
         https://sdk.collaboraonline.com/docs/installation/Configuration.html -->

    <!-- Note: 'default' attributes are used to document a setting's default value as well as to use as fallback. -->
    <!-- Note: When adding a new entry, a default must be set in WSD in case the entry is missing upon deployment. -->

    <allowed_languages desc="List of supported languages of Writing Aids (spell checker, grammar checker, thesaurus, hyphenation) on this instance. Allowing too many has negative effect on startup performance." default="de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru">de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru</allowed_languages>

    <sys_template_path desc="Path to a template tree with shared libraries etc to be used as source for chroot jails for child processes." type="path" relative="true" default="systemplate"></sys_template_path>
    <child_root_path desc="Path to the directory under which the chroot jails for the child processes will be created. Should be on the same file system as systemplate and lotemplate. Must be an empty directory." type="path" relative="true" default="jails"></child_root_path>
    <mount_jail_tree desc="Controls whether the systemplate and lotemplate contents are mounted or not, which is much faster than the default of linking/copying each file." type="bool" default="true"></mount_jail_tree>

    <server_name desc="External hostname:port of the server running coolwsd. If empty, it's derived from the request (please set it if this doesn't work). May be specified when behind a reverse-proxy or when the hostname is not reachable directly." type="string" default="">office.domain.com:443</server_name>
    <file_server_root_path desc="Path to the directory that should be considered root for the file server. This should be the directory containing cool." type="path" relative="true" default="browser/../"></file_server_root_path>
    <hexify_embedded_urls desc="Enable to protect encoded URLs from getting decoded by intermediate hops. Particularly useful on Azure deployments" type="bool" default="false"></hexify_embedded_urls>

    <memproportion desc="The maximum percentage of system memory consumed by all of the Collabora Online Development Edition, after which we start cleaning up idle documents" type="double" default="80.0"></memproportion>
    <num_prespawn_children desc="Number of child processes to keep started in advance and waiting for new clients." type="uint" default="1">2</num_prespawn_children>
    <per_document desc="Document-specific settings, including LO Core settings.">
        <max_concurrency desc="The maximum number of threads to use while processing a document." type="uint" default="4">8</max_concurrency>
        <batch_priority desc="A (lower) priority for use by batch eg. convert-to processes to avoid starving interactive ones" type="uint" default="5">5</batch_priority>
        <document_signing_url desc="The endpoint URL of signing server, if empty the document signing is disabled" type="string" default=""></document_signing_url>
        <redlining_as_comments desc="If true show red-lines as comments" type="bool" default="false">false</redlining_as_comments>
        <pdf_resolution_dpi desc="The resolution, in DPI, used to render PDF documents as image. Memory consumption grows proportionally. Must be a positive value less than 385. Defaults to 96." type="uint" default="96">96</pdf_resolution_dpi>
        <idle_timeout_secs desc="The maximum number of seconds before unloading an idle document. Defaults to 1 hour." type="uint" default="3600">3600</idle_timeout_secs>
        <!-- Idle save and auto save are checked every 30 seconds -->
        <!-- They are disabled when the value is zero or negative. -->
        <idlesave_duration_secs desc="The number of idle seconds after which document, if modified, should be saved. Defaults to 30 seconds." type="int" default="30">30</idlesave_duration_secs>
        <autosave_duration_secs desc="The number of seconds after which document, if modified, should be saved. Defaults to 5 minutes." type="int" default="300">300</autosave_duration_secs>
        <always_save_on_exit desc="On exiting the last editor, always perform the save, even if the document is not modified." type="bool" default="false">false</always_save_on_exit>
        <limit_virt_mem_mb desc="The maximum virtual memory allowed to each document process. 0 for unlimited." type="uint">0</limit_virt_mem_mb>
        <limit_stack_mem_kb desc="The maximum stack size allowed to each document process. 0 for unlimited." type="uint">0</limit_stack_mem_kb>
        <limit_file_size_mb desc="The maximum file size allowed to each document process to write. 0 for unlimited." type="uint">0</limit_file_size_mb>
        <limit_num_open_files desc="The maximum number of files allowed to each document process to open. 0 for unlimited." type="uint">0</limit_num_open_files>
        <limit_load_secs desc="Maximum number of seconds to wait for a document load to succeed. 0 for unlimited." type="uint" default="100">100</limit_load_secs>
        <limit_store_failures desc="Maximum number of consecutive save-and-upload to storage failures when unloading the document. 0 for unlimited (not recommended)." type="uint" default="5">5</limit_store_failures>
        <limit_convert_secs desc="Maximum number of seconds to wait for a document conversion to succeed. 0 for unlimited." type="uint" default="100">100</limit_convert_secs>
        <cleanup desc="Checks for resource consuming (bad) documents and kills associated kit process. A document is considered resource consuming (bad) if is in idle state for idle_time_secs period and memory usage passed limit_dirty_mem_mb or CPU usage passed limit_cpu_per" enable="true">
            <cleanup_interval_ms desc="Interval between two checks" type="uint" default="10000">10000</cleanup_interval_ms>
            <bad_behavior_period_secs desc="Minimum time period for a document to be in bad state before associated kit process is killed. If in this period the condition for bad document is not met once then this period is reset" type="uint" default="60">60</bad_behavior_period_secs>
            <idle_time_secs desc="Minimum idle time for a document to be candidate for bad state" type="uint" default="300">300</idle_time_secs>
            <limit_dirty_mem_mb desc="Minimum memory usage for a document to be candidate for bad state" type="uint" default="3072">3072</limit_dirty_mem_mb>
            <limit_cpu_per desc="Minimum CPU usage for a document to be candidate for bad state" type="uint" default="85">85</limit_cpu_per>
            <lost_kit_grace_period_secs desc="The minimum grace period for a lost kit process (not referenced by coolwsd) to resolve its lost status before it is terminated. To disable the cleanup of lost kits use value 0" default="120">120</lost_kit_grace_period_secs>
        </cleanup>
    </per_document>

    <per_view desc="View-specific settings.">
        <group_download_as desc="If set to true, groups download as icons into a dropdown for the notebookbar view." type="bool" default="false">false</group_download_as>
        <out_of_focus_timeout_secs desc="The maximum number of seconds before dimming and stopping updates when the browser tab is no longer in focus. Defaults to 120 seconds." type="uint" default="120">120</out_of_focus_timeout_secs>
        <idle_timeout_secs desc="The maximum number of seconds before dimming and stopping updates when the user is no longer active (even if the browser is in focus). Defaults to 15 minutes." type="uint" default="900">900</idle_timeout_secs>
    </per_view>

    <ver_suffix desc="Appended to etags to allow easy refresh of changed files during development" type="string" default=""></ver_suffix>

    <logging>
        <color type="bool">true</color>
        <!--
             Note to developers: When you do "make run", the logging.level will be set on the
             coolwsd command line, so if you want to change it for your testing, do it in
             Makefile.am, not here.
        -->
        <level type="string" desc="Can be 0-8 (with the lowest numbers being the least verbose), or none (turns off logging), fatal, critical, error, warning, notice, information, debug, trace" default="warning">warning</level>
        <most_verbose_level_settable_from_client type="string" desc="A loggingleveloverride message from the client can not set a more verbose log level than this" default="notice">notice</most_verbose_level_settable_from_client>
        <least_verbose_level_settable_from_client type="string" desc="A loggingleveloverride message from a client can not set a less verbose log level than this" default="fatal">fatal</least_verbose_level_settable_from_client>
        <protocol type="bool" desc="Enable minimal client-site JS protocol logging from the start">false</protocol>
        <!-- lokit_sal_log example: Log WebDAV-related messages, that is interesting for debugging Insert - Image operation: "+TIMESTAMP+INFO.ucb.ucp.webdav+WARN.ucb.ucp.webdav"
             See also: https://docs.libreoffice.org/sal/html/sal_log.html -->
        <lokit_sal_log type="string" desc="Fine tune log messages from LOKit. Default is to suppress log messages from LOKit." default="-INFO-WARN">-INFO-WARN</lokit_sal_log>
        <file enable="false">
            <!-- If you use other path than /var/log and you run coolwsd from systemd, make sure that you enable that path in coolwsd.service (ReadWritePaths). -->
            <property name="path" desc="Log file path.">/var/log/coolwsd.log</property>
            <property name="rotation" desc="Log file rotation strategy. See Poco FileChannel.">never</property>
            <property name="archive" desc="Append either timestamp or number to the archived log filename.">timestamp</property>
            <property name="compress" desc="Enable/disable log file compression.">true</property>
            <property name="purgeAge" desc="The maximum age of log files to preserve. See Poco FileChannel.">10 days</property>
            <property name="purgeCount" desc="The maximum number of log archives to preserve. Use 'none' to disable purging. See Poco FileChannel.">10</property>
            <property name="rotateOnOpen" desc="Enable/disable log file rotation on opening.">true</property>
            <property name="flush" desc="Enable/disable flushing after logging each line. May harm performance. Note that without flushing after each line, the log lines from the different processes will not appear in chronological order.">false</property>
        </file>
        <anonymize>
            <anonymize_user_data type="bool" desc="Enable to anonymize/obfuscate of user-data in logs. If default is true, it was forced at compile-time and cannot be disabled." default="false">false</anonymize_user_data>
            <anonymization_salt type="uint" desc="The salt used to anonymize/obfuscate user-data in logs. Use a secret 64-bit random number." default="82589933">82589933</anonymization_salt>
        </anonymize>
        <docstats type="bool" desc="Enable to see document handling information in logs." default="false">false</docstats>
    </logging>

    <!--
         Note to developers: When you do "make run", the trace_event[@enable] will be set on the
         coolwsd command line, so if you want to change it for your testing, do it in Makefile.am,
         not here.
    -->
    <trace_event desc="The possibility to turn on generation of a Chrome Trace Event file" enable="false">
        <path desc="Output path for the Trace Event file, to which they will be written if turned on at run-time" type="string" default="/var/log/coolwsd.trace.json">/var/log/coolwsd.trace.json</path>
    </trace_event>

    <browser_logging desc="Logging in the browser console" default="false">false</browser_logging>

    <trace desc="Dump commands and notifications for replay. When 'snapshot' is true, the source file is copied to the path first." enable="false">
        <path desc="Output path to hold trace file and docs. Use '%' for timestamp to avoid overwriting. For example: /some/path/to/cooltrace-%.gz" compress="true" snapshot="false"></path>
        <filter>
            <message desc="Regex pattern of messages to exclude"></message>
        </filter>
        <outgoing>
            <record desc="Whether or not to record outgoing messages" default="false">false</record>
        </outgoing>
    </trace>

    <net desc="Network settings">
      <!-- On systems where localhost resolves to IPv6 [::1] address first, when net.proto is all and net.listen is loopback, coolwsd unexpectedly listens on [::1] only.
           You need to change net.proto to IPv4, if you want to use 127.0.0.1. -->
      <proto type="string" default="all" desc="Protocol to use IPv4, IPv6 or all for both">IPv4</proto>
      <listen type="string" default="any" desc="Listen address that coolwsd binds to. Can be 'any' or 'loopback'.">any</listen>
      <!-- this allows you to shift all of our URLs into a sub-path from
           https://my.com/browser/a123... to https://my.com/my/sub/path/browser/a123... -->
      <service_root type="path" default="" desc="Prefix all the pages, websockets, etc. with this path."></service_root>
      <post_allow desc="Allow/deny client IP address for POST(REST)." allow="true">
        <host desc="The IPv4 private 192.168 block as plain IPv4 dotted decimal addresses.">192\.168\.[0-9]{1,3}\.[0-9]{1,3}</host>
        <host desc="Ditto, but as IPv4-mapped IPv6 addresses">::ffff:192\.168\.[0-9]{1,3}\.[0-9]{1,3}</host>
        <host desc="The IPv4 loopback (localhost) address.">127\.0\.0\.1</host>
        <host desc="Ditto, but as IPv4-mapped IPv6 address">::ffff:127\.0\.0\.1</host>
        <host desc="The IPv6 loopback (localhost) address.">::1</host>
        <host desc="The IPv4 private 172.16.0.0/12 subnet part 1.">172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3}</host>
        <host desc="Ditto, but as IPv4-mapped IPv6 addresses">::ffff:172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3}</host>
        <host desc="The IPv4 private 172.16.0.0/12 subnet part 2.">172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3}</host>
        <host desc="Ditto, but as IPv4-mapped IPv6 addresses">::ffff:172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3}</host>
        <host desc="The IPv4 private 172.16.0.0/12 subnet part 3.">172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3}</host>
        <host desc="Ditto, but as IPv4-mapped IPv6 addresses">::ffff:172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3}</host>
        <host desc="The IPv4 private 10.0.0.0/8 subnet (Podman).">10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}</host>
        <host desc="Ditto, but as IPv4-mapped IPv6 addresses">::ffff:10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}</host>
      </post_allow>
      <frame_ancestors desc="Specify who is allowed to embed the Collabora Online iframe (coolwsd and WOPI host are always allowed). Separate multiple hosts by space."></frame_ancestors>
      <connection_timeout_secs desc="Specifies the connection, send, recv timeout in seconds for connections initiated by coolwsd (such as WOPI connections)." type="int" default="30"></connection_timeout_secs>

      <!-- this setting radically changes how online works, it should not be used in a production environment -->
      <proxy_prefix type="bool" default="false" desc="Enable a ProxyPrefix to be passed int through which to redirect requests"></proxy_prefix>
    </net>

    <ssl desc="SSL settings">
        <!-- switches from https:// + wss:// to http:// + ws:// -->
        <enable type="bool" desc="Controls whether SSL encryption between coolwsd and the network is enabled (do not disable for production deployment). If default is false, must first be compiled with SSL support to enable." default="true">true</enable>
        <!-- SSL off-load can be done in a proxy, if so disable SSL, and enable termination below in production -->
        <termination desc="Connection via proxy where coolwsd acts as working via https, but actually uses http." type="bool" default="true">false</termination>
        <cert_file_path desc="Path to the cert file" relative="false">/etc/coolwsd/cert.pem</cert_file_path>
        <key_file_path desc="Path to the key file" relative="false">/etc/coolwsd/key.pem</key_file_path>
        <ca_file_path desc="Path to the ca file" relative="false">/etc/coolwsd/ca-chain.cert.pem</ca_file_path>
        <cipher_list desc="List of OpenSSL ciphers to accept" default="ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"></cipher_list>
        <hpkp desc="Enable HTTP Public key pinning" enable="false" report_only="false">
            <max_age desc="HPKP's max-age directive - time in seconds browser should remember the pins" enable="true">1000</max_age>
            <report_uri desc="HPKP's report-uri directive - pin validation failure are reported at this URL" enable="false"></report_uri>
            <pins desc="Base64 encoded SPKI fingerprints of keys to be pinned">
            <pin></pin>
            </pins>
        </hpkp>
        <sts desc="Strict-Transport-Security settings, per rfc6797. Subdomains are always included.">
            <enabled desc="Whether or not Strict-Transport-Security is enabled. Enable only when ready for production. Cannot be disabled without resetting the browsers." type="bool" default="false">false</enabled>
            <max_age desc="Strict-Transport-Security max-age directive, in seconds. 0 is allowed; please see rfc6797 for details. Defaults to 1 year." type="int" default="31536000">31536000</max_age>
        </sts>
    </ssl>

    <security desc="Altering these defaults potentially opens you to significant risk">
      <seccomp desc="Should we use the seccomp system call filtering." type="bool" default="true">true</seccomp>
      <capabilities desc="Should we require capabilities to isolate processes into chroot jails" type="bool" default="true">true</capabilities>
      <jwt_expiry_secs desc="Time in seconds before the Admin Console's JWT token expires" type="int" default="1800">1800</jwt_expiry_secs>
      <enable_macros_execution desc="Specifies whether the macro execution is enabled in general. This will enable Basic, Beanshell, Javascript and Python scripts. If it is set to false, the macro_security_level is ignored. If it is set to true, the mentioned entry specified the level of macro security." type="bool" default="false">false</enable_macros_execution>
      <macro_security_level desc="Level of Macro security. 1 (Medium) Confirmation required before executing macros from untrusted sources. 0 (Low, not recommended) All macros will be executed without confirmation." type="int" default="1">1</macro_security_level>
      <enable_metrics_unauthenticated desc="When enabled, the /cool/getMetrics endpoint will not require authentication." type="bool" default="false">false</enable_metrics_unauthenticated>
    </security>

    <certificates>
      <database_path type="string" desc="Path to the NSS certificates that are used for signing documents" default=""></database_path>
    </certificates>

    <watermark>
      <opacity desc="Opacity of on-screen watermark from 0.0 to 1.0" type="double" default="0.2"></opacity>
      <text desc="Watermark text to be displayed on the document if entered" type="string"></text>
    </watermark>

    <welcome>
      <enable type="bool" desc="Controls whether the welcome screen should be shown to the users on new install and updates." default="true">true</enable>
      <enable_button type="bool" desc="Controls whether the welcome screen should have an explanatory button instead of an X button to close the dialog." default="false">false</enable_button>
      <path desc="Path to 'welcome-$lang.html' files served on first start or when the version changes. When empty, defaults to the Release notes." type="path" relative="true" default="browser/welcome"></path>
    </welcome>

    <user_interface>
      <mode type="string" desc="Controls the user interface style. The 'default' means: Take the value from ui_defaults, or decide for one of classic or notebookbar (default|classic|notebookbar)" default="default">default</mode>
      <use_integration_theme desc="Use theme from the integrator" type="bool" default="true">true</use_integration_theme>
    </user_interface>

    <storage desc="Backend storage">
        <filesystem allow="false" />
        <wopi desc="Allow/deny wopi storage." allow="true">
            <host desc="Regex pattern of hostname to allow or deny." allow="true">localhost</host>
            <host desc="Regex pattern of hostname to allow or deny." allow="true">10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}</host>
            <host desc="Regex pattern of hostname to allow or deny." allow="true">172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3}</host>
            <host desc="Regex pattern of hostname to allow or deny." allow="true">172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3}</host>
            <host desc="Regex pattern of hostname to allow or deny." allow="true">172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3}</host>
            <host desc="Regex pattern of hostname to allow or deny." allow="true">192\.168\.[0-9]{1,3}\.[0-9]{1,3}</host>
            <host desc="Regex pattern of hostname to allow or deny." allow="false">192\.168\.1\.1</host>
            <max_file_size desc="Maximum document size in bytes to load. 0 for unlimited." type="uint">0</max_file_size>
            <locking desc="Locking settings">
                <refresh desc="How frequently we should re-acquire a lock with the storage server, in seconds (default 15 mins) or 0 for no refresh" type="int" default="900">900</refresh>
            </locking>
        </wopi>
        <ssl desc="SSL settings">
            <as_scheme type="bool" default="true" desc="When set we exclusively use the WOPI URI's scheme to enable SSL for storage">true</as_scheme>
            <enable type="bool" desc="If as_scheme is false or not set, this can be set to force SSL encryption between storage and coolwsd. When empty this defaults to following the ssl.enable setting"></enable>
            <cert_file_path desc="Path to the cert file" relative="false"></cert_file_path>
            <key_file_path desc="Path to the key file" relative="false"></key_file_path>
            <ca_file_path desc="Path to the ca file. If this is not empty, then SSL verification will be strict, otherwise cert of storage (WOPI-like host) will not be verified." relative="false"></ca_file_path>
            <cipher_list desc="List of OpenSSL ciphers to accept. If empty the defaults are used. These can be overridden only if absolutely needed."></cipher_list>
        </ssl>
    </storage>

    <tile_cache_persistent desc="Should the tiles persist between two editing sessions of the given document?" type="bool" default="true">true</tile_cache_persistent>

    <admin_console desc="Web admin console settings.">
        <enable desc="Enable the admin console functionality" type="bool" default="true">true</enable>
        <enable_pam desc="Enable admin user authentication with PAM" type="bool" default="false">false</enable_pam>
        <username desc="The username of the admin console. Ignored if PAM is enabled.">REDACTED</username>
        <password desc="The password of the admin console. Deprecated on most platforms. Instead, use PAM or coolconfig to set up a secure password.">REDACTED</password>
    </admin_console>

    <monitors desc="Addresses of servers we connect to on start for monitoring">
    </monitors>

    <quarantine_files desc="Files are stored here to be examined later in cases of crashes or similar situation." default="false" enable="false">
        <limit_dir_size_mb desc="Maximum directory size. On exceeding the specified limit, older files will be deleted." default="250" type="uint"></limit_dir_size_mb>
        <max_versions_to_maintain desc="How many versions of the same file to keep." default="2" type="uint"></max_versions_to_maintain>
        <path desc="Path to directory under which quarantined files will be stored" type="path" relative="true" default="quarantine"></path>
        <expiry_min desc="Time in mins after quarantined files will be deleted." type="int" default="30"></expiry_min>
    </quarantine_files> 
</config>

Coolwsd NGINX configuration file:

server {
        listen 443 ssl http2;
        ssl_certificate /etc/letsencrypt/live/office.domain.com/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/office.domain.com/privkey.pem; # managed by Certbot
        include snippets/ssl-params.conf;
        server_name office.domain.com;
        # static files
        location ^~ /browser {
                proxy_pass https://127.0.0.1:9980;
                proxy_set_header Host $http_host;
                proxy_set_header X-Real-IP $remote_addr;
        }
        # WOPI discovery URL
        location ^~ /hosting/discovery {
                proxy_pass https://127.0.0.1:9980;
                proxy_set_header Host $http_host;
                proxy_set_header X-Real-IP $remote_addr;
        }
        # Capabilities
        location ^~ /hosting/capabilities {
                proxy_pass https://127.0.0.1:9980;
                proxy_set_header Host $http_host;
                proxy_set_header X-Real-IP $remote_addr;
        }
        # main websocket
        location ~ ^/cool/(.*)/ws$ {
                proxy_pass https://127.0.0.1:9980;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "Upgrade";
                proxy_set_header Host $http_host;
                proxy_read_timeout 36000s;
                proxy_set_header X-Real-IP $remote_addr;
        }
        # download, presentation and image upload
        location ~ ^/(c|l)ool {
                proxy_pass https://127.0.0.1:9980;
                proxy_set_header Host $http_host;
                proxy_set_header X-Real-IP $remote_addr;
        }
        # Admin Console websocket
        location ^~ /cool/adminws {
                proxy_pass https://127.0.0.1:9980;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "Upgrade";
                proxy_set_header Host $http_host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_read_timeout 36000s;
        }
}
 ll /etc/coolwsd/
total 84
923481  4 drwxr-xr-x  2 root root  4096 May 14 14:34 .
917505  4 drwxr-xr-x 84 root root  4096 May 14 14:22 ..
920671  4 -rw-r--r--  1 cool cool  2037 Mar 13 13:58 ca-chain.cert.pem
921286  4 -rw-r--r--  1 root root  2037 Mar 13 14:02 cert.pem
923500  8 -rw-r--r--  1 root root  5736 Mar  1 16:40 coolkitconfig.xcu
923501 24 -rw-r-----  1 cool cool 24370 Mar 13 16:41 coolwsd.xml
925362 24 -rw-r-----  1 cool cool 24254 May  2 16:21 coolwsd.xml.dpkg-dist
925363  4 -rw-------  1 cool cool  3272 Mar 13 14:00 key.pem
925364  4 -rw-------  1 cool cool  2455 Mar 13 13:37 proof_key
925365  4 -rw-r--r--  1 root root   565 Mar 13 13:37 proof_key.pub

If this is too technical for this forum, let me know. I can cross-post this onto Collabora’s github page.

Coolwsd config doesn’t seem to match with the coolwsd version ( 21.11.4.2-1). Where did you get this from?
I suggest to do SSL termination at nginx reverse proxy to not makes things too complicated (coolwsd seems to be on the same host anyways, right!?).
You could also enable logging in coolwsd config to double check the errors.

After using the collabora repo https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-debian11 and installing coolwsd, that was the default xml file that came with it.

I did install coolwsd last year, and the coolwsd package has been updated since.

Are there options in there that are no longer supported? What caught your eye?

The logs I posted above are from the coolwsd process, will enabling logging in the config output anything more?

And with each update you most probably got a note that the config file was updated from the maintainer… just look into your config folder and have a look at the latest version of the default config.
You’ll find the documentation for the config at the developer page: https://sdk.collaboraonline.com/docs/installation/Configuration.html

Other than that I would recommend to do SSL termination at the reverse proxy… make things a lot easier.

If all that is too complicated, maybe it would be a first step to start with a docker container and use one of the many howtos out there.

Not too complicated at all, I dislike docker because I enjoy getting hands on with the actual configurations and doing the building “by hand”.

In order to make sure everything is compatible, I’ve switch over to the new xml config file.

Problem is the document still fails to load, but with even less logs (checking from the coolwsd service stdout):

May 17 17:04:07 coolwsd[69595]: Ready to accept connections on port 9980.
May 17 17:06:30 coolwsd[69595]: wsd-69595-69618 2022-05-17 17:06:30.626457 -0400 [ websrv_poll ] ERR  FileServerRequestHandler: File not found: Invalid URI request: [/browser/3eff190/nextcloud/branding.css].| wsd/FileServer.cpp:689
May 17 17:06:30 coolwsd[69595]: wsd-69595-69618 2022-05-17 17:06:30.632173 -0400 [ websrv_poll ] ERR  FileServerRequestHandler: File not found: Invalid URI request: [/browser/3eff190/nextcloud/branding.js].| wsd/FileServer.cpp:689
May 17 17:06:30 coolwsd[69595]: wsd-69595-69618 2022-05-17 17:06:30.656374 -0400 [ websrv_poll ] ERR  FileServerRequestHandler: File not found: Invalid URI request: [/browser/3eff190/branding-desktop.css].| wsd/FileServer.cpp:689
May 17 17:06:30 coolwsd[69595]: wsd-69595-69685 2022-05-17 17:06:30.686995 -0400 [ docbroker_001 ] WRN  Waking up dead poll thread [HttpSynReqPoll], started: false, finished: false| ./net/Socket.hpp:720
May 17 17:06:30 coolwsd[69595]: wsd-69595-69685 2022-05-17 17:06:30.820264 -0400 [ docbroker_001 ] WRN  Waking up dead poll thread [HttpSynReqPoll], started: false, finished: false| ./net/Socket.hpp:720
May 17 17:07:03 coolwsd[69595]: wsd-69595-69685 2022-05-17 17:07:03.230050 -0400 [ docbroker_001 ] WRN  Ignoring attempted read from 27| ./net/Socket.hpp:1102
May 17 17:07:03 coolwsd[69595]: wsd-69595-69603 2022-05-17 17:07:03.245771 -0400 [ prisoner_poll ] WRN  Prisoner connection disconnected but without valid socket.| wsd/COOLWSD.cpp:3070

From collabora’s installation docs, they say to test with curl. Which appears to succeeds and returns a large list of document types.

# curl -v https://office.domain.com/hosting/discovery
*   Trying REVPROXYIP:443...
* Connected to office.domain.com (REVPROXYIP) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=office.domain.com
*  start date: May 12 21:01:09 2022 GMT
*  expire date: Aug 10 21:01:08 2022 GMT
*  subjectAltName: host "office.domain.com" matched cert's "office.domain.com"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x5596ff94c5c0)
> GET /hosting/discovery HTTP/2
> Host: office.domain.com
> user-agent: curl/7.74.0
> accept: */*
> 
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 200 
< server: nginx
< date: Tue, 17 May 2022 21:21:51 GMT
< content-type: text/xml
< content-length: 33806
< last-modified: Tue, 17 May 2022 21:21:51
< x-content-type-options: nosniff
< allow: GET, POST, HEAD
< 
<wopi-discovery>
    <net-zone name="external-http">
        ...........
        <!-- End of legacy MIME-type actions -->

        <app name="Capabilities">
            <action ext="" name="getinfo" urlsrc="https://office.domain.com:443/hosting/capabilities"/>
        </app>
    </net-zone>
<!-- -*- nxml-child-indent: 4; tab-width: 4; indent-tabs-mode: nil -*- -->
<config>

    <!-- For more detailed documentation on typical configuration options please see:
         https://sdk.collaboraonline.com/docs/installation/Configuration.html -->

    <!-- Note: 'default' attributes are used to document a setting's default value as well as to use as fallback. -->
    <!-- Note: When adding a new entry, a default must be set in WSD in case the entry is missing upon deployment. -->

    <allowed_languages desc="List of supported languages of Writing Aids (spell checker, grammar checker, thesaurus, hyphenation) on this instance. Allowing too many has negative effect on startup performance." default="de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru">de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru</allowed_languages>

    <sys_template_path desc="Path to a template tree with shared libraries etc to be used as source for chroot jails for child processes." type="path" relative="true" default="systemplate"></sys_template_path>
    <child_root_path desc="Path to the directory under which the chroot jails for the child processes will be created. Should be on the same file system as systemplate and lotemplate. Must be an empty directory." type="path" relative="true" default="jails"></child_root_path>
    <mount_jail_tree desc="Controls whether the systemplate and lotemplate contents are mounted or not, which is much faster than the default of linking/copying each file." type="bool" default="true"></mount_jail_tree>

    <server_name desc="External hostname:port of the server running coolwsd. If empty, it's derived from the request (please set it if this doesn't work). May be specified when behind a reverse-proxy or when the hostname is not reachable directly." type="string" default="">office.domain.com:443</server_name>
    <file_server_root_path desc="Path to the directory that should be considered root for the file server. This should be the directory containing cool." type="path" relative="true" default="browser/../"></file_server_root_path>
    <hexify_embedded_urls desc="Enable to protect encoded URLs from getting decoded by intermediate hops. Particularly useful on Azure deployments" type="bool" default="false"></hexify_embedded_urls>
    <experimental_features desc="Enable/Disable experimental features" type="bool" default="false">false</experimental_features>

    <memproportion desc="The maximum percentage of system memory consumed by all of the Collabora Online Development Edition, after which we start cleaning up idle documents" type="double" default="80.0"></memproportion>
    <num_prespawn_children desc="Number of child processes to keep started in advance and waiting for new clients." type="uint" default="1">2</num_prespawn_children>
    <per_document desc="Document-specific settings, including LO Core settings.">
        <max_concurrency desc="The maximum number of threads to use while processing a document." type="uint" default="4">4</max_concurrency>
        <batch_priority desc="A (lower) priority for use by batch eg. convert-to processes to avoid starving interactive ones" type="uint" default="5">5</batch_priority>
        <document_signing_url desc="The endpoint URL of signing server, if empty the document signing is disabled" type="string" default=""></document_signing_url>
        <redlining_as_comments desc="If true show red-lines as comments" type="bool" default="false">false</redlining_as_comments>
        <pdf_resolution_dpi desc="The resolution, in DPI, used to render PDF documents as image. Memory consumption grows proportionally. Must be a positive value less than 385. Defaults to 96." type="uint" default="96">96</pdf_resolution_dpi>
        <idle_timeout_secs desc="The maximum number of seconds before unloading an idle document. Defaults to 1 hour." type="uint" default="3600">3600</idle_timeout_secs>
        <!-- Idle save and auto save are checked every 30 seconds -->
        <!-- They are disabled when the value is zero or negative. -->
        <idlesave_duration_secs desc="The number of idle seconds after which document, if modified, should be saved. Defaults to 30 seconds." type="int" default="30">30</idlesave_duration_secs>
        <autosave_duration_secs desc="The number of seconds after which document, if modified, should be saved. Defaults to 5 minutes." type="int" default="300">300</autosave_duration_secs>
        <always_save_on_exit desc="On exiting the last editor, always perform the save, even if the document is not modified." type="bool" default="false">false</always_save_on_exit>
        <limit_virt_mem_mb desc="The maximum virtual memory allowed to each document process. 0 for unlimited." type="uint">0</limit_virt_mem_mb>
        <limit_stack_mem_kb desc="The maximum stack size allowed to each document process. 0 for unlimited." type="uint">8000</limit_stack_mem_kb>
        <limit_file_size_mb desc="The maximum file size allowed to each document process to write. 0 for unlimited." type="uint">0</limit_file_size_mb>
        <limit_num_open_files desc="The maximum number of files allowed to each document process to open. 0 for unlimited." type="uint">0</limit_num_open_files>
        <limit_load_secs desc="Maximum number of seconds to wait for a document load to succeed. 0 for unlimited." type="uint" default="100">100</limit_load_secs>
        <limit_store_failures desc="Maximum number of consecutive save-and-upload to storage failures when unloading the document. 0 for unlimited (not recommended)." type="uint" default="5">5</limit_store_failures>
        <limit_convert_secs desc="Maximum number of seconds to wait for a document conversion to succeed. 0 for unlimited." type="uint" default="100">100</limit_convert_secs>
        <cleanup desc="Checks for resource consuming (bad) documents and kills associated kit process. A document is considered resource consuming (bad) if is in idle state for idle_time_secs period and memory usage passed limit_dirty_mem_mb or CPU usage passed limit_cpu_per" enable="true">
            <cleanup_interval_ms desc="Interval between two checks" type="uint" default="10000">10000</cleanup_interval_ms>
            <bad_behavior_period_secs desc="Minimum time period for a document to be in bad state before associated kit process is killed. If in this period the condition for bad document is not met once then this period is reset" type="uint" default="60">60</bad_behavior_period_secs>
            <idle_time_secs desc="Minimum idle time for a document to be candidate for bad state" type="uint" default="300">300</idle_time_secs>
            <limit_dirty_mem_mb desc="Minimum memory usage for a document to be candidate for bad state" type="uint" default="3072">3072</limit_dirty_mem_mb>
            <limit_cpu_per desc="Minimum CPU usage for a document to be candidate for bad state" type="uint" default="85">85</limit_cpu_per>
            <lost_kit_grace_period_secs desc="The minimum grace period for a lost kit process (not referenced by coolwsd) to resolve its lost status before it is terminated. To disable the cleanup of lost kits use value 0" default="120">120</lost_kit_grace_period_secs>
        </cleanup>
    </per_document>

    <per_view desc="View-specific settings.">
        <group_download_as desc="If set to true, groups download as icons into a dropdown for the notebookbar view." type="bool" default="false">false</group_download_as>
        <out_of_focus_timeout_secs desc="The maximum number of seconds before dimming and stopping updates when the browser tab is no longer in focus. Defaults to 120 seconds." type="uint" default="120">120</out_of_focus_timeout_secs>
        <idle_timeout_secs desc="The maximum number of seconds before dimming and stopping updates when the user is no longer active (even if the browser is in focus). Defaults to 15 minutes." type="uint" default="900">900</idle_timeout_secs>
    </per_view>

    <ver_suffix desc="Appended to etags to allow easy refresh of changed files during development" type="string" default=""></ver_suffix>

    <logging>
        <color type="bool">true</color>
        <!--
             Note to developers: When you do "make run", the logging.level will be set on the
             coolwsd command line, so if you want to change it for your testing, do it in
             Makefile.am, not here.
        -->
        <level type="string" desc="Can be 0-8 (with the lowest numbers being the least verbose), or none (turns off logging), fatal, critical, error, warning, notice, information, debug, trace" default="warning">warning</level>
        <most_verbose_level_settable_from_client type="string" desc="A loggingleveloverride message from the client can not set a more verbose log level than this" default="notice">notice</most_verbose_level_settable_from_client>
        <least_verbose_level_settable_from_client type="string" desc="A loggingleveloverride message from a client can not set a less verbose log level than this" default="fatal">fatal</least_verbose_level_settable_from_client>
        <protocol type="bool" desc="Enable minimal client-site JS protocol logging from the start">false</protocol>
        <!-- lokit_sal_log example: Log WebDAV-related messages, that is interesting for debugging Insert - Image operation: "+TIMESTAMP+INFO.ucb.ucp.webdav+WARN.ucb.ucp.webdav"
             See also: https://docs.libreoffice.org/sal/html/sal_log.html -->
        <lokit_sal_log type="string" desc="Fine tune log messages from LOKit. Default is to suppress log messages from LOKit." default="-INFO-WARN">-INFO-WARN</lokit_sal_log>
        <file enable="false">
            <!-- If you use other path than /var/log and you run coolwsd from systemd, make sure that you enable that path in coolwsd.service (ReadWritePaths). -->
            <property name="path" desc="Log file path.">/var/log/coolwsd.log</property>
            <property name="rotation" desc="Log file rotation strategy. See Poco FileChannel.">never</property>
            <property name="archive" desc="Append either timestamp or number to the archived log filename.">timestamp</property>
            <property name="compress" desc="Enable/disable log file compression.">true</property>
            <property name="purgeAge" desc="The maximum age of log files to preserve. See Poco FileChannel.">10 days</property>
            <property name="purgeCount" desc="The maximum number of log archives to preserve. Use 'none' to disable purging. See Poco FileChannel.">10</property>
            <property name="rotateOnOpen" desc="Enable/disable log file rotation on opening.">true</property>
            <property name="flush" desc="Enable/disable flushing after logging each line. May harm performance. Note that without flushing after each line, the log lines from the different processes will not appear in chronological order.">false</property>
        </file>
        <anonymize>
            <anonymize_user_data type="bool" desc="Enable to anonymize/obfuscate of user-data in logs. If default is true, it was forced at compile-time and cannot be disabled." default="false">false</anonymize_user_data>
            <anonymization_salt type="uint" desc="The salt used to anonymize/obfuscate user-data in logs. Use a secret 64-bit random number." default="82589933">82589933</anonymization_salt>
        </anonymize>
        <docstats type="bool" desc="Enable to see document handling information in logs." default="false">false</docstats>
    </logging>

    <!--
         Note to developers: When you do "make run", the trace_event[@enable] will be set on the
         coolwsd command line, so if you want to change it for your testing, do it in Makefile.am,
         not here.
    -->
    <trace_event desc="The possibility to turn on generation of a Chrome Trace Event file" enable="false">
        <path desc="Output path for the Trace Event file, to which they will be written if turned on at run-time" type="string" default="/var/log/coolwsd.trace.json">/var/log/coolwsd.trace.json</path>
    </trace_event>

    <browser_logging desc="Logging in the browser console" default="false">false</browser_logging>

    <trace desc="Dump commands and notifications for replay. When 'snapshot' is true, the source file is copied to the path first." enable="false">
        <path desc="Output path to hold trace file and docs. Use '%' for timestamp to avoid overwriting. For example: /some/path/to/cooltrace-%.gz" compress="true" snapshot="false"></path>
        <filter>
            <message desc="Regex pattern of messages to exclude"></message>
        </filter>
        <outgoing>
            <record desc="Whether or not to record outgoing messages" default="false">false</record>
        </outgoing>
    </trace>

    <net desc="Network settings">
      <!-- On systems where localhost resolves to IPv6 [::1] address first, when net.proto is all and net.listen is loopback, coolwsd unexpectedly listens on [::1] only.
           You need to change net.proto to IPv4, if you want to use 127.0.0.1. -->
      <proto type="string" default="all" desc="Protocol to use IPv4, IPv6 or all for both">IPv4</proto>
      <listen type="string" default="any" desc="Listen address that coolwsd binds to. Can be 'any' or 'loopback'.">any</listen>
      <!-- this allows you to shift all of our URLs into a sub-path from
           https://my.com/browser/a123... to https://my.com/my/sub/path/browser/a123... -->
      <service_root type="path" default="" desc="Prefix all the pages, websockets, etc. with this path."></service_root>
      <post_allow desc="Allow/deny client IP address for POST(REST)." allow="true">
        <host desc="The IPv4 private 192.168 block as plain IPv4 dotted decimal addresses.">192\.168\.[0-9]{1,3}\.[0-9]{1,3}</host>
        <host desc="The IPv4 loopback (localhost) address.">127\.0\.0\.1</host>
        <host desc="The IPv4 private 172.16.0.0/12 subnet part 1.">172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3}</host>
        <host desc="The IPv4 private 172.16.0.0/12 subnet part 2.">172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3}</host>
        <host desc="The IPv4 private 172.16.0.0/12 subnet part 3.">172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3}</host>
        <host desc="The IPv4 private 10.0.0.0/8 subnet (Podman).">10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}</host>
      </post_allow>
      <frame_ancestors desc="Specify who is allowed to embed the Collabora Online iframe (coolwsd and WOPI host are always allowed). Separate multiple hosts by space."></frame_ancestors>
      <connection_timeout_secs desc="Specifies the connection, send, recv timeout in seconds for connections initiated by coolwsd (such as WOPI connections)." type="int" default="30"></connection_timeout_secs>

      <!-- this setting radically changes how online works, it should not be used in a production environment -->
      <proxy_prefix type="bool" default="false" desc="Enable a ProxyPrefix to be passed int through which to redirect requests"></proxy_prefix>
    </net>

    <ssl desc="SSL settings">
        <!-- switches from https:// + wss:// to http:// + ws:// -->
        <enable type="bool" desc="Controls whether SSL encryption between coolwsd and the network is enabled (do not disable for production deployment). If default is false, must first be compiled with SSL support to enable." default="true">true</enable>
        <!-- SSL off-load can be done in a proxy, if so disable SSL, and enable termination below in production -->
        <termination desc="Connection via proxy where coolwsd acts as working via https, but actually uses http." type="bool" default="true">false</termination>
        <cert_file_path desc="Path to the cert file" relative="false">/etc/coolwsd/cert.pem</cert_file_path>
        <key_file_path desc="Path to the key file" relative="false">/etc/coolwsd/key.pem</key_file_path>
        <ca_file_path desc="Path to the ca file" relative="false">/etc/coolwsd/ca-chain.cert.pem</ca_file_path>
        <cipher_list desc="List of OpenSSL ciphers to accept" default="ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"></cipher_list>
        <hpkp desc="Enable HTTP Public key pinning" enable="false" report_only="false">
            <max_age desc="HPKP's max-age directive - time in seconds browser should remember the pins" enable="true">1000</max_age>
            <report_uri desc="HPKP's report-uri directive - pin validation failure are reported at this URL" enable="false"></report_uri>
            <pins desc="Base64 encoded SPKI fingerprints of keys to be pinned">
            <pin></pin>
            </pins>
        </hpkp>
        <sts desc="Strict-Transport-Security settings, per rfc6797. Subdomains are always included.">
            <enabled desc="Whether or not Strict-Transport-Security is enabled. Enable only when ready for production. Cannot be disabled without resetting the browsers." type="bool" default="false">false</enabled>
            <max_age desc="Strict-Transport-Security max-age directive, in seconds. 0 is allowed; please see rfc6797 for details. Defaults to 1 year." type="int" default="31536000">31536000</max_age>
        </sts>
    </ssl>

    <security desc="Altering these defaults potentially opens you to significant risk">
      <seccomp desc="Should we use the seccomp system call filtering." type="bool" default="true">true</seccomp>
      <capabilities desc="Should we require capabilities to isolate processes into chroot jails" type="bool" default="true">true</capabilities>
      <jwt_expiry_secs desc="Time in seconds before the Admin Console's JWT token expires" type="int" default="1800">1800</jwt_expiry_secs>
      <enable_macros_execution desc="Specifies whether the macro execution is enabled in general. This will enable Basic, Beanshell, Javascript and Python scripts. If it is set to false, the macro_security_level is ignored. If it is set to true, the mentioned entry specified the level of macro security." type="bool" default="false">false</enable_macros_execution>
      <macro_security_level desc="Level of Macro security. 1 (Medium) Confirmation required before executing macros from untrusted sources. 0 (Low, not recommended) All macros will be executed without confirmation." type="int" default="1">1</macro_security_level>
      <enable_metrics_unauthenticated desc="When enabled, the /cool/getMetrics endpoint will not require authentication." type="bool" default="false">false</enable_metrics_unauthenticated>
    </security>

    <certificates>
      <database_path type="string" desc="Path to the NSS certificates that are used for signing documents" default=""></database_path>
    </certificates>

    <watermark>
      <opacity desc="Opacity of on-screen watermark from 0.0 to 1.0" type="double" default="0.2"></opacity>
      <text desc="Watermark text to be displayed on the document if entered" type="string"></text>
    </watermark>


    <user_interface>
      <mode type="string" desc="Controls the user interface style. The 'default' means: Take the value from ui_defaults, or decide for one of compact or tabbed (default|compact|tabbed)" default="default">default</mode>
      <use_integration_theme desc="Use theme from the integrator" type="bool" default="true">true</use_integration_theme>
    </user_interface>

    <storage desc="Backend storage">
        <filesystem allow="false" />
        <wopi desc="Allow/deny wopi storage." allow="true">
            <max_file_size desc="Maximum document size in bytes to load. 0 for unlimited." type="uint">0</max_file_size>
            <locking desc="Locking settings">
                <refresh desc="How frequently we should re-acquire a lock with the storage server, in seconds (default 15 mins) or 0 for no refresh" type="int" default="900">900</refresh>
            </locking>

            <alias_groups desc="default mode is 'first' it allows only the first host when groups are not defined. set mode to 'groups' and define group to allow multiple host and its aliases" mode="first">
            <!-- If you need to use multiple wopi hosts, please change the mode to "groups" and
                    add the hosts below.  If one host is accessible under multiple ip addresses
                    or names, add them as aliases. -->
            <!--<group>
                    <host desc="hostname to allow or deny." allow="true">scheme://hostname:port</host>
                    <alias desc="regex pattern of aliasname">scheme://aliasname1:port</alias>
                    <alias desc="regex pattern of aliasname">scheme://aliasname2:port</alias>
            </group>-->
            <!-- More "group"s possible here -->
            </alias_groups>

        </wopi>
        <ssl desc="SSL settings">
            <as_scheme type="bool" default="true" desc="When set we exclusively use the WOPI URI's scheme to enable SSL for storage">true</as_scheme>
            <enable type="bool" desc="If as_scheme is false or not set, this can be set to force SSL encryption between storage and coolwsd. When empty this defaults to following the ssl.enable setting"></enable>
            <cert_file_path desc="Path to the cert file" relative="false"></cert_file_path>
            <key_file_path desc="Path to the key file" relative="false"></key_file_path>
            <ca_file_path desc="Path to the ca file. If this is not empty, then SSL verification will be strict, otherwise cert of storage (WOPI-like host) will not be verified." relative="false"></ca_file_path>
            <cipher_list desc="List of OpenSSL ciphers to accept. If empty the defaults are used. These can be overridden only if absolutely needed."></cipher_list>
        </ssl>
    </storage>

    <tile_cache_persistent desc="Should the tiles persist between two editing sessions of the given document?" type="bool" default="true">true</tile_cache_persistent>

    <admin_console desc="Web admin console settings.">
        <enable desc="Enable the admin console functionality" type="bool" default="true">true</enable>
        <enable_pam desc="Enable admin user authentication with PAM" type="bool" default="false">false</enable_pam>
        <username desc="The username of the admin console. Ignored if PAM is enabled.">xxxxxxxxxx</username>
        <password desc="The password of the admin console. Deprecated on most platforms. Instead, use PAM or coolconfig to set up a secure password.">xxxxxxxxxxxx</password>
    </admin_console>

    <monitors desc="Addresses of servers we connect to on start for monitoring">
    </monitors>

    <quarantine_files desc="Files are stored here to be examined later in cases of crashes or similar situation." default="false" enable="false">
        <limit_dir_size_mb desc="Maximum directory size. On exceeding the specified limit, older files will be deleted." default="250" type="uint"></limit_dir_size_mb>
        <max_versions_to_maintain desc="How many versions of the same file to keep." default="2" type="uint"></max_versions_to_maintain>
        <path desc="Path to directory under which quarantined files will be stored" type="path" relative="true" default="quarantine"></path>
        <expiry_min desc="Time in mins after quarantined files will be deleted." type="int" default="30"></expiry_min>
    </quarantine_files>

    <remote_config>
        <remote_url desc="remote server to which you will send resquest to get remote config in response" type="string" default=""></remote_url>
    </remote_config>

    <remote_font_config>
        <url desc="URL of optional JSON file that lists fonts to be included in Online" type="string" default=""></url>
    </remote_font_config>
</config>