Skip to main content

Code executor environment variables

Reference documentation of environment variables for the code-executor service.

code-executor environment variables available for use with Self-hosted Retool deployments. You should only set these environment variables on containers running tryretool/code-executor-service images.

Only configure environment variables when needed. You can configure many environment variables from your organization's Settings rather than directly editing your deployment's configuration file.

You must restart your instance after setting any variables for them to take effect.

CONTAINER_UNPRIVILEGED_MODE

boolean

Whether to run the code-executor service in an unprivileged mode and remove any sandboxing of user code.

Default value is false.

Example
CONTAINER_UNPRIVILEGED_MODE=false

DISABLE_IPTABLES_SECURITY_CONFIGURATION

boolean

Whether to disable the default security configuration for link-local address, which is done by running the following startup commands requiring elevated privileges. Set to true if privileged access (e.g NET_ADMIN) cannot be given to the container running Code executor service.

Default value is false.

Example
DISABLE_IPTABLES_SECURITY_CONFIGURATION=false

NODE_ENV

string

The Node.js environment. Should always be set to production.

Example
NODE_ENV=production

NODE_OPTIONS

string

Used to specify the maximum heap size for the JavaScript v8 engine.

Default value is --max-old-space-size=1024.

Example
NODE_OPTIONS=--max-old-space-size=1024

SANDBOX_MAX_FILE_DESCRIPTORS

number

The maximum number of file descriptors within a single sandbox.

Default value is 256.

Example
SANDBOX_MAX_FILE_DESCRIPTORS=256

SANDBOX_MOUNT_DIR

string

Used to configure where files will be mounted into the sandbox.

Default value is /tmp.

Example
SANDBOX_MOUNT_DIR=/tmp

WORKFLOW_CPU_LIMIT

number

The maximum number of CPUs a workflow can use when running. Requires WORKFLOW_MONITOR_PROCESS_ENABLED to be true.

Default value is 1.

Example
WORKFLOW_CPU_LIMIT=1

WORKFLOW_MEMORY_LIMIT_MBS

number

The maximum amount of memory, in megabytes, a workflow can use when running. Requires WORKFLOW_MONITOR_PROCESS_ENABLED to be true.

Default value is 2147.

Example
WORKFLOW_MEMORY_LIMIT_MBS=2147

WORKFLOW_MONITOR_PROCESS_ENABLED

boolean

Whether to limit the memory and CPUs available to a workflow while running. If enabled, WORKFLOW_MEMORY_LIMIT_MIBS(#variable-WORKFLOW_MEMORY_LIMIT_MBS) and WORKFLOW_CPU_LIMIT can be set.

Default value is false.

Example
WORKFLOW_MONITOR_PROCESS_ENABLED=true