Quick Start
The fastest way to run Lasso RPC with Docker:Run the Docker script
- Validates Docker is installed and running
- Builds the image as
lasso-rpc - Generates a
SECRET_KEY_BASEif not set - Starts the container with port 4000 exposed
Access the dashboard
Open your browser to:
- Dashboard: http://localhost:4000
- RPC Endpoint: http://localhost:4000/rpc/fastest/ethereum
Dockerfile Architecture
The Dockerfile uses a two-stage build for optimal image size:Build Stage
Runtime Stage
Manual Docker Commands
Building the Image
Running the Container
Basic run with required environment variables:Environment Variables
Required for Production
| Variable | Description | Example |
|---|---|---|
SECRET_KEY_BASE | Phoenix signing/encryption secret (64+ bytes) | Generate with mix phx.gen.secret |
PHX_HOST | Public hostname for URL generation | rpc.example.com |
LASSO_NODE_ID | Unique, stable node identifier | us-east-1 |
PHX_SERVER | Set to true to start HTTP server | true (set by default in Dockerfile) |
Optional Configuration
| Variable | Description | Default |
|---|---|---|
PORT | HTTP listener port | 4000 |
LASSO_VM_METRICS_ENABLED | Enable VM metrics collection | true |
LASSO_DATA_DIR | Data directory for profile persistence | Not set |
Provider API Keys
Pass provider API keys as environment variables:${ENV_VAR} syntax:
Volume Mounts
Custom Profiles
Mount a custom profiles directory:Persistent Data Directory
UseLASSO_DATA_DIR to persist profile modifications:
/data/config/profiles on first run.
Docker Compose
Exampledocker-compose.yml:
Health Checks
The health endpoint is available at/api/health:
Container Registry
Push to a container registry:Entrypoint Script
The container uses/app/entrypoint.sh to handle initialization:
- Automatic profile seeding on first run
- Persistent profile storage with volume mounts
- Foreground process execution for container lifecycle
Next Steps
- Clustering - Connect multiple Docker containers
- Geo-Distributed Deployment - Multi-region setup
- Production Checklist - Pre-launch verification