Skip to content
v0.2.8-beta

Configuration

Tarn can be configured via command-line flags or environment variables.

Server Flags

bash
./tarn start [options]
FlagEnv VariableDefaultDescription
--hostTARN_HOST0.0.0.0Bind address
--portTARN_PORT4566API port
--regionTARN_REGIONus-east-1Emulated AWS region
--data-dirTARN_DATA_DIR~/.tarn/dataPersistent storage location
--persistTARN_PERSISTtruePersist state across restarts
--uiTARN_UI_ENABLEDfalseEnable dashboard UI (localhost:4566)
--ui-dirTARN_UI_DIR./ui/buildPath to built UI assets
--expose-secrets-proxyTARN_EXPOSE_SECRETS_PROXYfalseRun the local secrets extension-compatible proxy
--secrets-proxy-hostTARN_SECRETS_PROXY_HOST127.0.0.1Bind address for the local secrets proxy
--secrets-proxy-portTARN_SECRETS_PROXY_PORT2773Port for the local secrets proxy
--secrets-proxy-tokenTARN_SECRETS_PROXY_TOKENlocal-dev-tokenExpected extension token value
--secrets-proxy-require-tokenTARN_SECRETS_PROXY_REQUIRE_TOKENtrueRequire token validation on the secrets proxy
--vault-keyTARN_VAULT_KEY~/.tarn/vault.keyAES-256 key file used to encrypt secrets at rest

Examples

Local Development (with Dashboard)

bash
./tarn start \
  --port 4566 \
  --region us-east-1 \
  --persist \
  --ui

Then open http://127.0.0.1:4566 to see the dashboard.

With Custom Data Directory

bash
export TARN_DATA_DIR=/tmp/tarn-dev
./tarn start --persist

Multiple Regions

bash
# Terminal 1
./tarn start --port 4566 --region us-east-1

# Terminal 2
./tarn start --port 4567 --region eu-west-1

# In your code
const lambdaEast = new LambdaClient({ endpoint: "http://127.0.0.1:4566" });
const lambdaWest = new LambdaClient({ endpoint: "http://127.0.0.1:4567" });

Infrastructure Probing

Infrastructure probing is enabled by default. Tarn can probe common local dependencies such as PostgreSQL, Redis, MySQL, and MongoDB, which is useful when frontend applications or local dashboards need a quick view of what backing services are reachable in a development environment.

Configure it with environment variables:

bash
export TARN_INFRA_PROBE=true
export TARN_INFRA_TARGETS="postgresql:localhost:5432,redis:localhost:6379"

./tarn start

Secrets Encryption

Secrets are encrypted at rest by default using an AES-256 vault key stored at ~/.tarn/vault.key.

Use a custom key path:

bash
./tarn start --vault-key ~/.tarn/vault.key

The key file is created automatically if it does not exist. To disable secrets encryption entirely, start Tarn with --vault-key "".

Environment-Based Configuration

You can also pass all flags via environment variables:

bash
export TARN_PORT=4566
export TARN_REGION=us-east-1
export TARN_UI_ENABLED=true
export TARN_PERSIST=true
export TARN_EXPOSE_SECRETS_PROXY=false

./tarn start

Released under the Apache 2.0 License