Skip to main content
Version: Next

Environment Variables

Merobox supports several environment variables for configuration, allowing you to customize Docker images, logging, networking, and other aspects of the system.

Core Configuration

Basic environment variables for Merobox operation:

# Docker daemon connection (standard Docker environment variable)
export DOCKER_HOST="unix:///var/run/docker.sock"

# Logging level (if supported by Merobox)
export LOG_LEVEL="INFO" # DEBUG, INFO, WARNING, ERROR

Docker Configuration

Standard Docker environment variables:

# Docker daemon settings
export DOCKER_HOST="unix:///var/run/docker.sock"
export DOCKER_TLS_VERIFY="1"
export DOCKER_CERT_PATH="/path/to/certs"

# Docker build settings
export DOCKER_BUILDKIT="1" # Enable BuildKit
export DOCKER_CLI_EXPERIMENTAL="enabled" # Enable experimental features

Authentication Service

The authentication service is configured through CLI flags, not environment variables:

# Enable authentication service
merobox run --auth-service

# Use custom auth service image
merobox run --auth-service --auth-image ghcr.io/calimero-network/mero-auth:latest

Network Configuration

Network settings are configured through CLI flags:

# Custom base ports
merobox run --base-port 3000 --base-rpc-port 4000

# Use different port ranges
merobox run --count 3 --base-port 3000 --base-rpc-port 4000

Development and Testing

For development and testing, use CLI flags instead of environment variables:

# Development mode (if supported)
merobox run --count 1 --verbose

# Testing with custom configuration
merobox run --count 2 --prefix test-nodes

Production Configuration

For production deployments, use CLI flags and workflow configuration:

# Production deployment
merobox run --count 5 --image ghcr.io/calimero-network/merod:latest

# With authentication service
merobox run --count 5 --auth-service --image ghcr.io/calimero-network/merod:latest

Best Practices

Environment Management

  1. Use CLI flags: Prefer CLI flags over environment variables when possible
  2. Documentation: Document all custom configurations
  3. Testing: Test configurations before deployment

Security Considerations

  1. Secrets: Never store secrets in version control
  2. Access control: Limit access to production configurations
  3. Auditing: Log configuration changes for audit purposes

Next Steps

Now that you understand environment variables:

Was this page helpful?
Need some help? Check Support page