# Can i run logstash without conf file, all conf data in command line?

**URL:** https://discuss.elastic.co/t/can-i-run-logstash-without-conf-file-all-conf-data-in-command-line/111205
**Category:** Logstash
**Created:** [December 12, 2017, 1:14am UTC](https://discuss.elastic.co/t/can-i-run-logstash-without-conf-file-all-conf-data-in-command-line/111205 "2017-12-12T01:14:27Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![rkhapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rkhapre/32/48333_2.png) [@rkhapre](https://discuss.elastic.co/u/rkhapre)
#### Post date: [December 12, 2017, 1:14am UTC](https://discuss.elastic.co/t/can-i-run-logstash-without-conf-file-all-conf-data-in-command-line/111205/1 "2017-12-12T01:14:27Z")

</div>

Hi All

Can i run logstash without conf file, all conf data in command line?  
I am using multiple conf files, for which it is hard for me to maintain these small conf files in server.

I am looking a way wherein i can use command line flag to provide all the string of conf file itself

I checked the documentation, it says there is a command for it " **`-e, --config.string CONFIG_STRING`**"

instead of calling the conf files by providing location in command line, can i paste directly the input,filter and output of conf file in command?

logstash.bat --debug -e " here copy paste conf file data"

but this is not working for me. Please let me know if my assumption for --e command is correct?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [December 12, 2017, 3:10am UTC](https://discuss.elastic.co/t/can-i-run-logstash-without-conf-file-all-conf-data-in-command-line/111205/2 "2017-12-12T03:10:23Z")

</div>

> [@rkhapre](#):
>
> logstash.bat --debug -e " here copy paste conf file data"
> 
> but this is not working for me. Please let me know if my assumption for --e command is correct?

Please be more explicit, not working how? Are you getting errors? What are they? What version are you on?

---

<div class="post-metadata">

### Author: ![rkhapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rkhapre/32/48333_2.png) [@rkhapre](https://discuss.elastic.co/u/rkhapre)
#### Post date: [December 12, 2017, 9:25am UTC](https://discuss.elastic.co/t/can-i-run-logstash-without-conf-file-all-conf-data-in-command-line/111205/3 "2017-12-12T09:25:01Z")

</div>

I am using logstash 5.2.2  
I get error as

`Unknown command '{'`  
which is starting point of conf file.

Do i have to provide the escape in each string?.

All i am interested is, if this is possible with command line, if yes please suggest example

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [December 13, 2017, 9:08pm UTC](https://discuss.elastic.co/t/can-i-run-logstash-without-conf-file-all-conf-data-in-command-line/111205/4 "2017-12-13T21:08:47Z")

</div>

Please show the command you are running.

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [December 14, 2017, 7:10am UTC](https://discuss.elastic.co/t/can-i-run-logstash-without-conf-file-all-conf-data-in-command-line/111205/5 "2017-12-14T07:10:51Z")

</div>

If you have multiple logically separated configs, Logstash 6.x now supports [configuration of multiple pipelines](https://www.elastic.co/blog/logstash-multiple-pipelines), which can simplify deployments and cut down on the amount of conditionals required to control flow.

---

<div class="post-metadata">

### Author: ![rkhapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rkhapre/32/48333_2.png) [@rkhapre](https://discuss.elastic.co/u/rkhapre)
#### Post date: [December 17, 2017, 10:28am UTC](https://discuss.elastic.co/t/can-i-run-logstash-without-conf-file-all-conf-data-in-command-line/111205/6 "2017-12-17T10:28:52Z")

</div>

Thanks for your replies.  
Sorry my late response, actually i dont want to use any physical files, i want to run the pipeline just with service.

Is that possible?

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [December 17, 2017, 11:46am UTC](https://discuss.elastic.co/t/can-i-run-logstash-without-conf-file-all-conf-data-in-command-line/111205/7 "2017-12-17T11:46:27Z")

</div>

I have never tried passing anything complex that way. I think that option was added as an easy way to get started, not necessarily to handle large and complex configurations.

---

<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: [January 14, 2018, 11:46am UTC](https://discuss.elastic.co/t/can-i-run-logstash-without-conf-file-all-conf-data-in-command-line/111205/8 "2018-01-14T11:46:41Z")

</div>

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