Skip to content
Configuration Options

Configuration Options

This page is a quick reference for the keys used in config-example.toml. For step-by-step setups, see Basic Setups and Advanced Usage.

This page is intentionally dictionary-like. Detailed behavior and deployment examples are covered in the guide pages linked below.

Quick Navigation

Minimal Example

listen_port = 80
listen_port_tls = 443

[apps.app1]
server_name = "app1.example.com"
tls = { tls_cert_path = "./server.crt", tls_cert_key_path = "./server.key" }

[[apps.app1.reverse_proxy]]
upstream = [
  { location = "app1.local:8080" },
]

Global Settings

OptionRequiredDefaultDescription
listen_portNoNoneTCP port for plaintext HTTP. At least one of listen_port or listen_port_tls must be specified.
listen_port_tlsNoNoneTCP port for HTTPS/TLS. Required if you serve TLS, use ACME, or enable HTTP/3.
https_redirection_portNoSame as listen_port_tls when TLS is enabledExternal HTTPS port used in 301 redirects and Alt-Svc headers when the public HTTPS port differs from listen_port_tls, for example behind container port mapping or firewall redirection.
tcp_listen_backlogNoInternal defaultTCP listen backlog for HTTP/1.1 and HTTP/2 listeners.
max_concurrent_streamsNoInternal defaultHTTP/2 concurrent stream limit per connection.
max_clientsNoInternal defaultTotal concurrent client limit across HTTP/1.1, HTTP/2, and HTTP/3.
listen_address_v4No0.0.0.0IPv4 address to bind listeners to.
listen_address_v6NoNoneIPv6 address to bind listeners to, for example [::]. If omitted and listen_ipv6 = true, binds to [::]. If omitted and listen_ipv6 is false or unset, IPv6 is disabled.
listen_ipv6NofalseIf true, bind to [::] when listen_address_v6 is not specified.
default_appNoNoneFallback app name for unmatched plaintext HTTP requests. This applies only to HTTP. Unknown HTTPS requests are still rejected because no TLS server name can be selected.

Application Definition

All backend applications are defined under [apps].

[apps.<app_name>]

OptionRequiredDefaultDescription
server_nameYesNoneHostname served by this app, for example app.example.com.
reverse_proxyYesNoneList of routing rules for this app.
tlsNoNoneTLS settings for this app. If omitted, the app serves plaintext HTTP only.

TLS Options

These options live under apps.<app_name>.tls.

OptionRequiredDefaultDescription
tls_cert_pathYes for static TLSNonePEM certificate path for this app when using static certificates.
tls_cert_key_pathYes for static TLSNonePEM private key path for this app. The key must be in PKCS8 format.
https_redirectionNotrue when both listen_port and listen_port_tls are setPer-app HTTP-to-HTTPS redirect switch. If you serve HTTPS only, do not set this option.
client_ca_cert_pathNoNoneCA certificate path for mTLS client authentication. See Client Authentication.
acmeNofalseIf true, certificates are issued and renewed automatically through ACME instead of tls_cert_path and tls_cert_key_path. See ACME (Let’s Encrypt) Integration.

Reverse Proxy Rules

Each app can contain one or more [[apps.<app_name>.reverse_proxy]] entries.

OptionRequiredDefaultDescription
pathNoNonePath prefix to match, such as "/api" or "/static". Longest-prefix match wins.
replace_pathNoPreserve original pathRewritten prefix forwarded upstream.
upstreamYesNoneList of backend destinations.
load_balanceNononeBackend selection strategy. Supported values are none, round_robin, random, and sticky.
upstream_optionsNoNoneList of request-forwarding behaviors. See Upstream Options.

Upstream Entries

Each item in upstream = [...] accepts:

OptionRequiredDefaultDescription
locationYesNoneBackend host and port, for example "backend.internal:8080" or "www.example.com".
tlsNofalseIf true, the upstream connection uses HTTPS. If omitted or false, HTTP is used.

Upstream Option Values

See Upstream Options for detailed explanations of each option. The table below summarizes the supported values for upstream_options.

ValueEffect
keep_original_hostPreserve the incoming Host header. This is the default behavior.
set_upstream_hostReplace the Host header with the upstream host.
upgrade_insecure_requestsAdd Upgrade-Insecure-Requests: 1 if it is not already present.
force_http11_upstreamForce HTTP/1.1 for upstream connections.
force_http2_upstreamForce HTTP/2 for upstream connections.
forwarded_headerGenerate the RFC 7239 Forwarded header in addition to the default X-Forwarded-* headers.

Experimental Settings

The [experimental] table controls optional and advanced features.

[experimental]

OptionRequiredDefaultDescription
ignore_sni_consistencyNofalseIf true, relax SNI consistency checks for TLS backends. Keeping it false is recommended.
connection_handling_timeoutNo0Total connection handling timeout in seconds. 0 means no timeout.

[experimental.h3]

Add this table to enable HTTP/3 support. See HTTP/3.

OptionRequiredDefaultDescription
alt_svc_max_ageNoInternal defaultAlt-Svc max-age in seconds.
request_max_body_sizeNoInternal defaultMaximum HTTP/3 request body size in bytes.
max_concurrent_connectionsNoInternal defaultConcurrent QUIC connection limit.
max_concurrent_bidistreamNoInternal defaultBidirectional QUIC stream limit.
max_concurrent_unistreamNoInternal defaultUnidirectional QUIC stream limit.
max_idle_timeoutNoInternal defaultQUIC idle timeout in seconds. 0 means infinite timeout.

[experimental.cache]

Add this table to enable the hybrid response cache. See Caching.

OptionRequiredDefaultDescription
cache_dirNo./cacheCache directory path, relative to the current working directory.
max_cache_entryNo1000Maximum number of cache entries.
max_cache_each_sizeNo65535Maximum size in bytes for a single cacheable response.
max_cache_each_size_on_memoryNo4096Maximum size in bytes for keeping a cached response in memory. Larger cached responses are stored as files. Set 0 to always use file cache.

[experimental.acme]

Add this table when any app uses tls = { acme = true }. See ACME (Let’s Encrypt) Integration.

OptionRequiredDefaultDescription
emailYesNoneContact email for ACME account registration.
dir_urlNoLet’s Encrypt production directoryACME directory URL.
registry_pathNo./acme_registryStorage directory for retrieved certificates and account data.

[experimental.tcp_recv_proxy_protocol]

Add this table to accept inbound HAProxy PROXY protocol headers from a trusted L4 proxy. See PROXY Protocol.

OptionRequiredDefaultDescription
trusted_proxiesYesNoneNon-empty list of trusted proxy CIDR ranges, for example ["127.0.0.1/32", "::1/128"].
timeoutNo50 msTimeout in milliseconds for receiving the PROXY header. Setting 0 falls back to an internal 5s timeout.

Related Guides