Skip to content

Configuration reference

This table documents every supported JSON configuration field, its accepted type, default value, and operational effect.

PathTypeDefaultNotes
protocol.hoststring127.0.0.1Amaquet bind address
protocol.portinteger133781–65535
protocol.tlsbooleanfalseenables Amaquet TLS
protocol.tls_cert_filestringemptyrequired with Amaquet TLS
protocol.tls_key_filestringemptyrequired with Amaquet TLS
protocol.require_authbooleantruerequire Amaquet authentication
protocol.allow_insecure_authbooleanfalsepermit authenticated plaintext on non-loopback only when explicitly set
protocol.read_timeout_msinteger120000frame/idle read deadline; 0 disables
protocol.write_timeout_msinteger30000response/event write deadline; 0 disables
admin.hoststring127.0.0.1admin bind address
admin.portinteger133791–65535
admin.tlsbooleanfalseenable HTTPS
admin.tls_cert_filestringemptyrequired with admin TLS
admin.tls_key_filestringemptyrequired with admin TLS
admin.allow_insecurebooleanfalsepermit non-loopback HTTP only when explicitly set
admin.metrics_require_authbooleantruerequire RBAC authentication for /metrics
admin.max_sessionsinteger10000maximum stored HTTP cookie sessions
admin.auth_failures_per_minuteinteger20failed-login throttle per source address
security.bootstrap_tokenstringemptysupplied bootstrap secret; if empty, startup uses a protected file under data_dir
security.public_key_filestringemptyEd25519 public identity key
security.private_key_filestringemptyEd25519 private identity key
persistence.aof_enabledbooleanfalsetransactional AOF journal
persistence.aof_pathstring./data/amaquet.aofAOF path
persistence.fsyncenumeverysecalways, everysec, or no
limits.max_connectionsinteger10000accepted Amaquet connections
limits.max_payload_bytesinteger64 MiBper-frame payload; maximum 64 MiB
limits.max_memory_bytesinteger0engine data budget; 0 means unlimited
limits.eviction_policyenumnoevictionnoeviction, allkeys-lru, allkeys-lfu, volatile-ttl
limits.max_inflight_requestsinteger4096server-wide active command cap
limits.max_inflight_per_connectioninteger128active command cap for one connection
limits.max_inflight_payload_bytesinteger256 MiBaggregate inbound frame budget
limits.max_pending_upload_bytesinteger1 GiBtotal declared bytes for active blob uploads
limits.upload_ttl_msinteger600000upload inactivity TTL; minimum 1000 ms
limits.command_timeout_msinteger30000server-side command execution deadline
compression.enabledbooleantrueadaptive compression for supported contiguous value types
compression.algorithmenumautoauto, lz4, rle, deflate-fast, none
compression.min_bytesinteger1024smaller values remain native
compression.min_savings_percentnumber8required saving before a compressed encoding is retained
data_dirstring./dataadmin state, upload spools, backups, and runtime security files

The table is a compact inventory. The sections below explain what each key changes, when the setting is read, and what to consider before changing it.

Amaquet starts from built-in defaults, reads the JSON file named by -config, overlays the supported AMAQUET_* environment variables, validates the resulting configuration, and only then starts either listener. The default path is ./amaquet.json; a missing file is allowed and therefore produces a defaults-plus-environment configuration. A malformed file, invalid value, missing TLS material, or unsafe non-loopback listener stops startup.

JSON is the durable configuration source. Environment variables are process-start overrides and take precedence over values read from JSON for the fields they support. They are not written back by amaquet --init-config or by the administration configuration endpoint. Relative paths are interpreted by the server process from its current working directory, so service units should set an explicit WorkingDirectory or use absolute paths.

amaquet --init-config writes the default structure and a generated bootstrap token, then exits. It does not start the server. Normal startup may create data_dir and, when no bootstrap token is configured, create data_dir/bootstrap-token with mode 0600.

The protocol object controls the native Amaquet binary protocol. Applications connect to this listener with amaquet:// for plaintext or amaquets:// for TLS. It is the data-plane endpoint used by amaquet-cli and the Go client; it is separate from the HTTP administration listener.

The local address on which the native protocol socket listens. 127.0.0.1 keeps the listener local to the machine and is the safest development default. Use a specific private interface in a multi-interface deployment when possible. Binding 0.0.0.0 exposes the listener on every IPv4 interface and should be paired with TLS, authentication, firewall rules, and a connection limit.

The TCP port for the native protocol. It must be between 1 and 65535; the default is 13378. Changing this value also changes the URI passed to clients. The port must not collide with the admin listener or another process.

Enables TLS for the native protocol. When enabled, clients must use an amaquets:// URI and validate the configured certificate in the normal way. TLS protects credentials and data in transit; it does not replace protocol authentication. TLS startup fails unless both certificate and key paths are supplied.

Filesystem path to the certificate presented by the native protocol listener. The file must be readable by the Amaquet process and contain a certificate whose names match the hostnames clients use. The setting is only used when protocol.tls is enabled, although the environment variable AMAQUET_TLS_CERT also enables TLS automatically.

Filesystem path to the private key corresponding to protocol.tls_cert_file. Protect this file with filesystem permissions and do not place it in a public repository or image layer. Amaquet refuses to start TLS without both certificate and key files.

Controls whether new native-protocol connections must authenticate before issuing protected commands. The default is true. Authentication accepts a bootstrap credential, API key, or eligible member token through the protocol AUTH flow. Setting this to false makes new connections anonymous administrative actors, so use it only on an isolated trusted loopback or test deployment.

Explicitly permits authenticated plaintext protocol traffic when the listener is not loopback. It does not disable authentication and does not enable TLS. This is a narrowly scoped development escape hatch for a protected network; production deployments should leave it false and use TLS instead. Validation rejects a non-loopback authenticated plaintext listener unless this key is enabled.

Sets the read deadline for an incomplete frame or an idle connection, in milliseconds. The default is 120000 (two minutes). A value of 0 disables this deadline. Increase it only for clients that legitimately stream or assemble requests slowly; disabling it allows abandoned connections to consume resources indefinitely.

Sets the response and event write deadline, in milliseconds. The default is 30000 (30 seconds); 0 disables the deadline. This protects the server from clients that stop reading responses, including event or Pub/Sub delivery. A value that is too small can disconnect slow but healthy clients.

The admin object controls the HTTP control-plane listener. It serves /api/* and /metrics; it does not serve the documentation site or a browser UI. Keep it on loopback or a private management network, and expose it remotely only with TLS or an explicitly controlled reverse proxy.

The local address for the HTTP administration server. The default 127.0.0.1 prevents remote access. A non-loopback address requires admin.tls or the explicit admin.allow_insecure override during validation.

The HTTP administration port. It must be between 1 and 65535; the default is 13379. Health checks, metrics scrapers, and administration clients must use this port, not the native protocol port.

Enables HTTPS for the administration server. When enabled, the admin listener requires its own certificate and key settings. Keep the admin certificate’s names aligned with the management hostname. HTTPS protects bootstrap credentials, API keys, sessions, and configuration operations in transit.

Path to the certificate used by the HTTPS administration listener. It is independent of protocol.tls_cert_file, allowing different trust and hostname policies for data-plane and control-plane traffic.

Path to the private key paired with admin.tls_cert_file. The Amaquet process must be able to read it at startup; protect it as a secret. admin.tls fails validation unless both admin TLS paths are present.

Allows plaintext admin HTTP on a non-loopback address. This setting is intended for a deliberately isolated development network or a reverse-proxy arrangement where the proxy provides the required protection. It does not authenticate requests by itself. Leave it false for production and use HTTPS.

Controls whether /metrics requires administration authentication. The default is true, keeping operational data and labels behind the same access boundary as other admin endpoints. Set it to false only when the listener is already isolated and the metrics exposure is intentionally public to the monitoring network.

Caps the number of server-side HTTP cookie sessions kept in memory. The default is 10000. Sessions are created by the admin login/session flow and are distinct from native protocol connections and API keys. Lower this value on a constrained control-plane deployment; increasing it consumes more memory and does not increase the number of API keys.

Limits failed authentication attempts per source address per minute for the admin and native authentication hardening paths. The default is 20; it must be positive. This is a throttle, not a replacement for TLS, network access control, or strong credentials.

The security object contains bootstrap and optional protocol-identity material. Bootstrap credentials authorize the first administration actions; Ed25519 identity keys let clients verify that they reached the expected server identity after protocol negotiation. Identity keys are not TLS certificates and do not encrypt traffic.

The initial administrative credential. amaquet --init-config generates one and writes it into the JSON file. If it is empty during normal startup, Amaquet reads or creates data_dir/bootstrap-token with restrictive permissions and logs the protected file path rather than the secret itself. Use the bootstrap credential to create a permanent API key, then stop using it; persisted administration state permanently disables bootstrap authentication after the first admin API key is created.

Do not commit this value, pass it in shell history, or put it in a public Compose file. AMAQUET_BOOTSTRAP_TOKEN overrides it at runtime without copying the secret into the JSON configuration.

Path to the Ed25519 public identity key generated by amaquet-keygen. It is loaded together with security.private_key_file and its fingerprint is advertised during protocol negotiation. Supplying only one identity path is not enough to enable identity loading.

Path to the matching Ed25519 private identity key. Restrict access to the Amaquet service account. A client should verify the advertised fingerprint/signature when it needs application-level server identity; use TLS as well when confidentiality and certificate validation are required.

Persistence is optional. The active keyspace remains in memory in both modes; AOF provides recovery after restart, not a disk-backed replacement for the engine. Keep the journal and administration state under protected storage and back them up independently.

Enables transactional append-only journaling. On startup Amaquet replays committed mutations before opening listeners. When false, the data keyspace starts empty after a restart, although administrative state can still remain in data_dir/admin.json. Enabling AOF adds write and storage overhead, so select the durability mode with the workload’s recovery objective in mind.

Path to the AOF journal. The parent directory must be writable by the service account. Use an explicit path on persistent storage in production rather than relying on ./data relative to an unpredictable working directory. Checkpoint and restore workflows should use separate backup copies rather than replacing the live journal by hand.

Selects how aggressively journal data is flushed to durable storage:

  • always flushes and fsyncs each journal phase, maximizing durability at the cost of write latency.
  • everysec flushes approximately once per second and is the normal latency/durability balance.
  • no relies on buffered and operating-system writeback and provides the weakest crash-durability guarantee.

All modes retain transactional recovery semantics. A complete record with a bad CRC is treated as corruption; an incomplete final tail can be discarded as an interrupted write.

The limits object protects the process from connection floods, oversized frames, concurrent work, blob-upload reservations, and unbounded data growth. These limits are independent: raising one does not automatically raise the others.

Maximum number of accepted native protocol connections. The default is 10000 and the value must be positive. Size it with the operating system’s file-descriptor limit, expected client pool count, TLS overhead, and admin connections in mind.

Maximum payload in one protocol frame. The default is 67108864 bytes (64 MiB), which is also the hard upper bound. Lower it to reduce per-request memory pressure. Values larger than one frame should use the chunked blob commands where supported; this limit does not define the maximum logical value size for every data type.

Approximate memory budget for data held by the Amaquet engine. 0 disables the configured engine budget. It is not a process-RSS cap: Go runtime metadata, network buffers, indexes, temporary decoding buffers, AOF state, and the admin server consume additional memory. Leave headroom between this budget and the container or host memory limit.

Selects what happens when a mutating operation would exceed max_memory_bytes:

  • noeviction rejects the allocating write.
  • allkeys-lru removes the least-recently-used sampled candidate, whether or not it has a TTL.
  • allkeys-lfu removes a low-frequency sampled candidate.
  • volatile-ttl considers only keys with expiration and prefers the key nearest expiry; if no eligible key exists, the write is rejected.

Eviction is approximate and sampled rather than a perfect global ordering. Destructive or memory-reducing commands such as DEL remain available when the engine is over budget.

Server-wide cap on active command executions. The default is 4096. It limits total concurrent work across all protocol connections and helps prevent a small number of clients from exhausting worker capacity.

Per-connection cap on active commands. The default is 128. This works with the global cap to prevent one multiplexed client from monopolizing the server while allowing other connections to make progress.

Aggregate budget for inbound payload bytes associated with active requests. The default is 268435456 bytes (256 MiB). It must be at least max_payload_bytes; otherwise a single legal frame could never be admitted. Lower it when many concurrent clients can submit large requests.

Maximum total declared size reserved by active chunked blob uploads. The default is 1073741824 bytes (1 GiB). This protects disk spool and memory-accounting paths from many unfinished uploads. It is separate from the maximum size of one frame and the AOF path.

Inactivity lifetime for an unfinished blob upload. The default is 600000 milliseconds (10 minutes), and the minimum is 1000 milliseconds. Expired uploads are discarded; lower the value when clients are unreliable, or raise it for genuinely slow upload links while keeping the aggregate pending-upload budget bounded.

Server-side deadline for one command. The default is 30000 milliseconds and the value must be positive. It also bounds blocking data-type operations at the protocol request level. This is separate from the client’s own dial/request timeout; both deadlines can terminate a request.

Compression is applied to supported contiguous values after they cross the configured size threshold. The compressed representation is retained only when it is smaller enough to satisfy the savings threshold; enabling compression therefore does not force every value into a compressed form.

Master switch for adaptive in-memory compression. The default is true. Disable it when CPU latency matters more than memory, or when the workload consists mostly of values that do not compress well.

Controls the compressor selection. auto tries the low-latency RLE and LZ4 candidates and keeps the smaller result; lz4 favors fast block compression; rle favors repeated-byte data; deflate-fast uses a fast DEFLATE setting; none disables compression regardless of the enabled flag. Values are validated at startup.

Minimum original value size eligible for compression. The default is 1024 bytes. Smaller values remain in their native representation to avoid metadata and CPU overhead. The value must be non-negative.

Minimum percentage reduction required before a compressed representation is kept. The default is 8; valid values are at least 0 and below 100. A high threshold reduces CPU and representation churn for marginal wins; a low threshold saves more memory at the cost of compressing data that barely shrinks.

This directory contains runtime state that is separate from the primary JSON configuration and the AOF journal.

Root directory for runtime files that are not the primary JSON configuration: generated bootstrap-token material, admin.json control-plane state, upload spools, checkpoint/backups, and other runtime data. Amaquet creates it with restrictive directory permissions during startup. Put it on persistent storage when administration state or upload recovery must survive process replacement, and back it up separately from the AOF journal.

For a single-process local development server, keep both hosts on 127.0.0.1, use the default authentication and TLS settings, and use amaquet --init-config so the bootstrap secret is generated rather than invented. For a networked deployment, use private listener addresses, TLS on both surfaces, strong API keys, an explicit persistent data_dir, AOF settings appropriate to the recovery objective, and memory/connection limits sized below the host or container ceiling.

The complete environment-override surface is below. Numeric values that cannot be parsed are ignored. For normal boolean overrides, only the exact strings 1 and true enable the option. Compression is the inverse form: it is enabled unless the value is exactly 0 or false.

VariableConfiguration path / behavior
AMAQUET_HOSTprotocol.host
AMAQUET_PORTprotocol.port
AMAQUET_ADMIN_HOSTadmin.host
AMAQUET_ADMIN_PORTadmin.port
AMAQUET_ALLOW_INSECURE_AUTHprotocol.allow_insecure_auth
AMAQUET_ADMIN_ALLOW_INSECUREadmin.allow_insecure
AMAQUET_BOOTSTRAP_TOKENsecurity.bootstrap_token at runtime
AMAQUET_TLS_CERTprotocol.tls_cert_file; also enables protocol TLS
AMAQUET_TLS_KEYprotocol.tls_key_file; also enables protocol TLS
AMAQUET_COMPRESSIONcompression.enabled
AMAQUET_COMPRESSION_ALGORITHMcompression.algorithm
AMAQUET_COMPRESSION_MIN_BYTEScompression.min_bytes
AMAQUET_AOF_ENABLEDpersistence.aof_enabled
AMAQUET_AOF_PATHpersistence.aof_path
AMAQUET_AOF_FSYNCpersistence.fsync
AMAQUET_MAX_MEMORY_BYTESlimits.max_memory_bytes
AMAQUET_EVICTION_POLICYlimits.eviction_policy
AMAQUET_MAX_CONNECTIONSlimits.max_connections
AMAQUET_MAX_INFLIGHT_REQUESTSlimits.max_inflight_requests
AMAQUET_MAX_INFLIGHT_PER_CONNECTIONlimits.max_inflight_per_connection
AMAQUET_MAX_INFLIGHT_PAYLOAD_BYTESlimits.max_inflight_payload_bytes
AMAQUET_MAX_PENDING_UPLOAD_BYTESlimits.max_pending_upload_bytes
AMAQUET_UPLOAD_TTL_MSlimits.upload_ttl_ms
AMAQUET_COMMAND_TIMEOUT_MSlimits.command_timeout_ms

There are no environment overrides for admin TLS files, max_payload_bytes, max_sessions, auth_failures_per_minute, or compression.min_savings_percent; configure those in JSON.

An environment-provided bootstrap secret is runtime-only. An API configuration save does not copy that secret into the JSON configuration file.

The control-plane system endpoint compares the full public configuration. It persists rather than hot-applies changes, so any submitted public configuration that differs from the running configuration is reported with restart_required: true.

Validation rejects insecure non-loopback authenticated protocol and admin listeners unless the matching explicit insecure override is enabled.

Both listener ports must be between 1 and 65535. Connection, in-flight request, pending-upload, command-timeout, HTTP-session, and authentication-rate limits must be positive. max_payload_bytes is limited to 1 byte through 64 MiB; the aggregate in-flight payload budget must be at least that large. max_memory_bytes and protocol timeouts may be zero but not negative, and upload TTL must be at least 1000 ms.

TLS requires both certificate and key paths. Compression minimum bytes cannot be negative, and its required saving must be at least zero and below 100 percent. Enumerated persistence, compression, and eviction values must match the options in the table above.