-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathagent-environment-variables.html
801 lines (779 loc) · 37.9 KB
/
agent-environment-variables.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>Elastic Agent environment variables | Fleet and Elastic Agent Guide [8.18] | Elastic</title>
<meta class="elastic" name="content" content="Elastic Agent environment variables | Fleet and Elastic Agent Guide [8.18]">
<link rel="home" href="index.html" title="Fleet and Elastic Agent Guide [8.18]"/>
<link rel="up" href="install-elastic-agents-in-containers.html" title="Install Elastic Agents in a containerized environment"/>
<link rel="prev" href="ingest-pipeline-kubernetes.html" title="Using a custom ingest pipeline with the Kubernetes Integration"/>
<link rel="next" href="otel-agent.html" title="Run Elastic Agent as an OTel Collector"/>
<meta class="elastic" name="product_version" content="8.18"/>
<meta class="elastic" name="product_name" content="Fleet and Elastic Agent"/>
<meta class="elastic" name="website_area" content="documentation"/>
<meta name="DC.type" content="Learn/Docs/Fleet/Guide/Elastic Agent/8.18"/>
<meta name="DC.subject" content="Fleet and Elastic Agent"/>
<meta name="DC.identifier" content="8.18"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdn.optimizely.com/js/18132920325.js"></script>
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/manifest.json">
<meta name="apple-mobile-web-app-title" content="Elastic">
<meta name="application-name" content="Elastic">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
<meta name="theme-color" content="#ffffff">
<meta name="naver-site-verification" content="936882c1853b701b3cef3721758d80535413dbfd" />
<meta name="yandex-verification" content="d8a47e95d0972434" />
<meta name="localized" content="true" />
<meta name="st:robots" content="follow,index" />
<meta property="og:image" content="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt280217a63b82a734/6202d3378b1f312528798412/elastic-logo.svg" />
<meta property="og:image:width" content="500" />
<meta property="og:image:height" content="172" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon-precomposed" sizes="64x64" href="/favicon_64x64_16bit.png">
<link rel="apple-touch-icon-precomposed" sizes="32x32" href="/favicon_32x32.png">
<link rel="apple-touch-icon-precomposed" sizes="16x16" href="/favicon_16x16.png">
<!-- Give IE8 a fighting chance -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/guide/static/styles-v1.css" />
</head>
<!--© 2015-2025 Elasticsearch B.V. -->
<!-- All Elastic documentation is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. -->
<!-- http://creativecommons.org/licenses/by-nc-nd/4.0/ -->
<body>
<!-- Google Tag Manager -->
<script>dataLayer = [];</script><noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-58RLH5" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-58RLH5');</script>
<!-- End Google Tag Manager -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-12395217-16"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-12395217-16');
</script>
<!-- Google Tag Manager for GA4 -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-KNJMG2M');</script>
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KNJMG2M" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager for GA4-->
<div id='elastic-nav' style="display:none;"></div>
<script src='https://www.elastic.co/elastic-nav.js'></script>
<div class="main-container">
<section id="content" >
<div class="content-wrapper">
<section id="guide" lang="en">
<div class="container-fluid">
<div class="row pb-3">
<div class="col-12 order-2 col-md-4 order-md-1 col-lg-3 h-almost-full-md sticky-top-md" id="left_col">
<!-- The TOC is appended here -->
</div>
<div class="col-12 order-1 col-md-8 order-md-2 col-lg-7 order-lg-2 guide-section" id="middle_col">
<!-- start body -->
<div class="navheader">
<span class="prev">
<a href="ingest-pipeline-kubernetes.html">« Using a custom ingest pipeline with the Kubernetes Integration</a>
</span>
<span class="next">
<a href="otel-agent.html">Run Elastic Agent as an OTel Collector »</a>
</span>
</div>
<div class="book" lang="en">
<div class="titlepage">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="/guide/">Elastic Docs</a></span>
<span class="chevron-right">›</span><span class="breadcrumb-link"><a href="index.html">Fleet and Elastic Agent Guide [8.18]</a></span>
<span class="chevron-right">›</span><span class="breadcrumb-link"><a href="elastic-agent-installation.html">Install Elastic Agents</a></span>
<span class="chevron-right">›</span><span class="breadcrumb-link"><a href="install-elastic-agents-in-containers.html">Install Elastic Agents in a containerized environment</a></span>
</div>
<div>
<div><h1 class="title"><a id="id-1"></a>Elastic Agent environment variables</h1><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/env/container-envs.asciidoc">edit</a></div>
</div>
<!--EXTRA-->
</div>
<div id="content">
<div id="url-to-v3" class="version-warning">
A newer version is available. Check out the <a href="https://www.elastic.co/docs/reference/fleet/agent-environment-variables">latest documentation</a>.
</div>
<div class="section">
<div class="titlepage"><div><div>
<div class="position-relative"><h3 class="title"><a id="agent-environment-variables"></a>Elastic Agent environment variables</h3><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/env/container-envs.asciidoc">edit</a></div>
</div></div></div>
<p>Use environment variables to configure Elastic Agent when running in a containerized environment.
Variables on this page are grouped by action type:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<a class="xref" href="agent-environment-variables.html#env-common-vars" title="Common variables">Common variables</a>
</li>
<li class="listitem">
<a class="xref" href="agent-environment-variables.html#env-prepare-kibana-for-fleet" title="Prepare Kibana for Fleet">Configure Kibana:</a> prepare the Fleet plugin in Kibana
</li>
<li class="listitem">
<a class="xref" href="agent-environment-variables.html#env-bootstrap-fleet-server" title="Bootstrap Fleet Server">Configure Fleet Server:</a> bootstrap Fleet Server on an Elastic Agent
</li>
<li class="listitem">
<a class="xref" href="agent-environment-variables.html#env-enroll-agent" title="Enroll Elastic Agent">Configure Elastic Agent and Fleet:</a> enroll an Elastic Agent
</li>
</ul>
</div>
<div class="position-relative"><h4><a id="env-common-vars"></a>Common variables</h4><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/env/container-envs.asciidoc">edit</a></div>
<p>To limit the number of environment variables that need to be set,
the following common variables are available.
These variables can be used across all Elastic Agent actions,
but have a lower precedence than action-specific environment variables.</p>
<p>These common variables are useful, for example, when using the same Elasticsearch and Kibana credentials
to prepare the Fleet plugin in Kibana, configure Fleet Server, and enroll an Elastic Agent.</p>
<div class="informaltable">
<table border="1" cellpadding="4px">
<colgroup>
<col class="col_1"/>
<col class="col_2"/>
</colgroup>
<thead>
<tr>
<th align="left" valign="top">
Settings
</th>
<th align="left" valign="top">
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">
<p><a id="env-common-elasticsearch-host"></a><code class="literal">ELASTICSEARCH_HOST</code></p>
</td>
<td align="left" valign="top">
<p>(string) The Elasticsearch host to communicate with.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">http://elasticsearch:9200</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-common-elasticsearch-username"></a><code class="literal">ELASTICSEARCH_USERNAME</code></p>
</td>
<td align="left" valign="top">
<p>(string) The basic authentication username used to connect to Kibana and retrieve a <code class="literal">service_token</code> for Fleet.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">elastic</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-common-elasticsearch-password"></a><code class="literal">ELASTICSEARCH_PASSWORD</code></p>
</td>
<td align="left" valign="top">
<p>(string) The basic authentication password used to connect to Kibana and retrieve a <code class="literal">service_token</code> for Fleet.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">changeme</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-common-elasticsearch-ca"></a><code class="literal">ELASTICSEARCH_CA</code></p>
</td>
<td align="left" valign="top">
<p>(string) The path to a certificate authority.</p>
<p>By default, Elastic Agent uses the list of trusted certificate authorities (CA) from the operating
system where it is running.
If the certificate authority that signed your node certificates is not in the host system’s
trusted certificate authorities list, use this config to add the path to the <code class="literal">.pem</code> file that
contains your CA’s certificate.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">""</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-common-kibana-host"></a><code class="literal">KIBANA_HOST</code></p>
</td>
<td align="left" valign="top">
<p>(string) The Kibana host.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">http://kibana:5601</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env=common-kibana-username"></a><code class="literal">KIBANA_USERNAME</code></p>
</td>
<td align="left" valign="top">
<p>(string) The basic authentication username used to connect to Kibana to retrieve a
<code class="literal">service_token</code>.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">elastic</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env=common-kibana-password"></a><code class="literal">KIBANA_PASSWORD</code></p>
</td>
<td align="left" valign="top">
<p>(string) The basic authentication password used to connect to Kibana to retrieve a
<code class="literal">service_token</code>.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">changeme</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-common-kibana-ca"></a><code class="literal">KIBANA_CA</code></p>
</td>
<td align="left" valign="top">
<p>(string) The path to a certificate authority.</p>
<p>By default, Elastic Agent uses the list of trusted certificate authorities (CA) from the operating
system where it is running.
If the certificate authority that signed your node certificates is not in the host system’s
trusted certificate authorities list, use this config to add the path to the <code class="literal">.pem</code> file that
contains your CA’s certificate.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">""</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-common-elastic-netinfo"></a><code class="literal">ELASTIC_NETINFO</code></p>
</td>
<td align="left" valign="top">
<p>(bool) When <code class="literal">false</code>, disables <code class="literal">netinfo.enabled</code> parameter of <code class="literal">add_host_metadata</code> processor.
Setting this to <code class="literal">false</code> is recommended for large scale setups where the host.ip and host.mac fields index size increases.</p>
<p>By default, Elastic Agent initializes the <code class="literal">add_host_metadata</code> processor. The <code class="literal">netinfo.enabled</code> parameter defines ingestion of IP addresses and MAC addresses as fields <code class="literal">host.ip</code> and <code class="literal">host.mac</code>.
For more information see <a class="xref" href="add_host_metadata-processor.html" title="Add Host metadata">add_host_metadata</a></p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">"false"</code></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="position-relative"><h4><a id="env-prepare-kibana-for-fleet"></a>Prepare Kibana for Fleet</h4><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/env/container-envs.asciidoc">edit</a></div>
<p>Settings used to prepare the Fleet plugin in Kibana.</p>
<div class="informaltable">
<table border="1" cellpadding="4px">
<colgroup>
<col class="col_1"/>
<col class="col_2"/>
</colgroup>
<thead>
<tr>
<th align="left" valign="top">
Settings
</th>
<th align="left" valign="top">
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">
<p><a id="env-fleet-kib-kibana-fleet-host"></a><code class="literal">KIBANA_FLEET_HOST</code></p>
</td>
<td align="left" valign="top">
<p>(string) The Kibana host to enable Fleet on.
Overrides <code class="literal">FLEET_HOST</code> when set.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">http://kibana:5601</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-fleet-kib-kibana-fleet-username"></a><code class="literal">KIBANA_FLEET_USERNAME</code></p>
</td>
<td align="left" valign="top">
<p>(string) The basic authentication username used to connect to Kibana and retrieve a <code class="literal">service_token</code> to enable Fleet.
Overrides <code class="literal">ELASTICSEARCH_USERNAME</code> when set.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">elastic</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-fleet-kib-kibana-fleet-password"></a><code class="literal">KIBANA_FLEET_PASSWORD</code></p>
</td>
<td align="left" valign="top">
<p>(string) The basic authentication password used to connect to Kibana and retrieve a <code class="literal">service_token</code> to enable Fleet.
Overrides <code class="literal">ELASTICSEARCH_PASSWORD</code> when set.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">changeme</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-fleet-kib-kibana-fleet-ca"></a><code class="literal">KIBANA_FLEET_CA</code></p>
</td>
<td align="left" valign="top">
<p>(string) The path to a certificate authority. Overrides <code class="literal">KIBANA_CA</code> when set.</p>
<p>By default, Elastic Agent uses the list of trusted certificate authorities (CA) from the operating
system where it is running.
If the certificate authority that signed your node certificates is not in the host system’s
trusted certificate authorities list, use this config to add the path to the <code class="literal">.pem</code> file that
contains your CA’s certificate.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">""</code></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="position-relative"><h4><a id="env-bootstrap-fleet-server"></a>Bootstrap Fleet Server</h4><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/env/container-envs.asciidoc">edit</a></div>
<p>Settings used to bootstrap Fleet Server on this Elastic Agent.
At least one Fleet Server is required in a deployment.</p>
<div class="informaltable">
<table border="1" cellpadding="4px">
<colgroup>
<col class="col_1"/>
<col class="col_2"/>
</colgroup>
<thead>
<tr>
<th align="left" valign="top">
Settings
</th>
<th align="left" valign="top">
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-enable"></a><code class="literal">FLEET_SERVER_ENABLE</code></p>
</td>
<td align="left" valign="top">
<p>(int) Set to <code class="literal">1</code> to bootstrap Fleet Server on this Elastic Agent.
When set to <code class="literal">1</code>, this automatically forces Fleet enrollment as well.</p>
<p><span class="strong strong"><strong>Default:</strong></span> none</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-elasticsearch-host"></a><code class="literal">FLEET_SERVER_ELASTICSEARCH_HOST</code></p>
</td>
<td align="left" valign="top">
<p>(string) The Elasticsearch host for Fleet Server to communicate with.
Overrides <code class="literal">ELASTICSEARCH_HOST</code> when set.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">http://elasticsearch:9200</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-elasticsearch-ca"></a><code class="literal">FLEET_SERVER_ELASTICSEARCH_CA</code></p>
</td>
<td align="left" valign="top">
<p>(string) The path to a certificate authority. Overrides <code class="literal">ELASTICSEARCH_CA</code> when set.</p>
<p>By default, Elastic Agent uses the list of trusted certificate authorities (CA) from the operating
system where it is running.
If the certificate authority that signed your node certificates is not in the host system’s
trusted certificate authorities list, use this config to add the path to the <code class="literal">.pem</code> file that
contains your CA’s certificate.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">""</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-es-cert"></a><code class="literal">FLEET_SERVER_ES_CERT</code></p>
</td>
<td align="left" valign="top">
<p>(string) The path to the mutual TLS client certificate that Fleet Server will use to connect to Elasticsearch.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">""</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-es-cert-key"></a><code class="literal">FLEET_SERVER_ES_CERT_KEY</code></p>
</td>
<td align="left" valign="top">
<p>(string) The path to the mutual TLS private key that Fleet Server will use to connect to Elasticsearch.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">""</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-insecure-http"></a><code class="literal">FLEET_SERVER_INSECURE_HTTP</code></p>
</td>
<td align="left" valign="top">
<p>(bool) When <code class="literal">true</code>, Fleet Server is exposed over insecure or unverified HTTP.
Setting this to <code class="literal">true</code> is not recommended.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">false</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-service-token"></a><code class="literal">FLEET_SERVER_SERVICE_TOKEN</code></p>
</td>
<td align="left" valign="top">
<p>(string) Service token to use for communication with Elasticsearch and Kibana if <a class="xref" href="agent-environment-variables.html#env-prepare-kibana-for-fleet" title="Prepare Kibana for Fleet"><code class="literal">KIBANA_FLEET_SETUP</code></a> is enabled.
If the service token value and service token path are specified the value may be used for setup and the path is passed to the agent in the container.</p>
<p><span class="strong strong"><strong>Default:</strong></span> none</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-service-token-path"></a><code class="literal">FLEET_SERVER_SERVICE_TOKEN_PATH</code></p>
</td>
<td align="left" valign="top">
<p>(string) The path to the service token file to use for communication with Elasticsearch and Kibana if <a class="xref" href="agent-environment-variables.html#env-prepare-kibana-for-fleet" title="Prepare Kibana for Fleet"><code class="literal">KIBANA_FLEET_SETUP</code></a> is enabled.
If the service token value and service token path are specified the value may be used for setup and the path is passed to the agent in the container.</p>
<p><span class="strong strong"><strong>Default:</strong></span> none</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-policy-name"></a><code class="literal">FLEET_SERVER_POLICY_NAME</code></p>
</td>
<td align="left" valign="top">
<p>(string) The name of the policy for Fleet Server to use on itself.
Overrides <code class="literal">FLEET_TOKEN_POLICY_NAME</code> when set.</p>
<p><span class="strong strong"><strong>Default:</strong></span> none</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-policy-id"></a><code class="literal">FLEET_SERVER_POLICY_ID</code></p>
</td>
<td align="left" valign="top">
<p>(string) The policy ID for Fleet Server to use on itself.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-host"></a><code class="literal">FLEET_SERVER_HOST</code></p>
</td>
<td align="left" valign="top">
<p>(string) The binding host for Fleet Server HTTP.
Overrides the host defined in the policy.</p>
<p><span class="strong strong"><strong>Default:</strong></span> none</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-port"></a><code class="literal">FLEET_SERVER_PORT</code></p>
</td>
<td align="left" valign="top">
<p>(string) The binding port for Fleet Server HTTP.
Overrides the port defined in the policy.</p>
<p><span class="strong strong"><strong>Default:</strong></span> none</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-cert"></a><code class="literal">FLEET_SERVER_CERT</code></p>
</td>
<td align="left" valign="top">
<p>(string) The path to the certificate to use for HTTPS.</p>
<p><span class="strong strong"><strong>Default:</strong></span> none</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-cert-key"></a><code class="literal">FLEET_SERVER_CERT_KEY</code></p>
</td>
<td align="left" valign="top">
<p>(string) The path to the private key for the certificate used for HTTPS.</p>
<p><span class="strong strong"><strong>Default:</strong></span> none</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-cert-key-passphrase"></a><code class="literal">FLEET_SERVER_CERT_KEY_PASSPHRASE</code></p>
</td>
<td align="left" valign="top">
<p>(string) The path to the private key passphrase for an encrypted private key file.</p>
<p><span class="strong strong"><strong>Default:</strong></span> none</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-client-auth"></a><code class="literal">FLEET_SERVER_CLIENT_AUTH</code></p>
</td>
<td align="left" valign="top">
<p>(string) One of <code class="literal">none</code>, <code class="literal">optional</code>, or <code class="literal">required</code>.
Fleet Server’s client authentication option for client mTLS connections.
If <code class="literal">optional</code> or <code class="literal">required</code> is specified, client certificates are verified using CAs.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">none</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-es-ca-trusted-fingerprint"></a><code class="literal">FLEET_SERVER_ELASTICSEARCH_CA_TRUSTED_FINGERPRINT</code></p>
</td>
<td align="left" valign="top">
<p>(string) The SHA-256 fingerprint (hash) of the certificate authority used to self-sign Elasticsearch certificates.
This fingerprint is used to verify self-signed certificates presented by Fleet Server and any inputs started
by Elastic Agent for communication. This flag is required when using self-signed certificates with Elasticsearch.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">""</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-daemon-timeout"></a><code class="literal">FLEET_DAEMON_TIMEOUT</code></p>
</td>
<td align="left" valign="top">
<p>(duration) Set to indicate how long Fleet Server will wait during the bootstrap process for Elastic Agent.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-bootstrap-fleet-fleet-server-timeout"></a><code class="literal">FLEET_SERVER_TIMEOUT</code></p>
</td>
<td align="left" valign="top">
<p>(duration) Set to indicate how long Elastic Agent will wait for Fleet Server to check in as healthy.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="position-relative"><h4><a id="env-enroll-agent"></a>Enroll Elastic Agent</h4><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/env/container-envs.asciidoc">edit</a></div>
<p>Settings used to enroll an Elastic Agent into a Fleet Server.</p>
<div class="informaltable">
<table border="1" cellpadding="4px">
<colgroup>
<col class="col_1"/>
<col class="col_2"/>
</colgroup>
<thead>
<tr>
<th align="left" valign="top">
Settings
</th>
<th align="left" valign="top">
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-elastic-agent-cert"></a><code class="literal">ELASTIC_AGENT_CERT</code></p>
</td>
<td align="left" valign="top">
<p>(string) The path to the mutual TLS client certificate that Elastic Agent will use to connect to Fleet Server.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-elastic-agent-cert-key"></a><code class="literal">ELASTIC_AGENT_CERT_KEY</code></p>
</td>
<td align="left" valign="top">
<p>(string) The path to the mutual TLS private key that Elastic Agent will use to connect to Fleet Server.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-elastic-agent-cert-key-passphrase"></a><code class="literal">ELASTIC_AGENT_CERT_KEY_PASSPHRASE</code></p>
</td>
<td align="left" valign="top">
<p>(string) The path to the file that contains the passphrase for the mutual TLS private key that Elastic Agent will use to connect to Fleet Server.
The file must only contain the characters of the passphrase, no newline or extra non-printing characters.</p>
<p>This option is only used if the <code class="literal">--elastic-agent-cert-key</code> is encrypted and requires a passphrase to use.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-elastic-agent-tag"></a><code class="literal">ELASTIC_AGENT_TAGS</code></p>
</td>
<td align="left" valign="top">
<p>(string) A comma-separated list of tags to apply to Fleet-managed Elastic Agents.
You can use these tags to filter the list of agents in Fleet.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-fleet-enroll"></a><code class="literal">FLEET_ENROLL</code></p>
</td>
<td align="left" valign="top">
<p>(bool) Set to <code class="literal">1</code> to enroll the Elastic Agent into Fleet Server.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">false</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-fleet-force"></a><code class="literal">FLEET_FORCE</code></p>
</td>
<td align="left" valign="top">
<p>(bool) Set to <code class="literal">true</code> to force overwrite of the current Elastic Agent configuration without prompting for confirmation.
This flag is helpful when using automation software or scripted deployments.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">false</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-fleet-url"></a><code class="literal">FLEET_URL</code></p>
</td>
<td align="left" valign="top">
<p>(string) URL to enroll the Fleet Server into.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">""</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-fleet-enrollment-token"></a><code class="literal">FLEET_ENROLLMENT_TOKEN</code></p>
</td>
<td align="left" valign="top">
<p>(string) The token to use for enrollment.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">""</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-fleet-token-name"></a><code class="literal">FLEET_TOKEN_NAME</code></p>
</td>
<td align="left" valign="top">
<p>(string) The token name to use to fetch the token from Kibana.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">""</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-fleet-token-policy-name"></a><code class="literal">FLEET_TOKEN_POLICY_NAME</code></p>
</td>
<td align="left" valign="top">
<p>(string) The token policy name to use to fetch the token from Kibana.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">false</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-fleet-ca"></a><code class="literal">FLEET_CA</code></p>
</td>
<td align="left" valign="top">
<p>(string) The path to a certificate authority. Overrides <code class="literal">ELASTICSEARCH_CA</code> when set.</p>
<p>By default, Elastic Agent uses the list of trusted certificate authorities (CA) from the operating
system where it is running.
If the certificate authority that signed your node certificates is not in the host system’s
trusted certificate authorities list, use this config to add the path to the <code class="literal">.pem</code> file that
contains your CA’s certificate.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">false</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-fleet-insecure"></a><code class="literal">FLEET_INSECURE</code></p>
</td>
<td align="left" valign="top">
<p>(bool) When <code class="literal">true</code>, Elastic Agent communicates with Fleet Server over insecure or unverified HTTP.
Setting this to <code class="literal">true</code> is not recommended.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">false</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-kibana-fleet-host"></a><code class="literal">KIBANA_FLEET_HOST</code></p>
</td>
<td align="left" valign="top">
<p>(string) The Kibana host to enable Fleet on.
Overrides <code class="literal">FLEET_HOST</code> when set.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">http://kibana:5601</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-kibana-fleet-username"></a><code class="literal">KIBANA_FLEET_USERNAME</code></p>
</td>
<td align="left" valign="top">
<p>(string) The basic authentication username used to connect to Kibana and retrieve a <code class="literal">service_token</code> to enable Fleet.
Overrides <code class="literal">ELASTICSEARCH_USERNAME</code> when set.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">elastic</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-kibana-fleet-password"></a><code class="literal">KIBANA_FLEET_PASSWORD</code></p>
</td>
<td align="left" valign="top">
<p>(string) The basic authentication password used to connect to Kibana and retrieve a <code class="literal">service_token</code> to enable Fleet.
Overrides <code class="literal">ELASTICSEARCH_PASSWORD</code> when set.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">changeme</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="env-enroll-kibana-fleet-ca"></a><code class="literal">KIBANA_FLEET_CA</code></p>
</td>
<td align="left" valign="top">
<p>(string) The path to a certificate authority. Overrides <code class="literal">KIBANA_CA</code> when set.</p>
<p>By default, Elastic Agent uses the list of trusted certificate authorities (CA) from the operating
system where it is running.
If the certificate authority that signed your node certificates is not in the host system’s
trusted certificate authorities list, use this config to add the path to the <code class="literal">.pem</code> file that
contains your CA’s certificate.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">""</code></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div><div class="navfooter">
<span class="prev">
<a href="ingest-pipeline-kubernetes.html">« Using a custom ingest pipeline with the Kubernetes Integration</a>
</span>
<span class="next">
<a href="otel-agent.html">Run Elastic Agent as an OTel Collector »</a>
</span>
</div>
<!-- end body -->
</div>
<div class="col-12 order-3 col-lg-2 order-lg-3 h-almost-full-lg sticky-top-lg" id="right_col">
<div id="sticky_content">
<!-- The OTP is appended here -->
<div class="row">
<div class="col-0 col-md-4 col-lg-0" id="bottom_left_col"></div>
<div class="col-12 col-md-8 col-lg-12">
<div id="rtpcontainer">
<div class="mktg-promo" id="most-popular">
<p class="aside-heading">Most Popular</p>
<div class="pb-2">
<p class="media-type">Video</p>
<a href="https://www.elastic.co/webinars/getting-started-elasticsearch?page=docs&placement=top-video">
<p class="mb-0">Get Started with Elasticsearch</p>
</a>
</div>
<div class="pb-2">
<p class="media-type">Video</p>
<a href="https://www.elastic.co/webinars/getting-started-kibana?page=docs&placement=top-video">
<p class="mb-0">Intro to Kibana</p>
</a>
</div>
<div class="pb-2">
<p class="media-type">Video</p>
<a href="https://www.elastic.co/webinars/introduction-elk-stack?page=docs&placement=top-video">
<p class="mb-0">ELK for Logs & Metrics</p>
</a>
</div>
</div>
</div>
<!-- Feedback widget -->
<div id="feedbackWidgetContainer"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<div id='elastic-footer'></div>
<script src='https://www.elastic.co/elastic-footer.js'></script>
<!-- Footer Section end-->
</section>
</div>
<!-- Feedback modal -->
<div id="feedbackModalContainer"></div>
<script src="/guide/static/jquery.js"></script>
<script type="text/javascript" src="/guide/static/docs-v1.js"></script>
<script type="text/javascript">
window.initial_state = {}</script>
</body>
</html>