Couper is build as binary called couper
with the following commands:
Command | Description |
---|---|
run |
Start the server with given configuration file. |
Note: run options can also be configured with settings or related environment variables. |
|
help |
Print the usage for the given command: help run |
verify |
Verify the syntax of the given configuration file. |
version |
Print the current version and build information. |
Argument | Default | Environment | Description |
---|---|---|---|
-f |
couper.hcl |
COUPER_FILE |
Path to a Couper configuration file. |
-d |
- | COUPER_FILE_DIRECTORY |
Path to a directory containing Couper configuration files. |
-watch |
false |
COUPER_WATCH |
Watch for configuration file changes and reload on modifications. |
-watch-retries |
5 |
COUPER_WATCH_RETRIES |
Maximum retry count for configuration reloads which could not bind the configured port. |
-watch-retry-delay |
500ms |
COUPER_WATCH_RETRY_DELAY |
Delay duration before next attempt if an error occurs. |
-log-format |
common |
COUPER_LOG_FORMAT |
Can be set to json output format. |
-log-level |
info |
COUPER_LOG_LEVEL |
Set the log-level to one of: info , panic , fatal , error , warn , debug , trace . |
-log-pretty |
false |
COUPER_LOG_PRETTY |
Option for json log format which pretty prints with basic key coloring. |
-ca-file |
"" |
COUPER_CA_FILE |
Option for adding the given PEM encoded ca-certificate to the existing system certificate pool for all outgoing connections. |
Note: log-format
, log-level
and log-pretty
also map to settings.
Note: Couper can be started with multiple -f <file>
and -d <dir>
arguments.
Files in the -d <dir>
are loaded in alphabetical order. Blocks and attributes
defined in later files may override those defined earlier. See Merging for details.
Example:
$ tree
.
├── conf
│ ├── a.hcl
│ ├── b.hcl
│ └── c.hcl
├── devel.hcl
└── global.hcl
1 directory, 5 files
$ couper run -f global.hcl -d conf/ -f devel.hcl -log-level=debug
DEBU[0000] loaded files … […/global.hcl …/conf/a.hcl …/conf/b.hcl …/conf/c.hcl …/devel.hcl] …
…
Argument | Default | Environment | Description |
---|---|---|---|
-accept-forwarded-url |
empty string | COUPER_ACCEPT_FORWARDED_URL |
Which X-Forwarded-* request headers should be accepted to change the request variables url , origin , protocol , host , port . Comma-separated list of values. Valid values: proto , host , port |
-https-dev-proxy |
empty string | COUPER_HTTPS_DEV_PROXY |
List of tls port mappings to define the tls listen port and the target one. A self-signed certificate will be generated on the fly based on given hostname. |
-beta-metrics |
- | COUPER_BETA_METRICS |
Option to enable the prometheus metrics exporter. |
-beta-metrics-port |
9090 |
COUPER_BETA_METRICS_PORT |
Prometheus exporter listen port. |
-beta-service-name |
couper |
COUPER_BETA_SERVICE_NAME |
The service name which applies to the service_name metric labels. |