# Logstash Proxy Credentials

**URL:** <https://discuss.elastic.co/t/logstash-proxy-credentials/352414>\
**Category:** Logstash\
**Created:** [February 2, 2024, 2:56pm UTC](https://discuss.elastic.co/t/logstash-proxy-credentials/352414 "2024-02-02T14:56:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elk-user-0001](https://avatars.discourse-cdn.com/v4/letter/e/e47774/32.png) [@elk-user-0001](https://discuss.elastic.co/u/elk-user-0001)\
**Post date:** [February 2, 2024, 2:56pm UTC](https://discuss.elastic.co/t/logstash-proxy-credentials/352414/1 "2024-02-02T14:56:02Z")

</div>

Good afternoon colleagues!

I have a logstash service in local and an elastic server in cloud.

To reach it via curl I need to set `--proxy https://proxy:8080` and `--proxy-user 'user\moreusername:password'` .

How can I do the same in logstash at general configuration level ?

jvm.options  
logstash.service  
env vars  
etc...

Any help would be much appreciated!  
Best regards

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [February 2, 2024, 5:38pm UTC](https://discuss.elastic.co/t/logstash-proxy-credentials/352414/2 "2024-02-02T17:38:19Z")

</div>

Can you try:  
`SET LS_JAVA_OPTS=-Dhttp.proxyHost=<host> -Dhttp.proxyPort=<port> -Dhttp.proxyUser=<username> -Dhttp.proxyPassword=<pass>`

For HTTPS proxy should be  
-Dhttps.proxyHost=\< host \>...

Also you should be able to use this settings in jvm.options

> The `LS_JAVA_OPTS` environment variable can also be used to override JVM settings in the `jvm.options` file [settings file](https://www.elastic.co/guide/en/logstash/current/config-setting-files.html#settings-files). The content of this variable is additive to options configured in the `jvm.options` file, and will override any settings that exist in both places.

Disclaimer: I don't have where to try to make sure this is correct.

---

<div class="post-metadata">

**Author:** ![elk-user-0001](https://avatars.discourse-cdn.com/v4/letter/e/e47774/32.png) [@elk-user-0001](https://discuss.elastic.co/u/elk-user-0001)\
**Post date:** [February 5, 2024, 9:22am UTC](https://discuss.elastic.co/t/logstash-proxy-credentials/352414/3 "2024-02-05T09:22:33Z")

</div>

Thank you so much Rios!

i'll try it and i tell you if it works!

Kind Regards

---

<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 4, 2024, 9:23am UTC](https://discuss.elastic.co/t/logstash-proxy-credentials/352414/4 "2024-03-04T09:23:20Z")

</div>

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