We already have an entreprise license for the Document Server. Currently we are using v7.0.1 in our Production but now we are trying to upgrade our setup to the latest v9.4.1. We are trying to integrate this on another server running our staging environment and facing following issue connecting to the Document Server service.
Issue Description:
- Browser console shows WebSocket connection failures:
WebSocket connection to 'wss://docsprep.rlducm.com/9.4.1-gskjdgfhgfjhgdjhgfjhf/doc/-167700000/c/?shardkey=-167700000&EIO=4&transport=websocket' failed - No error messages appear in Network tab (status shows as “Finished” with empty Messages)
- All static resources (including
api.js) load correctly via HTTPS
Environment:
- Windows Server 2025
- OnlyOffice Document Server version: 9.4.1 (Windows installation)
- Reverse Proxy: IIS 10.0 with Application Request Routing (ARR) 3.0 (version 7.1.05311.2309)
- Setup: OnlyOffice running on
localhost:5050, proxied through IIS with SSL termination athttps://docsprep.rlducm.com
Current Configuration:
web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<webSocket enabled="true" />
<rewrite>
<rules>
<rule name="INIT_SERVER_VARIABLE_FROM_PROXY" stopProcessing="false">
<match url=".*" />
<serverVariables>
<set name="HTTP_THE_SCHEME" value="{HTTP_X_FORWARDED_PROTO}" replace="true" />
<set name="HTTP_THE_HOST" value="{HTTP_X_FORWARDED_HOST}" replace="true" />
</serverVariables>
<action type="None" />
</rule>
<rule name="INIT_SERVER_VARIABLE_DEFAULT" stopProcessing="false">
<match url=".*" />
<conditions trackAllCaptures="true">
<add input="{HTTPS}s" pattern="on(s)|offs" />
</conditions>
<serverVariables>
<set name="HTTP_THE_SCHEME" value="http{C:1}" replace="false" />
<set name="HTTP_THE_HOST" value="{HTTP_HOST}" replace="false" />
</serverVariables>
<action type="None" />
</rule>
<rule name="DocumentServerRewrite" enabled="true">
<match url="(.*)" />
<conditions trackAllCaptures="true">
<add input="{HTTPS}s" pattern="on(s)|offs" />
</conditions>
<serverVariables>
<set name="HTTP_X_FORWARDED_PROTO" value="{HTTP_THE_SCHEME}" replace="true" />
<set name="HTTP_X_FORWARDED_HOST" value="{HTTP_THE_HOST}" replace="true" />
</serverVariables>
<action type="Rewrite" url="http://localhost:5050/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
IIS Server Variables Registered:
HTTP_X_FORWARDED_PROTOHTTP_X_FORWARDED_HOSTHTTP_THE_SCHEMEHTTP_THE_HOST
ARR Proxy Settings:
enabled: TruepreserveHostHeader: TruereverseRewriteHostInResponseHeaders: TruehttpVersion: PassThrough
What we’ve tried so far:
- Followed official OnlyOffice IIS proxy configuration from
document-server-proxy/iis/proxy-to-virtual-pathbut modified it slightly because our installation is at the root of the site and not under a virtual path. We used following link for the IIS config: Official Github link to IIS reverse proxy setting - Verified WebSocket protocol is installed on Windows Server.
- Registered all required IIS server variables for forwarded headers.
- Attempted to add dedicated WebSocket rewrite rules (caused
api.jsto fail withERR_BLOCKED_BY_ORB)