Configuration

The server is configured by two files:

1. wasmx.json

The base structure after initialization:

{
  "env_file": ".env",
  "userx": {
    "admin_url": "${USERX_ADMIN_URL}",
    "public_url": "${USERX_PUBLIC_URL}",
    "login": {
      "credential": "${USERX_ADMIN_CREDENTIAL}",
      "password": "${USERX_ADMIN_PASSWORD}"
    }
  },
  "resources": []
}

wasmx add maintains resources. Each entry contains roughly:

FieldDescription
nameResource name: resx, msgx, userx, conn, agix
pathWASM path relative to the deployment directory
prefixRoute prefix; resx uses /, others use /<name>
rate_limitHost-level per-minute limits
control_planeWhether this is a control-plane resource (resx)
allow_http / allow_backendResource capability switches
providersOptional conn backend list; empty by default and filled with locally installed CLIs

2. .env

Initialization writes .env.example; copy it and edit:

cp .env.example .env

Key variables:

VariableDescription
WASMX_ADDRListen address, defaults to 127.0.0.1:3001
WASMX_DBSQLite path, defaults to sqlite://data/keragi.db
JWT_SECRETShared signing secret for the host and userx, at least 32 characters
BOOTSTRAP_ADMIN_CREDENTIALInitial administrator account
BOOTSTRAP_ADMIN_PASSWORDInitial administrator password
USERX_ADMIN_URL / USERX_PUBLIC_URLHow the host reaches userx
USERX_ADMIN_CREDENTIAL / USERX_ADMIN_PASSWORDuserx administrator credentials

Generate a random secret:

openssl rand -base64 48

Never commit .env or put it in a publicly accessible directory.

3. Resource prefixes

ResourcePrefix
resx/
msgx/msgx
userx/userx
conn/conn
agix/agix

The web client’s config.json must match these prefixes.

4. Restart after changes

wasmx stop
wasmx start
wasmx status

Follow the logs:

tail -f wasmx.log

5. Security notes

Next steps