2020-09-23 12:15:21 -07:00
---
layout: docs
2024-12-04 13:28:17 -05:00
page_title: Top-level configuration parameters
description: >-
Learn about the parameters that make up the Boundary HCL configuration file. View parameters for HCP and self-managed installations.
2020-09-23 12:15:21 -07:00
---
# Configuration
2023-01-20 18:17:34 -05:00
[listener]: /boundary/docs/configuration/listener
[controller]: /boundary/docs/configuration/controller
[worker]: /boundary/docs/configuration/worker
[kms]: /boundary/docs/configuration/kms
[plugins]: /boundary/docs/configuration/plugins
[events]: /boundary/docs/configuration/events
2020-09-23 12:15:21 -07:00
2022-06-22 00:37:49 -06:00
Outside of development mode, Boundary controllers and workers are configured
using a file. The format of this file is
[HCL](https://github.com/hashicorp/hcl). In this section you'll find
2020-09-23 12:15:21 -07:00
configuration block examples for Boundary controllers and workers.
2022-06-22 00:37:49 -06:00
After the configuration is written, use the `-config` flag to specify a local
path to the file.
2020-09-23 12:15:21 -07:00
2023-07-07 14:42:11 -04:00
## HCP Boundary-only parameters
2020-09-23 12:15:21 -07:00
2022-06-22 03:31:16 -04:00
- `hcp_boundary_cluster_id` `(string)` - The ID of an HCP Boundary cluster.
Setting this allows discovery of upstream addresses for self-managed workers
to connect to the cluster.
2023-07-07 14:42:11 -04:00
## Shared self-managed and HCP Boundary parameters
2020-09-23 12:15:21 -07:00
2023-01-20 18:17:34 -05:00
- [`worker`](/boundary/docs/configuration/worker): Worker specific configuration. If
2021-04-05 12:04:57 -05:00
present, `boundary server` will start a Worker subprocess.
2020-09-23 12:15:21 -07:00
2023-01-20 18:17:34 -05:00
- [`listener`](/boundary/docs/configuration/listener): Configures the listeners on which
2021-04-05 12:04:57 -05:00
Boundary serves traffic (API, cluster, and proxy).
2020-09-23 12:15:21 -07:00
2022-03-28 17:16:39 +01:00
Controllers must have at least two listener blocks defined: one marked for
2023-04-03 15:58:45 -04:00
`api` purpose and the other marked for `cluster` purpose.
2020-09-23 12:15:21 -07:00
2020-10-13 15:21:09 -04:00
Workers will have only one listener, marked for `proxy` purpose.
2020-09-23 12:15:21 -07:00
2022-03-28 17:16:39 +01:00
Optionally, the `ops` purpose listener block serves as a higher-level listener
where Boundary's operational endpoints live (eg: /health).
2023-01-20 18:17:34 -05:00
- [`kms`](/boundary/docs/configuration/kms): Configures KMS blocks [for various
purposes](/boundary/docs/concepts/security/data-encryption).
2020-09-23 12:15:21 -07:00
2023-01-20 18:17:34 -05:00
- [`events`](/boundary/docs/configuration/events): Configures event (observability,
2022-06-22 03:31:16 -04:00
audit, error) handling.
2021-11-17 17:21:20 -05:00
2020-09-23 12:15:21 -07:00
- `disable_mlock` `(bool: false)` – Disables the server from executing the
2020-10-13 15:21:09 -04:00
`mlock` syscall, which prevents memory from being swapped to disk. This is
fine for local development and testing; in production, it is not recommended
unless the systems running Boundary only use encrypted swap or do not use swap
at all. Boundary only supports memory locking on UNIX-like systems that
support the mlock() syscall (Linux, FreeBSD, etc).
2020-09-23 12:15:21 -07:00
On Linux, to give the Boundary executable the ability to use the `mlock`
syscall without running the process as root, run:
```shell
2020-10-13 15:21:09 -04:00
sudo setcap cap_ipc_lock=+ep $(readlink -f $(which boundary))
2020-09-23 12:15:21 -07:00
```
If you use a Linux distribution with a modern version of systemd, you can add
the following directive to the "[Service]" configuration section:
```ini
LimitMEMLOCK=infinity
```
2022-06-22 00:37:49 -06:00
- `log_level` `(string: "info")` – (Deprecated: this is being phased out in
favor of observability and is currently only used as a backup if eventing
fails.) Specifies the log level to use; overridden by CLI and env var
parameters. Supported log levels: Trace, Debug, Error, Warn, Info.
2020-09-23 12:15:21 -07:00
2022-06-22 00:37:49 -06:00
- `log_format` `(string: "")` – (Deprecated: this is being phased out in favor
of observability and is currently only used as a backup if eventing fails.)
Specifies the log format to use; overridden by CLI and env var parameters.
Supported log formats: `"standard"`, `"json"`.
2020-10-06 07:40:29 -07:00
2023-07-07 14:42:11 -04:00
## Self-managed Boundary-only parameters
2022-06-22 03:31:16 -04:00
2023-01-20 18:17:34 -05:00
- [`controller`](/boundary/docs/configuration/controller): Controller specific
2022-06-22 03:31:16 -04:00
configuration. If present, `boundary server` will start a Controller subprocess.
2023-01-20 18:17:34 -05:00
- [`plugins`](/boundary/docs/configuration/plugins): Configures options for plugins.
2022-06-22 03:31:16 -04:00
2023-04-03 15:58:45 -04:00
## Signals
2023-07-07 14:42:11 -04:00
2023-04-03 15:58:45 -04:00
The `SIGHUP` signal causes worker and controller processes to reload their configuration files to pick up updated values.
~> **Note:** You cannot reload all configuration values using the `SIGHUP` signal. Refer to the configuration pages for
[workers](/boundary/docs/configuration/worker/) and [controllers](/boundary/docs/configuration/controller) for details
on which values can be reloaded on `SIGHUP`.
The `SIGTERM` and `SIGINT` signals cause worker and controller processes to enter graceful shutdown. A graceful shutdown for a controller closes listeners and servers before shutting down the controller. A graceful shutdown for a worker waits for any sessions to drain
before shutting down the worker. Workers in a graceful shutdown state do not receive any new work, including session proxying, from the control plane.
2023-07-07 14:42:11 -04:00
## Example configurations
2020-10-06 07:40:29 -07:00
2022-06-22 00:37:49 -06:00
For complete example configurations see the sections for
2023-01-20 18:17:34 -05:00
[controller](/boundary/docs/configuration/controller) and
[worker](/boundary/docs/configuration/worker).