Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

Overview

Configuration is stored in an inengine.toml file. Use the -c flag to specify a different file:

inengine -c /etc/inengine/production.toml echo --text "hello"

Copy inengine.example.toml to get started. Every setting has a default value. Keep only the lines you change.

Full Example

[plugins]
sample = "plugins/sample"

[exec_whitelist]
hello = "/usr/bin/hello"

[mail]
host = "localhost"
port = 25
from = "no-reply@example.com"
username = ""
password = ""
encryption = "none"

[queue]
use_compression = false
primary_queue_consumers = 8
secondary_queue_consumers = 8
queue_driver = "file"
queue_name = "InEngineQueue"
max_retries = 0
recover_on_start = false

[queue.redis]
host = "127.0.0.1"
port = 6379
database = 0
password = ""

[queue.file]
base_path = "../"

[plugin_limits]
timeout_seconds = 900
memory_mib = 256

Plugins

SettingTypeDescription
keystringThe plugin name. inengine-core is reserved.
valuestringThe directory that contains the .wasm file.

Exec Whitelist

SettingTypeDescription
keystringThe name a caller passes to the exec command.
valuestringThe file system path of the executable.

Mail

SettingTypeDefaultDescription
hoststringlocalhostThe SMTP server hostname.
portinteger25The SMTP server port (1 to 65535).
fromstring""The sender email address.
usernamestring""The SMTP user name.
passwordstring""The SMTP password.
encryptionstringnonenone, starttls, or tls.

none sends mail in plain text. starttls, usually on port 587, upgrades the connection to TLS and refuses a server that cannot. tls, usually on port 465, uses TLS from the first byte. A user name with none is an error unless the host is localhost or a loopback address, so a password never crosses the network in plain text. A port that does not match the encryption is a warning.

Queue

General

SettingTypeDefaultDescription
use_compressionboolfalseCompress queued messages with gzip.
primary_queue_consumersinteger8The number of consumer tasks for the primary queue.
secondary_queue_consumersinteger8The number of consumer tasks for the secondary queue.
queue_driverstring"file"The queue backend: "file" or "redis".
queue_namestring"InEngineQueue"The base name for queue keys and directories.
max_retriesinteger0How many times a failed message is retried before it moves to the failed stage.
recover_on_startboolfalseMove in-progress messages back to pending when the server starts.

Warning: Enable recover_on_start only when this server is the only consumer of the queue. Recovery cannot tell a message left by a crash from one that another consumer is still processing.

Redis

Used when queue_driver is "redis". Requires Redis 6.2 or later.

SettingTypeDefaultDescription
hoststring"127.0.0.1"The Redis hostname.
portinteger6379The Redis port (1 to 65535).
databaseinteger0The Redis database (0 to 255).
passwordstring""The Redis auth password.

File

Used when queue_driver is "file".

SettingTypeDefaultDescription
base_pathstring"../"The directory where queue subdirectories are created.

Plugin Limits

SettingTypeDefaultDescription
timeout_secondsinteger900The longest time one plugin call may run, in seconds (1 to 86400).
memory_mibinteger256The memory budget of one plugin instance, in MiB (16 to 4096).

Logging

InEngine uses the INENGINE_LOG environment variable to control log output. The variable accepts any valid tracing filter directive.

INENGINE_LOG=info inengine -s
INENGINE_LOG=inengine_core=debug inengine -s

The default level is warn.