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.

All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.

CONTAINER_UNPRIVILEGED_MODE

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

Type boolean
Mutability
ControlUsage
ConfigurationUpdate the deployment's configuration file.
Examples
false

DISABLE_IPTABLES_SECURITY_CONFIGURATION

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.

Type boolean
Mutability
ControlUsage
ConfigurationUpdate the deployment's configuration file.
Examples
false

NODE_ENV

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

Type string
Format Plain Text
Mutability
ControlUsage
ConfigurationUpdate the deployment's configuration file.
Examples
production

NODE_OPTIONS

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

Type string
Format Plain Text
Mutability
ControlUsage
ConfigurationUpdate the deployment's configuration file.
Examples
--max-old-space-size=1024

SANDBOX_MAX_FILE_DESCRIPTORS

The maximum number of file descriptors within a single sandbox.

Type number
Mutability
ControlUsage
ConfigurationUpdate the deployment's configuration file.
Examples
256

SANDBOX_MOUNT_DIR

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

Type string
Format Plain Text
Mutability
ControlUsage
ConfigurationUpdate the deployment's configuration file.
Examples
/tmp

WORKFLOW_CPU_LIMIT

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

Type number
Mutability
ControlUsage
ConfigurationUpdate the deployment's configuration file.
Examples
1

WORKFLOW_MEMORY_LIMIT_MBS

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

Type number
Format Integer
Mutability
ControlUsage
ConfigurationUpdate the deployment's configuration file.
UnitsMiB
Examples
2147

WORKFLOW_MONITOR_PROCESS_ENABLED

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.

Type boolean
Mutability
ControlUsage
ConfigurationUpdate the deployment's configuration file.
Examples
true