Skip to content


There are a number of configuration options available on the agent that modify the behaviour of the agent.

You can view all the available options and current values on your system by running enclave list-config.

To set a value, use enclave set-config, specifying the name of the configuration option and the new value, like so:

enclave set-config <option> <value>

Environment Variables

In docker containers or when running enclave interactively with enclave run, you can set OS environment variables instead of permanently changing values in the profile. Each configuration option has a corresponding environment variable, for example localport -> ENCLAVE_LOCAL_PORT. All our environment variables start with ENCLAVE_.

General Options


Defines the local binding port used for enclave connectivity. The default value of 0 means enclave will choose a random high port for connectivity each time it re-establishes a route to our platform.

Set this value to a fixed port only if you need to add an exclusion to a local VLAN rule to allow enclave traffic to flow efficiently in your local network.

Allowed Value: A value between 0 and 65535 (inclusive)

Default Value: 0

Environment Variable: ENCLAVE_LOCAL_PORT


Defines the log level for enclave. Use [enclave loglevel](/agent/commands/loglevel) to set a temporary log level for an already-running profile.

Allowed Values:


Always shown; critical problems, startup and shutdown messages.


Operational state changes, some warnings.


Enclave connectivity events, including tunnel attempts.


Detailed protocol events, including keep-alives and tunnel negotiation.


Debug tracing, including DNS queries and low-level socket events.


All network frames to/from this system are traced to the log. Significant performance impact.

Default Value: informational

Environment Variable: ENCLAVE_LOG_LEVEL


Determines whether enclave runs a stub resolver, bound to the enclave virtual adapter on port 53. Set to 'disabled' if you want an alternate nameserver on this system.

Enclave-defined DNS names will not be resolvable if the stub resolver is disabled.

Allowed Value: 'enabled' or 'disabled'

Default Value: enabled

Environment Variable: ENCLAVE_STUB_RESOLVER


Sets a static virtual IP address for this enclave system.

Be aware that multiple systems having the same virtual address will lead to network conflicts.

Allowed Value: A valid IPv4 address

Default Value: none

Environment Variable: ENCLAVE_VIRTUAL_IP


Changes the network subnet this enclave system communicates with.

All systems that wish to communicate must share the same virtual network.

Allowed Value: A valid IP Network in CIDR format (for example,

Default Value:


Gateway Options


Only available on Linux.

When running as a gateway, indicate whether forwarded DNS queries should include the originating enclave virtual IP address as a ClientSubnet OPT record.

This can be useful when using a custom upstream DNS server, to show the originating enclave IP address in DNS logs (provided the upstream server supports the ClientSubnet OPT record).

Allowed Value: 'enabled' or 'disabled'

Default Value: disabled



Only available on Linux.

When running as a gateway, explicitly state the list of upstream DNS servers to use, rather than using the os-defined nameservers.

Allowed Value: A list of IP Addresses, separated by spaces, commas, tabs or semi-colons. Provide os-defined for the default empty set.

Default Value: os-defined



Only available on Linux.

When running as a gateway, define the number of milliseconds a query to an upstream nameserver should take before failing over to the next nameserver.

If all nameservers are exhausted, the response will be SERVFAIL.

Allowed Value: A value between 10 and 10000 (inclusive)

Default Value: 250



Only available on Linux.

When running as a gateway, indicate whether the gateway will respond for all DNS queries, not just those with result IPs routable via the gateway (the default). This allows you to provide DNS filtering with this gateway, without tunnelling all of the traffic to resolved addresses through the gateway as well.

Allowed Value: 'enabled' or 'disabled'

Default Value: disabled


Advanced Options


Only available on x64 Windows.

Indicates whether Enclave should use a layer-2-compatible virtual adapter, rather than the default layer-3 adapter. This makes it possible to run multiple profiles at once.

Allowed Value: 'enabled' or 'disabled'

Default Value: disabled

Environment Variable: ENCLAVE_LAYER2


Configures the MTU (Maximum Transmission Unit) setting on the enclave virtual adapter. This value controls the size of individual packets that move over the network; the default value is low to ensure compatibility with some internet routers.

Increasing this value may increase throughput in some scenarios, but note that all peers this system communicates with must have the same MTU value, otherwise packet loss will occur.

Allowed Value: A value between 1280 and 9000 (inclusive)

Default Value: 1280

Environment Variable: ENCLAVE_MTU


Defines the source address matching policy for this agent. By default, enclave will require that the source address of a connecting peer exactly matches the expected source address as determined by the platform.

In certain NAT configurations, clients can get different source ports/addresses for different target addresses, meaning that the source port (or even source IP) of a connection can deviate from the expected value.

In that scenario, setting this option to 'ip' or 'any' may increase the chances of direct connectivity.

Allowed Values:


No source address validation is applied; a tunnel negotiation can be initiated from any source address and port.


Source IP address must match the candidate expected by the platform, but the port number may differ.


Source IP address and port number must exactly match the candidate expected by the platform.

Default Value: exact