# How to setup a proxy in logstash using Windows?

**URL:** <https://discuss.elastic.co/t/how-to-setup-a-proxy-in-logstash-using-windows/354259>\
**Category:** Logstash\
**Created:** [February 27, 2024, 5:08pm UTC](https://discuss.elastic.co/t/how-to-setup-a-proxy-in-logstash-using-windows/354259 "2024-02-27T17:08:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcalvillo](https://avatars.discourse-cdn.com/v4/letter/t/49beb7/32.png) [@tcalvillo](https://discuss.elastic.co/u/tcalvillo)\
**Post date:** [February 27, 2024, 5:08pm UTC](https://discuss.elastic.co/t/how-to-setup-a-proxy-in-logstash-using-windows/354259/1 "2024-02-27T17:08:50Z")

</div>

Hello Logstash team,

I successfully installed and started Logstash on Windows server 2016. My issue is that I use a proxy and, when I try to see a list of plugins in bin using the below command:

`C:\Logstash\logstash-8.12.1\bin> .\logstash-plugin list`

I edited **C:/Logstash/logstash-8.12.1/lib/pluginmanager/proxy\_support** by adding:

```auto
set HTTP_PROXY=http://proxy.sec.private.nameofmycompany.io:80
set HTTPS_PROXY=https://proxy.sec.private.nameofmycompany.io:80

```

I get the error:

```auto
"Using bundled JDK: C:\Logstash\logstash-8.12.1\jdk\bin\java.exe"
SyntaxError: C:/Logstash/logstash-8.12.1/lib/pluginmanager/proxy_support.rb:26: syntax error, unexpected symbol literal
set HTTP_PROXY=http://proxy.sec.private.nameofmycompany.io
                    ^
  require at org/jruby/RubyKernel.java:1071
  require at C:/Logstash/logstash-8.12.1/vendor/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:85
   <main> at C:\Logstash\logstash-8.12.1\lib\pluginmanager\main.rb:41

```

Before I attempted editing **http.rb** by adding the below but didn't work:

```auto
set HTTP_PROXY=http://proxy.sec.private.nameofmycompany.io:80
set HTTPS_PROXY=https://proxy.sec.private.nameofmycompany.io:80

```

I tried as well editing **jvm.options** to include the proxy settings:

```auto
-DproxyHost=proxy.sec.private.nameofmycompany.io
-DproxyPort=80

```

I also tried using:

`LS_JAVA_OPTS=-Dhttp.proxyHost=proxy.sec.private.nameofmycompany.io -Dhttp.proxyPort=80`

`SET JRUBY_OPTS="-J-Dhttp.proxyHost=proxy.sec.private.nameofmycompany.io -J-Dhttp.proxyPort=80 -J-Dhttps.proxyHost=proxy.sec.private.nameofmycompany.io -J-Dhttps.proxyPort=80"`

Any of these solutions seemed to work. Any help will be appreciated. thanks

Regards,  
Tizi

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 26, 2024, 5:09pm UTC](https://discuss.elastic.co/t/how-to-setup-a-proxy-in-logstash-using-windows/354259/2 "2024-03-26T17:09:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
