Skip to content

Deployment

Release binaries and published Docker images are coming with the first release. For now you build the binary from source, or build the Docker image locally.

  • The server binds 127.0.0.1:7860 by default.
  • A non-loopback address (for example --host 0.0.0.0) is refused unless you add --allow-network. The same check runs when you embed serve() in your own program.
  • Auto-login is on by default only for loopback binds. On a network bind it is off, and users must sign in. You can force it with --auto-login, but then anyone who can reach the server acts as the superuser, and the server prints a warning.
  • --no-auth (legacy single-user mode) on a network bind needs --require-api-key.
  • When no superuser exists, the server creates one from WEFTRA_SUPERUSER (default admin) and WEFTRA_SUPERUSER_PASSWORD. Without auto-login, an empty password stops startup. There are no default credentials. With auto-login, a random password is generated and never shown.
  • The secret key encrypts stored credentials and signs session tokens. It comes from WEFTRA_SECRET_KEY (a passphrase of 32 or more random characters) or from a key file, by default <data dir>/secret.key, created with mode 0600.
  • Changing the key invalidates every session and makes stored variables unreadable. Back it up with the database.

By default everything lives in ~/.weftra/:

Path What it is
weftra.db the SQLite database: users, flows, projects, variables, messages, jobs, traces and more
files/ uploaded files
secret.key the key file, when you do not set WEFTRA_SECRET_KEY

--data-dir moves all three. --db and --files-dir override single paths.

The database file runs in WAL mode. All writes go through one writer connection, and reads use a pool of five. Postgres is not supported.

The background telemetry writer queues build and trace rows. A normal shutdown (SIGINT or SIGTERM) drains the queue for up to 5 s. Rows still queued when the process is killed are lost.

The repository has one shared multi-stage deploy/Dockerfile (Rust release build, optional web build, slim non-root Debian runtime with tini) and a compose setup for Weftra in deploy/weftra/.

cd deploy/weftra
cp .env.example .env # then fill WEFTRA_SUPERUSER_PASSWORD and WEFTRA_SECRET_KEY
docker compose up -d --build

What the compose file does:

  • builds the image with the web studio and the 27 starter flows included
  • runs --host 0.0.0.0 --allow-network inside the container with data in the flow-data volume (/app/data/weftra.db, /app/data/files)
  • sets WEFTRA_AUTO_LOGIN=false, so users sign in
  • publishes the port on 127.0.0.1 only (WEFTRA_HOST_PORT, default 7860)
  • checks health with GET /health_check, which runs SELECT 1 against the database
  • runs as uid 10001; docker stop drains cleanly

.env.example documents the other settings: sign-up, cookie security, CORS, public URL, upload size, fake models, MCP stdio, private destinations, and alias names. Do not commit .env.

From the repository root:

docker build -f deploy/Dockerfile \
--build-arg PACKAGE=weftra-server --build-arg BIN=weftra --build-arg WEB_UI=1 \
-t liceron/weftra .

The Dockerfile uses BuildKit cache mounts. CARGO_BUILD_JOBS (build argument, default 2) limits parallel compile jobs.

The port is published on 127.0.0.1 only. To expose it:

  1. Put a TLS-terminating reverse proxy in front.
  2. Set WEFTRA_REFRESH_SECURE=true and WEFTRA_ACCESS_SECURE=true, so cookies are sent over HTTPS only.
  3. Set WEFTRA_PUBLIC_URL to the external https URL, so webhook URLs and A2A cards point to the right place.
  4. Only then change the published address.

The default image contains no Python. To run Python custom components, build the derived image and turn the feature on at run time:

docker build -f deploy/weftra/Dockerfile.python \
--build-arg BASE=liceron/weftra --build-arg LFX_VERSION=1.13.4 \
-t liceron/weftra-python .
# in .env: WEFTRA_PYTHON_COMPONENTS=true (WEFTRA_PYTHON is preset to /opt/lfx/bin/python)

Component code runs as the container user, with access to the data volume. It is not a sandbox. Keep auto-login off: the server refuses Python components with auto-login on a network bind.

  • --allow-network, auto-login off
  • a strong WEFTRA_SUPERUSER_PASSWORD; a long random WEFTRA_SECRET_KEY, or a kept key file
  • TLS in front, and WEFTRA_ACCESS_SECURE / WEFTRA_REFRESH_SECURE set to true
  • WEFTRA_ENABLE_SIGNUP=false unless you want public sign-up (new accounts stay inactive until a superuser activates them)
  • CORS left off unless a separate front end needs it
  • backups of weftra.db, files/ and the key

See Security notes.

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