Server environment
The Mend server (the API, its workers and the web tier) reads its configuration from environment variables. Most have a default that suits a single machine. A few are checked at start, and a value that contradicts another refuses to start with a sentence that names it.
The CLI reads its own variables (MEND_URL, MEND_TOKEN, MEND_DETACH_KEY), listed in
CLI configuration. A workspace’s own environment is set per
project, in Environment variables.
Origins, secrets and processes
Section titled “Origins, secrets and processes”| Variable | Default | What it does |
|---|---|---|
APP_URL |
http://localhost:3105 |
The exact browser origin, with no path or trailing slash. Links use it, and cookies are Secure when it is https. |
MEND_ALLOWED_ORIGINS |
[] |
A JSON array of further exact browser origins. No wildcards. |
MEND_TRUSTED_PROXIES |
empty | Comma-separated CIDRs of the proxy hops whose X-Forwarded-For entries Mend believes. |
BETTER_AUTH_SECRET |
a development value | The secret sign-in sessions are signed with. Set it in every deployment. |
BETTER_AUTH_TRUSTED_ORIGINS |
unset | Must stay unset or empty; any other value refuses to start. Origins come from APP_URL and MEND_ALLOWED_ORIGINS only. |
MEND_MODE |
all |
Which halves of the API process run: all, api (HTTP only) or worker. web is read as api. |
PORT |
3101 (API), 3105 (web) |
The port the process listens on. |
MEND_API_URL |
http://localhost:3101 |
Web tier: the API it proxies /api to. |
MEND_APP_URL |
unset | Web tier: an app server already running. Unset, the web tier starts its own on 127.0.0.1:3210. |
MEND_VERSION |
dev |
The version /health reports and the reassessment gate item compares. Release images set it. |
Database
Section titled “Database”| Variable | Default | What it does |
|---|---|---|
DATABASE_URL |
postgres://mend:mend@localhost:5434/mend |
Mend’s Postgres database. The default is the development one; every deployment sets it. |
MEND_DATABASE_POOL_MAX |
6 |
Connections in the pool for Mend’s queries. |
MEND_JOBS_POOL_MAX |
3 |
Connections in the job queue’s (pg-boss) pool. |
MEND_JOBS_ENQUEUE_POOL_MAX |
1 |
Connections in the separate pool for keyed enqueues. Must be a positive integer. |
MEND_AUTH_DATABASE_POOL_MAX |
3 |
Connections in the sign-in (Better Auth) pool. |
Mend also holds one connection for LISTEN, so the caps above total 14 per server instance at full
load. They must fit under the Postgres server’s max_connections together with Sealant’s pools when
both databases share a server. See
Troubleshooting.
Keyed enqueues use this separate pool to exclude concurrent live jobs with the same name and key. Connection acquisition and each SQL query have a five-second timeout. This is a per-query limit, not a deadline for the whole enqueue operation. Queued, active and retrying jobs hold the key; completed, failed and cancelled jobs release it. Existing queues and pending jobs remain in place. Upgrade every producer before relying on the guarantee across instances; older versions can still enqueue duplicates during a rolling deployment.
Sealant
Section titled “Sealant”| Variable | Default | What it does |
|---|---|---|
SEALANT_BASE_URL |
http://localhost:8080 |
The Sealant API Mend calls. |
SEALANT_SERVICE_KEY |
unset | The service key Mend presents to Sealant. SEALANT_API_KEY is read when it is unset. |
Store and capture
Section titled “Store and capture”| Variable | Default | What it does |
|---|---|---|
MEND_STORE_ROOT |
~/.config/mend/store |
The store directory: bare repositories, the runner cache, references. Follows XDG_CONFIG_HOME. |
MEND_KEYS_ROOT |
~/.config/mend/keys |
Where Mend keys (mend keys init) are kept. |
MEND_SESSION_STORE |
captured |
captured ships each session’s work to the bucket. colocated is deprecated and logs a warning at start. |
MEND_BLOB_STORE |
<store root>/_blobs |
The capture store’s bucket: dir:///absolute/path, or s3://<bucket>?endpoint=<url>®ion=<name>&forcePathStyle=<bool>. |
MEND_BLOB_STORE_PUBLIC_URL |
unset | The bucket endpoint presigned URLs name, when workspaces reach it at another address than Mend does. Unset, they name the endpoint in MEND_BLOB_STORE. |
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY |
unset | Credentials for an s3:// bucket, read through the AWS SDK’s default credential chain. |
MEND_CAPTURE_MULTIPART_THRESHOLD |
16777216 (16 MiB) |
Captures at or above this size upload in parts. |
MEND_CAPTURE_MULTIPART_PART_SIZE |
16777216 (16 MiB) |
The size of one part. At least 5 MiB, S3’s minimum. |
MEND_CAPTURE_BYTE_QUOTA_FLOOR |
8589934592 (8 GiB) |
The smallest byte quota a session gets for its captures. |
MEND_CAPTURE_REQUIRE_SIZES |
false |
true refuses a capture upload that does not declare its size. Part of the multi mode gate. |
MEND_CAPTURE_MANIFEST_FORMAT |
2 |
2 lets executors that read it ship a capture’s directories in a few packs; 1 makes them write one object per directory again. Captures in either format restore. |
MEND_RUN_DIR |
<store root>/_run/sessions |
Where per-session run directories live. |
To roll executors back to a sealantd that predates dir packs, set MEND_CAPTURE_MANIFEST_FORMAT=1
and restart Mend first, then keep the newer sealantd running until every session you mean to keep
has written a capture since (a stop writes one). 1 changes what executors write next; it does not
rewrite captures already written. An older executor asked to resume a session whose latest capture
still holds dir packs is refused before it touches the worktree (manifest-format), and the session
resumes on a sealantd that reads them.
Session channel
Section titled “Session channel”Workspaces reach their session over a mounted Unix socket by default, or over a network channel when
MEND_SESSION_ENDPOINT_LISTEN is set.
| Variable | Default | What it does |
|---|---|---|
MEND_SESSION_RUNTIME |
Docker installs: docker; Kubernetes: Core selection |
Where new session workspaces run: docker or boat. Saved by mend server setup --session-runtime. Existing worktrees keep their choice. Boat requests are explicit and refused if unavailable; no Docker fallback. |
MEND_DEPLOYMENT_MODE |
local |
local or kubernetes. In kubernetes, the session engine refuses to start without a network channel. |
MEND_SESSION_ENDPOINT_LISTEN |
unset | host:port the network session channel listens on. |
MEND_SESSION_ENDPOINT_URL |
unset | The address workspaces use to reach the channel. Required with MEND_SESSION_ENDPOINT_LISTEN. |
MEND_SESSION_ENDPOINT_TLS_CERT |
unset | The channel’s certificate file. Set with MEND_SESSION_ENDPOINT_TLS_KEY, and the URL must then be https. |
MEND_SESSION_ENDPOINT_TLS_KEY |
unset | The channel’s private key file. |
MEND_SESSION_ENDPOINT_CA_FILE |
unset | PEM roots workspaces verify the channel’s certificate against, when a private CA signed it. |
MEND_BLOB_STORE_CA_FILE |
unset | PEM roots workspaces verify the bucket’s certificate against. |
MEND_EXECUTOR_NETWORK |
unset | private states that executors reach the channel and the bucket over a network you control, so plain HTTP may be dialled. The only accepted value. |
Tenancy, git and services
Section titled “Tenancy, git and services”| Variable | Default | What it does |
|---|---|---|
MEND_TENANCY |
single |
single or multi. multi refuses to start while the multi mode gate has open items (mend operator gate). |
MEND_SOURCE_POLICY |
operator |
Where Mend’s own git (adoption, reference repositories, dotfiles) may reach. operator allows private networks and never the metadata service. tenant refuses private, reserved and local addresses and git://, and pins git to the address it checked. |
MEND_SOURCE_ALLOWED_HOSTS |
empty | Comma-separated host names or CIDRs on a private network that the tenant policy may still reach. Loopback and the metadata service can never be allowed. |
MEND_GIT_TRANSPORT_BIND_ORIGIN |
true |
A workspace’s git transport signs only for its project’s remote. false lets it sign for any remote. |
MEND_SERVICE_HOSTS |
127.0.0.1 |
Comma-separated literal IP addresses supervised Service listeners bind. Wildcard and public addresses are refused. Anything but loopback opens a multi mode gate item. |
MEND_SERVICE_PORT_MIN |
43100 |
The lowest port a Service listener takes. |
MEND_SERVICE_PORT_MAX |
43999 |
The highest port a Service listener takes. |
MEND_HARNESS_LAYOUT |
person |
person gives each person their own Linux user and home in a workspace, for worktrees with no layout yet; shared keeps them on one shared home (and keeps Hot sessions’ standbys). Unset or empty is person; any other value refuses to start. A worktree that has run person stays person. mend server setup has no flag for it. See Per-person workspaces. |
Cloud metadata guard
Section titled “Cloud metadata guard”| Variable | Default | What it does |
|---|---|---|
SEALANT_DOCKER_NETWORK_GUARD_IMAGE |
the Mend image’s pinned busybox:1.37@sha256:… |
The image the Sealant worker runs in each workspace to refuse the cloud metadata address. Set by the Mend image; mend server setup preloads the same image (its dev.sealant.mend.network-guard-image label). |
Package and image mirrors
Section titled “Package and image mirrors”mend server setup sets these from the install’s mirrors; see npm mirror
and Docker mirror. The SEALANT_DOCKER_* variables are read by the
Sealant worker that runs inside the Mend container.
| Variable | Default | What it does |
|---|---|---|
MEND_NPM_MIRROR_URL |
unset | The npm mirror’s origin, such as http://npm-mirror:4873/. Each session’s dependency install goes through it when nobody set a registry or a login for registry.npmjs.org, and the mirror answers. |
SEALANT_DOCKER_REGISTRY_MIRRORS |
unset | Comma-separated http(s) origins every session’s Docker daemon asks first for a Docker Hub image. The daemon falls back to Docker Hub when one fails. |
SEALANT_DOCKER_REGISTRY_MIRROR_CONTAINER |
unset | The container serving those mirrors, which Sealant connects to each session’s Docker network, such as mend-docker-mirror. |
The mirrors’ own settings live in the install’s server.env: MEND_NPM_MIRROR_MAX_SIZE and
MEND_DOCKER_MIRROR_MAX_SIZE (their caps), and MEND_DOCKER_HUB_USERNAME and
MEND_DOCKER_HUB_TOKEN when the Docker mirror has a Docker Hub login. Only the mirrors’ containers
read them.
Exposure
Section titled “Exposure”See Exposure and the public gate for what each item means.
| Variable | Default | What it does |
|---|---|---|
MEND_EXPOSURE |
private |
How the instance is reached, as you declare it: loopback, private or public. public refuses to start while an observable gate item is open. |
MEND_EXPOSURE_DECLARED |
empty | Comma-separated gate items you verified from outside: core-private, edge-tls, workspace-ssh, t3code-gateway. Any other name refuses to start. |
MEND_SSH_PUBLISHED |
unset | Where workspace SSH is published apart from the web port, <address>:<port> (mend server setup --ssh-bind). The gate’s workspace-ssh item reads it. |
MEND_EXPOSURE_REASSESSED |
unset | The version you recorded an independent security reassessment of. It counts only while it equals MEND_VERSION. |
MEND_URL_BEARERS |
accept |
accept still reads a bearer from ?token= on a socket URL and logs it; refuse answers 400. |
MEND_T3_GATEWAY_ENABLED |
unset | true enables the t3code gateway in the Mend container, on 3120; whether it answers, mend server status says. mend server setup --t3-gateway sets it and publishes the port where Mend’s web port is. While it is enabled, the exposure gate lists t3code-gateway. |
MEND_T3_GATEWAY_PUBLISHED |
unset | Where the gateway’s port is published, <address>:<port>; mend server setup writes it. The gate’s t3code-gateway item reads it: on loopback it is observed, anywhere else open until declared. |
MEND_T3_GATEWAY_URL |
unset | The address a T3 Code client enters in its Remote link: http://<host>:3120, or https://<host> when the edge serves it (--t3-gateway-origin). mend pair and mend doctor show it. |
MEND_ERROR_DETAIL |
redacted |
verbose turns off the scrubbing of error responses, for debugging a private instance. |
Budgets
Section titled “Budgets”0 turns one budget off, and the public exposure gate needs all of them on. What each bounds is in
Budgets.
| Variable | Default |
|---|---|
MEND_BUDGET_BODY_BYTES |
1048576 |
MEND_BUDGET_UPLOAD_BODY_BYTES |
25165824 |
MEND_BUDGET_FRAME_BYTES |
1048576 |
MEND_BUDGET_ADDRESS_REQUESTS_PER_MINUTE |
1200 |
MEND_BUDGET_CREDENTIAL_REQUESTS_PER_MINUTE |
1200 |
MEND_BUDGET_SIGN_IN_ATTEMPTS_PER_MINUTE |
20 |
MEND_BUDGET_ACCOUNT_LIVE_SESSIONS |
24 |
MEND_BUDGET_ORGANIZATION_LIVE_SESSIONS |
120 |
MEND_BUDGET_ACCOUNT_LAUNCHES_IN_FLIGHT |
4 |
MEND_BUDGET_BUNDLE_BYTES |
67108864 |
MEND_BUDGET_HANDOFF_FILE_BYTES |
8388608 |
MEND_BUDGET_ACCOUNT_HANDOFFS_IN_FLIGHT |
2 |
MEND_BUDGET_ACCOUNT_ORIGIN_CHECKS_PER_MINUTE |
30 |
MEND_BUDGET_ACCOUNT_EVENT_STREAMS |
12 |
MEND_BUDGET_ACCOUNT_TERMINALS |
24 |
MEND_BUDGET_ACCOUNT_TUNNELS |
24 |
MEND_BUDGET_ACCOUNT_KEY_BRIDGES |
4 |
MEND_BUDGET_ACCOUNT_SCREEN_VIEWERS |
8 |
MEND_BUDGET_SCREEN_VIEWERS |
16 |
MEND_BUDGET_ACCOUNT_RAW_READS |
128 |
MEND_BUDGET_RAW_READS |
512 |
A Slack app’s tokens are stored per organization when an owner connects it, not in the environment. See Slack.
| Variable | Default | What it does |
|---|---|---|
MEND_SLACK_EVENTS_PER_MINUTE |
120 |
Events one Slack app may deliver per minute, per worker process. 0 turns the limit off. |
MEND_SLACK_INFERENCES_PER_HOUR |
60 |
Thread readings one organization may run per hour, per worker process. Past it, Mend picks the project from the defaults without inference. 0 turns the limit off. |
Inference
Section titled “Inference”Mend uses inference on the connected accounts of the person it works for, through Sealant. It ships no model keys.
| Variable | Default | What it does |
|---|---|---|
MEND_INFERENCE_CLAUDE_ACCOUNT |
unset | The connected Claude account inference uses. Unset, the person’s default account. |
MEND_INFERENCE_CODEX_ACCOUNT |
unset | The same for Codex. |
MEND_INFERENCE_NAMING_MODEL_CLAUDE |
claude-haiku-4-5 |
The model that names sessions, on a Claude account. |
MEND_INFERENCE_NAMING_MODEL_CODEX |
gpt-5.6-luna |
The same, on a Codex account. |
MEND_INFERENCE_INTENT_MODEL_CLAUDE |
claude-haiku-4-5 |
The model that reads whether a request asked for a change, for automatic landing. |
MEND_INFERENCE_INTENT_MODEL_CODEX |
gpt-5.6-luna |
The same, on a Codex account. |
MEND_INFERENCE_SLACK_MODEL_CLAUDE |
claude-haiku-4-5 |
The model that reads a Slack thread for its project and intent. |
MEND_INFERENCE_SLACK_MODEL_CODEX |
gpt-5.6-luna |
The same, on a Codex account. |
Remote workspace endpoints
Section titled “Remote workspace endpoints”Workspaces on another machine need public HTTPS addresses for Mend’s session channel and capture bucket. Set them together, without editing Compose:
mend server setup --yes \ --session-endpoint-url https://mend.example.com:8443 \ --blob-store-public-url https://mend.example.com:10000This writes compose.remote-endpoints.yaml beside the install’s Compose file. The session channel
listens on 127.0.0.1:13106 on the host, forwarded to Mend’s port 3106. Garage listens on
127.0.0.1:13900, forwarded to its port 3900. Use --session-endpoint-port and --blob-store-port
to choose different host ports. The listeners stay on loopback regardless of --bind.
Configure your TLS proxy or Tailscale Funnel separately. It must forward the first HTTPS origin to
127.0.0.1:13106 and the second to 127.0.0.1:13900. The session channel needs streaming HTTP and
WebSockets; Garage needs its requests, paths and queries forwarded unchanged. Keep Garage’s admin
and RPC ports private. Setup does not create forwarding, change DNS, or verify reachability from a
remote workspace. Check both endpoints from that network before starting a session.
The addresses apply to every new workspace, including local Docker workspaces. They must also be
reachable from Mend’s containers. The generated overlay clears MEND_EXECUTOR_NETWORK=private so
workspaces verify TLS for these endpoints. Capture storage inside Mend still uses Garage’s internal
address and existing credentials.
The setting survives setup reruns and upgrades. mend server setup --yes --no-remote-endpoints
removes the host listeners and restores the internal Docker addresses for new workspaces. Existing
workspaces keep the addresses they were launched with, so keep their forwarding available until they
stop. This setting alone does not set up Boat.
Where sessions run
Section titled “Where sessions run”On Docker server installs, choose Docker or Boat when mend server setup asks where new sessions
run. Docker is the default. Change it later through setup again, or with
mend server setup --yes --session-runtime boat. The choice is saved across setup reruns, restarts
and upgrades. Use --session-runtime docker to change it back.
Kubernetes deployments with no MEND_SESSION_RUNTIME keep Core’s automatic runtime selection.
Setting it explicitly requires exactly that runtime, including on Kubernetes. Existing installs keep
their current behavior without configuration changes.
Each new worktree keeps the choice it was created with, including after stop and resume. Existing worktrees keep their runtime path. New projects on Boat start with Ubuntu and Docker inside the workspace turned on, as on Docker. Existing projects keep their environments. For an Arch project, switch its environment to Ubuntu or Nix before starting a Boat session. Custom container images and host folder mounts are refused, because Boat cannot support them.
Boat sessions bypass the server’s npm and Docker mirrors. Local Docker sessions keep using them.
Setup takes Boat’s settings itself: the API key on standard input with --boat-api-key-stdin,
together with the two public endpoints described above. It names this install’s Boat VMs itself
(SEALANT_BOAT_DEPLOYMENT_ID), unless --boat-deployment-id <name> picks the name. Setup refuses
--session-runtime boat without the key and the endpoints, and keeps them across reruns and
upgrades. A Boat session is never silently started on Docker instead. A server with the Boat key
serves Boat to everyone who can start sessions on it. Run sessions on Boat walks
through the whole setup.
A Boat session reaches the project’s resources, such as @db, through Core’s resource gateway on
the Docker host. The gateway is optional. When a session’s worktree binds no resource at the moment
its workspace is created, Mend creates the workspace without resources and Boat builds it no
gateway, so a Boat server with no gateway runs that session. A session whose worktree binds a
resource needs the gateway. On a server without one, that session is refused with a message that
says the server’s Boat setup has no resource gateway.
On a Docker install, setup runs the gateway with Boat by default; --no-boat-resources turns it
off. It sets the host ID, the bundle hands the worker the image this Mend version pins and the
Docker host’s address, and setup preloads the image. A deployment run without mend server setup
sets all three of these in Mend’s environment, or none of them. Core refuses to start its worker
when only some are set.
SEALANT_BOAT_GATEWAY_HOST_ID: a stable UUID you choose for the Docker host, shared by every deployment on that host.SEALANT_BOAT_GATEWAY_IMAGE: the gateway image, by itssha256digest, available locally.SEALANT_BOAT_GATEWAY_RELAY_HOST: the IPv4 address at which Mend’s bundled Sealant worker reaches the Docker host. Because Mend’s worker runs inside Mend’s container, that is the host’s address as the container sees it, not127.0.0.1, and0.0.0.0is refused.
The worker carries each resource tunnel over Boat’s HTTPS, so the host needs no inbound ports and no firewall rule. One gateway host carries up to 512 Boat sessions with resources at the same time. Change these settings only while no Boat session is running.
A Boat session created while its worktree bound no resource does not reach a resource the project gains later. Mend says so when the resource is started or chosen, and the session reaches it once it is stopped and started again.
Core no longer reads SEALANT_BOAT_ADMISSION_OWNER_IDS, SEALANT_BOAT_GATEWAY_ENDPOINT,
SEALANT_BOAT_AUTOMATIC_PARKING or SEALANT_BOAT_PARKING_DELAY_SECONDS. A server that still sets
them starts and ignores them.
Set them on the Docker install
Section titled “Set them on the Docker install”mend server setup takes no environment variables. It writes the installation’s server.env
itself, from its flags and the secrets it generates, and every later command checks that file
against the saved configuration: a hand edit makes the next command refuse with
Server secrets are corrupt: server.env does not match the persisted server config and identity.
The compose file also names each variable the Mend container receives, so a new line in .env
reaches nothing on its own. The edge, the posture, the mirrors and the t3code gateway are the flags’
business: --edge <host> writes the edge overlay and its Caddyfile into the generation;
--exposure, --tenancy, --ssh-bind and --declare write a compose.posture.yaml that hands
their variables to the container, reading each value from server.env; the mirrors are
compose.mirrors.yaml, which also hands the container MEND_NPM_MIRROR_URL,
SEALANT_DOCKER_REGISTRY_MIRRORS and SEALANT_DOCKER_REGISTRY_MIRROR_CONTAINER for each mirror
that runs; and --t3-gateway writes compose.t3.yaml, which sets MEND_T3_GATEWAY_ENABLED=true.
What server.env holds, all read by the compose files:
| Variable | Set from |
|---|---|
MEND_VERSION, MEND_IMAGE_REPOSITORY |
--version; ghcr.io/sealant-sh/mend |
APP_URL, MEND_ALLOWED_ORIGINS |
--url, --origin |
MEND_BIND_HOST, MEND_PORT, MEND_SSH_PORT |
--bind (127.0.0.1), --port (3105), --ssh-port (2222) |
MEND_SSH_BIND_HOST |
--ssh-bind; absent when workspace SSH is published on --bind |
SEALANT_SSH_HOST |
the host name in --url |
MEND_EDGE_HOST |
--edge; read by compose.edge.yaml, absent without an edge |
MEND_EXPOSURE, MEND_TENANCY |
--exposure, --tenancy; absent when never declared |
MEND_SOURCE_POLICY=tenant, MEND_CAPTURE_REQUIRE_SIZES=true |
set with --tenancy multi or --exposure public |
MEND_URL_BEARERS=refuse |
set with --exposure public |
MEND_SSH_PUBLISHED |
--ssh-bind and --ssh-port, as <address>:<port>; absent when SSH is published on --bind |
MEND_EXPOSURE_DECLARED |
--declare, --undeclare; absent when nothing is declared |
MEND_T3_GATEWAY_PORT |
--t3-gateway-port (3120); absent while the gateway is off |
MEND_NPM_MIRROR_MAX_SIZE, MEND_DOCKER_MIRROR_MAX_SIZE, MEND_DOCKER_HUB_USERNAME, MEND_DOCKER_HUB_TOKEN |
the mirror flags; each absent while its mirror or login is off |
MEND_SESSION_ENDPOINT_URL, MEND_BLOB_STORE_PUBLIC_URL |
the paired remote endpoint flags; absent while remote endpoints are off |
MEND_SESSION_ENDPOINT_PORT, MEND_BLOB_STORE_PORT |
their loopback host ports, default 13106 and 13900 |
DOCKER_SOCKET_PATH |
detected, or --docker-socket |
MEND_POSTGRES_ADMIN_PASSWORD, MEND_DB_PASSWORD, SEALANT_DB_PASSWORD, BETTER_AUTH_SECRET, SEALANT_CREDENTIALS_KEY, SEALANT_SERVICE_KEY, WORKSPACE_SSH_GATEWAY_TOKEN |
generated once, kept in the installation’s identity |
MEND_GARAGE_RPC_SECRET, MEND_GARAGE_ADMIN_TOKEN, MEND_GARAGE_KEY_ID, MEND_GARAGE_KEY_SECRET |
derived from the identity |
MEND_STORE_VOLUME_NAME, MEND_CONTROL_VOLUME_NAME, MEND_GARAGE_VOLUME_NAME |
the fixed volume names |
Inside the Mend container, a supervisor starts the Mend API and web tier and the pinned Sealant
processes. It sets these for the Mend API itself, whatever the container received: PORT=3101,
MEND_MODE=all, MEND_STORE_ROOT=/var/lib/mend/store, SEALANT_BASE_URL=http://127.0.0.1:4000,
and DATABASE_URL, SEALANT_SERVICE_KEY, APP_URL and BETTER_AUTH_SECRET from the container’s
own values. Every other variable the container receives passes through to the API.
MEND_EXECUTOR_NETWORK defaults to private for the internal Docker addresses; the remote-endpoint
overlay clears it. The bundled Sealant worker starts and stops up to four workspaces at once
(WORKSPACE_BUILD_QUEUE_PREFETCH, 4 unless the container receives another value).
So on the Docker install made by mend server setup, every other variable on this page keeps its
default. To set one, run the Compose project yourself from the release’s compose.v2.yaml and an
.env holding the values it names (deploy/docker/bundle.env.example lists them), and add the
variable to the mend service in an override file:
services: mend: environment: MEND_SOURCE_POLICY: tenant MEND_DATABASE_POOL_MAX: "4"docker compose -f compose.v2.yaml -f compose.override.yaml up -dA project you run this way is yours to operate: mend server start, restart and upgrade run the
installation’s saved compose.yaml and the overlays setup wrote beside it, nothing else. The
Caddy edge overlay is the same kind of override, and the one
setup writes for you.
Set them on Kubernetes
Section titled “Set them on Kubernetes”The chart (deploy/helm/mend) sets the variables it owns from its values:
| Value | Variable |
|---|---|
web.appUrl, web.allowedOrigins |
APP_URL, MEND_ALLOWED_ORIGINS (both tiers) |
api.trustedProxyCidrs |
MEND_TRUSTED_PROXIES |
sealant.baseUrl |
SEALANT_BASE_URL |
secrets.existingSecret |
BETTER_AUTH_SECRET, SEALANT_SERVICE_KEY, and DATABASE_URL or MEND_DB_PASSWORD |
exposure.mode |
MEND_EXPOSURE |
exposure.executorNetwork |
MEND_EXECUTOR_NETWORK |
exposure.declared |
MEND_EXPOSURE_DECLARED |
exposure.refuseUrlBearers |
MEND_URL_BEARERS=refuse |
exposure.reassessedVersion |
MEND_EXPOSURE_REASSESSED |
serviceHost.bindAddresses, portMin, portMax |
MEND_SERVICE_HOSTS, MEND_SERVICE_PORT_MIN, MEND_SERVICE_PORT_MAX |
sessionChannel.* |
MEND_SESSION_ENDPOINT_LISTEN, _URL, _TLS_CERT, _TLS_KEY, _CA_FILE |
captureStore.blobStore.* |
MEND_BLOB_STORE, MEND_BLOB_STORE_PUBLIC_URL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY |
captureStore.multipart.*, byteQuotaFloorBytes |
MEND_CAPTURE_MULTIPART_THRESHOLD, MEND_CAPTURE_MULTIPART_PART_SIZE, MEND_CAPTURE_BYTE_QUOTA_FLOOR |
mirrors.npm.enabled, mirrors.docker.enabled |
MEND_NPM_MIRROR_URL, SEALANT_DOCKER_REGISTRY_MIRRORS (the gate’s core-private item names them) |
It also sets MEND_DEPLOYMENT_MODE=kubernetes, MEND_MODE=all, MEND_SESSION_STORE=captured,
MEND_STORE_ROOT, MEND_KEYS_ROOT and MEND_VERSION.
Everything else goes in extraEnv, as plain name and value pairs. They reach the API tier only,
never the web tier:
extraEnv: - { name: MEND_SOURCE_POLICY, value: tenant } - { name: MEND_CAPTURE_REQUIRE_SIZES, value: "true" } - { name: MEND_BUDGET_ACCOUNT_LIVE_SESSIONS, value: "12" }Use extraEnv for the variables the chart does not set, and the value that maps to a variable for
the ones it does. See Deploy on Kubernetes.
Screen video
Section titled “Screen video”| Variable | Default | Meaning |
|---|---|---|
MEND_SCREEN_RTC_UDP_PORT |
3140, packaged edge 443 |
One UDP listener shared by every screen viewer. Valid ports are 1 through 65535. Open and forward this port to the API process. |
MEND_SCREEN_RTC_PUBLIC_HOST |
APP_URL hostname, packaged edge MEND_EDGE_HOST |
IPv4 address or hostname announced in the ICE host candidate. Hostnames resolve to one IPv4 address. Use an address clients can reach directly. |
The packaged edge publishes 443/udp from Mend and 443/tcp from Caddy. Caddy has HTTP/3 off and serves HTTP/1.1 and HTTP/2. Screens use WebRTC H.264 video and a data channel for the holder’s input, with no TURN. An unavailable encoder or UDP path falls back to the WebSocket screen viewer.