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.
Bind address rules
Section titled “Bind address rules”- The server binds
127.0.0.1:7860by 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 embedserve()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.
First start: superuser and secret key
Section titled “First start: superuser and secret key”- When no superuser exists, the server creates one from
WEFTRA_SUPERUSER(defaultadmin) andWEFTRA_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.
Data directory and SQLite
Section titled “Data directory and SQLite”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.
Docker
Section titled “Docker”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/.
Build and run with compose
Section titled “Build and run with compose”cd deploy/weftracp .env.example .env # then fill WEFTRA_SUPERUSER_PASSWORD and WEFTRA_SECRET_KEYdocker compose up -d --buildWhat the compose file does:
- builds the image with the web studio and the 27 starter flows included
- runs
--host 0.0.0.0 --allow-networkinside the container with data in theflow-datavolume (/app/data/weftra.db,/app/data/files) - sets
WEFTRA_AUTO_LOGIN=false, so users sign in - publishes the port on
127.0.0.1only (WEFTRA_HOST_PORT, default 7860) - checks health with
GET /health_check, which runsSELECT 1against the database - runs as uid 10001;
docker stopdrains 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.
Build the image only
Section titled “Build the image only”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.
Exposing it
Section titled “Exposing it”The port is published on 127.0.0.1 only. To expose it:
- Put a TLS-terminating reverse proxy in front.
- Set
WEFTRA_REFRESH_SECURE=trueandWEFTRA_ACCESS_SECURE=true, so cookies are sent over HTTPS only. - Set
WEFTRA_PUBLIC_URLto the externalhttpsURL, so webhook URLs and A2A cards point to the right place. - Only then change the published address.
Python custom components in Docker
Section titled “Python custom components in Docker”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.
Checklist for a reachable server
Section titled “Checklist for a reachable server”--allow-network, auto-login off- a strong
WEFTRA_SUPERUSER_PASSWORD; a long randomWEFTRA_SECRET_KEY, or a kept key file - TLS in front, and
WEFTRA_ACCESS_SECURE/WEFTRA_REFRESH_SECUREset totrue WEFTRA_ENABLE_SIGNUP=falseunless 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.