Tuesday, September 25, 2012

Using Cloudbees behind a proxy

At work, we are sitting behind a proxy. This can be pretty annoying if you have to use services that require the internet, but don't rely on your internet settings. For example Maven, which can be configured using it's settings.xml file, or the Cloudbees SDK.

That last one is a bit trickier to use behind a proxy. There is no obvious settings.xml or properties file where you can define your proxy server. The solution, however, is very simple. Go to your Cloudbees SDK root folder, and edit the bees.bat file. Change the JAVA_OPTS to the following:
JAVA_OPTS=-Dbees.home=%BEES_HOME% -Dhttp.proxyHost=<your proxy host> -Dhttp.proxyPort=<your proxy port> -Xmx256m
Save the changes, and when you run the bees command from the console now, it will use your proxy settings. Easy as that!


  1. Stijn, have you tried setting up in your bees.config? https://wiki.cloudbees.com/bin/view/RUN/BeesSDK#HRunningbehindaproxy

    thanks for using CloudBees!


    1. Thanks for the reply, Sacha.

      Yes, I found that wiki-page. But if you download Cloudbees SDK, and run it the first time from behind a proxy, no .bees folder is created. It attepmts to download a config file, but isn't able to because of the proxy.

      After the initial config has been created, you can use the bees.config approach.

  2. Hi Stijn,

    I think it works with using > bees init --proxyHost=YOUR_PROXY_HOST --proxyPort=YOUR_PROXY_PORT ? Anyway I would like to know are there any tricks to use CLoudbees plugin for Eclipse behind proxy as it is not worked here.