Qodana 2026.1 Help

Running behind a proxy server

Depending on your needs, you can run Qodana behind a proxy server using an existing Qodana Docker image, or create a Docker image from scratch.

Follow these steps to prepare an existing Qodana Docker image to run behind a proxy server:

  1. Create the proxy.settings.xml file and save it in the .qodana directory of your project root.

  2. In the proxy.settings.xml file, save information about the proxy server that will be used by Qodana:

    <application> <component name="HttpConfigurable"> <option name="USE_HTTP_PROXY" value="true" /> <option name="PROXY_HOST" value="<ProxyHost>" /> <option name="PROXY_PORT" value="<ProxyPort>" /> <!-- Add more settings as needed --> </component> </application>
  3. In the qodana.yaml file, save this boostrap command that will copy the proxy.settings.xml file to a Qodana Docker image:

    boostrap: cp .qodana/proxy.settings.xml /root/.config/idea/options/proxy.settings.xml
  4. Run Qodana using proxy server settings specified in the JAVA_TOOL_OPTIONS environment variable:

    docker run \ -v $(pwd):/data/project/ \ -e JAVA_TOOL_OPTIONS="-Dhttps.proxyHost=<ProxyHost> -Dhttps.proxyPort=<ProxyPort> -Dhttp.proxyHost=<ProxyHost> -Dhttp.proxyPort=<ProxyPort>" \ -e QODANA_TOKEN="<cloud-project-token>" \ jetbrains/qodana-<image>
    qodana scan \ -e JAVA_TOOL_OPTIONS="-Dhttps.proxyHost=<ProxyHost> -Dhttps.proxyPort=<ProxyPort> -Dhttp.proxyHost=<ProxyHost> -Dhttp.proxyPort=<ProxyPort>" \ -e QODANA_TOKEN="<cloud-project-token>"
    pipeline { environment { QODANA_TOKEN=credentials('qodana-token') } agent { docker { args ''' -v "${WORKSPACE}":/data/project -e JAVA_TOOL_OPTIONS="-Dhttps.proxyHost=<ProxyHost> -Dhttps.proxyPort=<ProxyPort> -Dhttp.proxyHost=<ProxyHost> -Dhttp.proxyPort=<ProxyPort> " --entrypoint="" ''' image 'jetbrains/qodana-<image>' } } stages { stage('Qodana') { steps { sh ''' qodana ''' } } } }
      image: atlassian/default-image:4   pipelines:   branches:     main:       - step:           name: Qodana           caches:             - qodana           image: jetbrains/qodana-<image> # Specify a Qodana linter here. For example, jetbrains/qodana-jvm:latest           script:             - export QODANA_TOKEN=$QODANA_TOKEN # Export the environment variable             - export JAVA_TOOL_OPTIONS="-Dhttps.proxyHost=<ProxyHost> -Dhttps.proxyPort=<ProxyPort> -Dhttp.proxyHost=<ProxyHost> -Dhttp.proxyPort=<ProxyPort>"             - qodana --results-dir=$BITBUCKET_CLONE_DIR/.qodana --report-dir=$BITBUCKET_CLONE_DIR/.qodana/report --cache-dir=~/.qodana/cache           artifacts:             - .qodana/report   definitions:   caches:     qodana: .qodana/cache

To create your custom Qodana image containing proxy server settings, follow this procedure:

  1. Create the proxy.settings.xml file and save proxy server settings in it:

    <application> <component name="HttpConfigurable"> <option name="USE_HTTP_PROXY" value="true" /> <option name="PROXY_HOST" value="<ProxyHost>" /> <option name="PROXY_PORT" value="<ProxyPort>" /> <!-- Add more settings as needed --> </component> </application>
  2. Use this sample to create the Dockerfile:

    FROM docker.io/jetbrains/qodana-<image>:2025.3<-eap> LABEL version="1.0.0"   ##Copy the proxy.settings.xml file COPY proxy.settings.xml /root/.config/idea/options/proxy.settings.xml   ##Copy the gradle.properties file (optional) COPY gradle.properties ~/.gradle/gradle.properties   ##Install certificates COPY <your_certificate> <path_to_certificate> RUN $JAVA_HOME/bin/keytool -import -trustcacerts -alias dc-ca -keystore $JAVA_HOME/lib/security/cacerts -noprompt -storepass changeit -file <path_to_certificate> COPY <your_certificate> /etc/ssl/certs RUN chmod 444 /etc/ssl/certs/<your_certificate>   ##Set proxy ENV http_proxy <proxy> ENV https_proxy <proxy> ENV HTTP_PROXY <proxy> ENV HTTPS_PROXY <proxy> ENV ftp_proxy $http_proxy ENV dns_proxy $http_proxy ENV rsync_proxy $http_proxy
  3. Run Qodana using proxy server settings configured in the JAVA_TOOL_OPTIONS environment variable:

    docker run \ -v $(pwd):/data/project/ \ -e JAVA_TOOL_OPTIONS="-Dhttps.proxyHost=<ProxyHost> -Dhttps.proxyPort=<ProxyPort> -Dhttp.proxyHost=<ProxyHost> -Dhttp.proxyPort=<ProxyPort>" \ -e QODANA_TOKEN="<cloud-project-token>" \ <image>
    qodana scan \ -e JAVA_TOOL_OPTIONS="-Dhttps.proxyHost=<ProxyHost> -Dhttps.proxyPort=<ProxyPort> -Dhttp.proxyHost=<ProxyHost> -Dhttp.proxyPort=<ProxyPort>" \ -e QODANA_TOKEN="<cloud-project-token>" \ --image <image>
    pipeline { environment { QODANA_TOKEN=credentials('qodana-token') } agent { docker { args ''' -v "${WORKSPACE}":/data/project -e JAVA_TOOL_OPTIONS="-Dhttps.proxyHost=<ProxyHost> -Dhttps.proxyPort=<ProxyPort> -Dhttp.proxyHost=<ProxyHost> -Dhttp.proxyPort=<ProxyPort> " --entrypoint="" ''' image '<image>' } } stages { stage('Qodana') { steps { sh ''' qodana ''' } } } }
      image: atlassian/default-image:4   pipelines:   branches:     main:       - step:           name: Qodana           caches:             - qodana           image: jetbrains/qodana-<image> # Specify a Qodana linter here. For example, jetbrains/qodana-jvm:latest           script:             - export QODANA_TOKEN=$QODANA_TOKEN # Export the environment variable             - export JAVA_TOOL_OPTIONS="-Dhttps.proxyHost=<ProxyHost> -Dhttps.proxyPort=<ProxyPort> -Dhttp.proxyHost=<ProxyHost> -Dhttp.proxyPort=<ProxyPort>"             - qodana --results-dir=$BITBUCKET_CLONE_DIR/.qodana --report-dir=$BITBUCKET_CLONE_DIR/.qodana/report --cache-dir=~/.qodana/cache           artifacts:             - .qodana/report   definitions:   caches:     qodana: .qodana/cache
27 February 2026