Configuration variables
All configuration options can be set via environment variables using theERST_ prefix.
Network and RPC
Single RPC endpoint URL for connecting to the Stellar network.
Comma-separated list of RPC URLs for automatic fallback.
Alternative to
ERST_RPC_URLS. Comma-separated list of RPC URLs.ERST_RPC_URLS takes precedence if both are set.Network identifier:
public, testnet, futurenet, or standalone.Authentication token for RPC endpoints that require authorization.
Simulator configuration
Custom path to the
erst-sim binary.If not set, Erst searches in order:
./erst-sim(current directory)./simulator/target/release/erst-sim(development path)- System PATH
Logging
Unified log level for both the Go CLI and Rust simulator.Valid values:
trace, debug, info, warn, errorThe
--verbose / -v flag is a shorthand that sets the log level to debug for that invocation.Override Rust simulator logging independently. When both
ERST_LOG_LEVEL and RUST_LOG are set, the simulator prefers ERST_LOG_LEVEL.Storage and caching
Directory for storing transaction traces and snapshots.
Request settings
HTTP request timeout in seconds. Must be an integer between 1 and 300.
Sandbox mode
Hard cap (in stroops) on the sum of native XLM payment amounts in transaction envelopes during simulation.Used in local/sandbox mode to simulate realistic economic constraints during integration tests.Request-level
sandbox_native_token_cap_stroops overrides this when set programmatically.Crash reporting
Enable anonymous crash reporting.Valid values:
1, true, yes (enable) or 0, false, no (disable)Override the crash report collection endpoint.
Sentry DSN for crash reporting.
HSM configuration
Path to PKCS#11 module for Hardware Security Module (HSM) support.
Maximum requests per minute to protect HSM from rate limiting.
Unified logging behavior
SettingERST_LOG_LEVEL controls verbosity across the entire tool chain:
- The Go CLI reads the variable at startup to configure its
sloglogger - When spawning the Rust simulator, it translates the value into a
RUST_LOGfilter - Both processes honor the same log level
RUST_LOG directly. When both variables are present, the simulator prefers ERST_LOG_LEVEL.
Usage examples
Linux and macOS
Setting environment variables
Temporary override (single command)
Adding to shell profile
~/.bashrc or ~/.zshrc
Windows PowerShell
Setting environment variables
Persistent environment variables
Docker
Dockerfile
Docker Compose
docker-compose.yml
Docker run
CI/CD pipelines
GitHub Actions
.github/workflows/test.yml
GitLab CI
.gitlab-ci.yml
Custom network with environment variables
Sandbox token cap for integration tests
Simulate realistic economic constraints in CI:You can also set
sandbox_native_token_cap_stroops on the simulation request when building it programmatically. The request value overrides the environment variable.Best practices
Security
- Never commit secrets: Don’t commit
.envfiles or API tokens to version control - Use CI/CD secrets: Store sensitive values in your CI/CD platform’s secret management
- Restrict permissions: Use environment variables for credentials rather than config files
Organization
- Use
.envfiles locally: Keep local development settings in.env(add to.gitignore) - Document required variables: List all required environment variables in your README
- Provide example files: Include
.env.examplewith dummy values
Development vs production
.env.development
.env.production
Troubleshooting
Verification
Check if environment variables are set:Common issues
Environment variable not taking effect
Environment variable not taking effect
Ensure the variable is exported:
Docker environment variables not working
Docker environment variables not working
Use
-e flag or environment in docker-compose:CI/CD variables not recognized
CI/CD variables not recognized
Check variable naming and ensure they’re exported in the job environment, not just set as CI/CD variables.
Notes
- All environment variables are optional and have sensible defaults
- Environment variables override configuration file settings
- Command-line flags override environment variables
- The simulator binary path detection works out-of-the-box for development and production
- If the simulator binary cannot be found, Erst displays a helpful error with setup instructions