Wiki source code of XWiki behind a Proxy Server

Last modified by Eleni Cojocariu on 2026/05/28 16:18

Show last authors
1 If your XWiki installation is running behind a proxy server, it will likely fail to search for or install extensions, as the [[Extension Manager>>extensions:Extension.Extension Manager Application]] relies on [[remote repositories>>||anchor="HWhydosomeextensionsfailtoloadwhenusingaproxythatrestrictsInternetaccess3F"]] for this. As a result, you may see ##connection refused## exceptions in the log files.
2
3 === Cause ===
4
5 This happens because XWiki, by default, cannot access the internet through the proxy without proper configuration.
6
7 === Solution ===
8
9 To configure XWiki to work behind a proxy, you need to add the relevant proxy properties/settings to your system environment. XWiki uses the default Java proxy configuration via Apache HttpClient. For more details, refer to the [[Java Networking and Proxies documentation>>https://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html]].
10
11 * If you [[installed XWiki using Tomcat 8+>>documentation.xs.admin.installation.methods.install-xwiki-war.configure-servlet-container.configure-tomcat.WebHome]]:(((
12 1. Open the {{code language="none"}}setenv.sh{{/code}} (for Linux/Unix) or {{code language="none"}}setenv.bat{{/code}} (for Windows) file from your Tomcat installation’s {{code language="none"}}bin{{/code}} directory with an editor and add:(((
13 * For Linux/Unix: {{code language="none"}}CATALINA_OPTS="$CATALINA_OPTS -Dhttp.proxyHost=proxy.mycompany.com -Dhttp.proxyPort=7777 -Dhttps.proxyHost=proxy.mycompany.com -Dhttps.proxyPort=7777"{{/code}}
14 * For Windows: {{code language="none"}}set CATALINA_OPTS=%CATALINA_OPTS% -Dhttp.proxyHost=proxy.mycompany.com -Dhttp.proxyPort=7777 -Dhttps.proxyHost=proxy.mycompany.com -Dhttps.proxyPort=7777{{/code}}
15 )))
16 1. Restart Tomcat.
17 )))For more tips and configuration options, see the ##RUNNING.txt## / ##RUNNING.md## file from the Tomcat distribution.
18 * If you [[installed a standalone (demo) distribution>>documentation.xs.admin.installation.methods.install-standalone-demo-distribution.WebHome]]:(((
19 1. Open the {{code language="none"}}start_xwiki.bat{{/code}} (for Windows) or {{code language="none"}}start_xwiki.sh{{/code}} (for Linux/Unix) with an editor and add:(((
20 * For Linux/Unix: {{code language="none"}}XWIKI_OPTS="$XWIKI_OPTS -Dhttp.proxyHost=proxy.mycompany.com -Dhttp.proxyPort=7777 -Dhttps.proxyHost=proxy.mycompany.com -Dhttps.proxyPort=7777"{{/code}}
21 * For Windows: {{code language="none"}}set XWIKI_OPTS=%XWIKI_OPTS% -Dhttp.proxyHost=proxy.mycompany.com -Dhttp.proxyPort=7777{{/code}}
22 )))
23 1. Restart XWiki.
24 )))

Get Connected