Skip to content

Configuration

You configure the weftra binary with command-line flags and environment variables.

For each setting, the first value found wins:

  1. the command-line flag
  2. WEFTRA_*
  3. the pre-rename name NEXURA_FLOW_* (for example NEXURA_FLOW_PORT), still read for older setups

An empty value counts as unset. Boolean variables accept true/false, 1/0, yes/no and on/off.

Flag Environment Default Meaning
--host WEFTRA_HOST 127.0.0.1 address to bind (an IP address or localhost)
--port WEFTRA_PORT 7860 port to listen on
--allow-network (flag only) off allow binding a non-loopback address
--data-dir WEFTRA_DATA_DIR ~/.weftra default home of the database (weftra.db), uploaded files (files/) and key file (secret.key)
--db WEFTRA_DB <data dir>/weftra.db SQLite database file. Only SQLite is supported.
--files-dir WEFTRA_FILES_DIR <data dir>/files directory for uploaded files
--static-dir WEFTRA_STATIC_DIR none directory with the built studio (weftra/web/dist), served with SPA fallback when it contains index.html
--starters-dir WEFTRA_STARTERS_DIR none directory of starter flow JSON files, shown as templates
--cors-origin (repeatable) WEFTRA_CORS_ORIGINS (comma separated) none (CORS off) allowed CORS origins; * for any
--public-url WEFTRA_PUBLIC_URL http://<host>:<port> public base URL for generated links (webhook URLs, A2A cards)
WEFTRA_MAX_FILE_SIZE_UPLOAD 100 upload limit in MiB
WEFTRA_MAX_FLOW_VERSIONS 50 stored versions kept per flow
RUST_LOG info log filter
Flag Environment Default Meaning
--auto-login[=true|false] WEFTRA_AUTO_LOGIN on for loopback binds, off otherwise requests without credentials run as the superuser
--superuser WEFTRA_SUPERUSER admin name of the superuser created when none exists
(never a flag) WEFTRA_SUPERUSER_PASSWORD none that superuser’s password. Without auto-login, an empty password refuses to start
--secret-key-file WEFTRA_SECRET_KEY_FILE <data dir>/secret.key key file (64 hex characters, created with mode 0600 when missing)
WEFTRA_SECRET_KEY none passphrase; wins over the key file. Use 32 or more random characters. Set but empty refuses to start without auto-login
WEFTRA_ACCESS_TOKEN_EXPIRE_SECONDS 3600 access token lifetime (minimum 60)
WEFTRA_REFRESH_TOKEN_EXPIRE_SECONDS 604800 refresh token lifetime (minimum 60)
WEFTRA_ENABLE_SIGNUP true allow sign-up (never with auto-login)
WEFTRA_NEW_USER_IS_ACTIVE false new accounts are active without a superuser activating them
WEFTRA_ACCESS_SECURE, WEFTRA_REFRESH_SECURE false send the session cookies over HTTPS only
WEFTRA_ACCESS_SAME_SITE, WEFTRA_REFRESH_SAME_SITE lax lax, strict or none
WEFTRA_COOKIE_DOMAIN none cookie domain
WEFTRA_API_KEY_SOURCE + WEFTRA_API_KEY db env makes that one key act as the superuser
--no-auth (flag only) off legacy single-user mode: forces auto-login. On a network bind it needs --require-api-key
--require-api-key (flag only) off with --no-auth: require an API key on run, webhook, workflow and MCP endpoints

LANGFLOW_* variable names are also accepted as aliases.

Flag Environment Default Meaning
--env-variables WEFTRA_ENV_VARIABLES off load_from_db fields fall back to process environment variables
--fake-models WEFTRA_FAKE_MODELS off every model and embedding component uses the offline fake provider
WEFTRA_SUSPENDED_JOB_TTL 604800 (7 days) seconds before a paused human-in-the-loop run expires
--allow-mcp-stdio WEFTRA_ALLOW_MCP_STDIO off let superusers register stdio (command) MCP servers
--allow-private-destinations WEFTRA_ALLOW_PRIVATE_DESTINATIONS off let outbound MCP, A2A and URL calls reach loopback, private and metadata addresses
WEFTRA_TRIGGERS_ENABLED on run the schedule and webhook trigger worker
WEFTRA_TRIGGER_POLL_SECS 5 trigger worker poll interval in seconds

All off by default. See Custom components.

Flag Environment Default Meaning
--component-worker (repeatable) WEFTRA_COMPONENT_WORKERS (;-separated or a JSON array) none external worker commands, run without a shell
--python-components WEFTRA_PYTHON_COMPONENTS off run Python custom components through the embedded lfx worker
--python WEFTRA_PYTHON python3 Python interpreter with lfx installed
WEFTRA_PYTHON_WORKER embedded worker replace the embedded lfx worker with your own command
--component-worker-pool WEFTRA_COMPONENT_WORKER_POOL min(4, cores) processes per worker
--component-worker-timeout WEFTRA_COMPONENT_WORKER_TIMEOUT 300 seconds per build; a timed-out worker is killed and restarted

Builds, transactions and trace spans are written by a background writer.

Variable (after the prefix) Default
TELEMETRY_WRITER_ENABLED true
TELEMETRY_WRITER_BATCH_SIZE 200
TELEMETRY_WRITER_FLUSH_INTERVAL_S 0.5
TELEMETRY_WRITER_CLEANUP_INTERVAL_S 60
TELEMETRY_WRITER_MAX_QUEUE 100000
TELEMETRY_WRITER_SHUTDOWN_DRAIN_S 5
MAX_TRANSACTIONS_TO_KEEP (per flow) 3000
MAX_VERTEX_BUILDS_TO_KEEP 3000
MAX_VERTEX_BUILDS_PER_VERTEX 50
MAX_TEXT_LENGTH 6000
MAX_ITEMS_LENGTH 1000

Model components read their API keys from fields. These default to variable names such as OPENAI_API_KEY. The value is looked up in this order:

  1. request variables (X-NEXURA-GLOBAL-VAR-<NAME> headers)
  2. the flow owner’s stored variables
  3. the process environment, only with --env-variables

An unset variable fails the component, and the error names the variable. Provider clients never read credentials from the environment on their own.

After cargo build --release -p weftra-server --bin weftra, the binary is target/release/weftra.

WEFTRA_SUPERUSER=admin \
WEFTRA_SUPERUSER_PASSWORD='<a strong password>' \
./target/release/weftra --host 0.0.0.0 --allow-network --data-dir /srv/weftra \
--static-dir weftra/web/dist --starters-dir weftra/fixtures/starters

On a network bind, auto-login is off unless you set it. Users sign in with the superuser account. The key file /srv/weftra/secret.key is created on first start. Keep it: a new key invalidates every session and makes stored variables unreadable. See Deployment.

Weftra is open source under Apache-2.0. Made by Liceron.