Prerequisites
Lasso requires:- Elixir 1.17+
- Erlang/OTP 26+
- Node.js 18+ (for asset compilation)
Check installed versions
Install Elixir and Erlang
If you don’t have Elixir installed:See the official Elixir installation guide for more platforms and version managers like
asdf.Install Node.js
For asset compilation:Local installation (recommended)
1
Clone the repository
2
Install Elixir dependencies
mix.exs.3
Start the Phoenix server
http://localhost:4000.You should see output like:4
Verify it's working
Open your browser to:
- Dashboard:
http://localhost:4000/dashboard - Test RPC endpoint:
http://localhost:4000/rpc/ethereum
The default profile (
config/profiles/default.yml) includes free public providers. No API keys required to start.Docker installation
Using the convenience script
The fastest way to run Lasso with Docker:- Checks Docker is installed and running
- Builds the Docker image
- Generates a
SECRET_KEY_BASE(if not set) - Starts the container at
http://localhost:4000
Manual Docker build and run
For more control:1
Build the image
- Builder stage: Compiles Elixir app, builds assets, creates release
- Runtime stage: Minimal image with only release artifacts
2
Generate a secret key
3
Run the container
http://localhost:4000.Docker Compose (production)
For production deployments with custom profiles:docker-compose.yml
Configuration
Profiles
Profiles define chains, providers, and routing policies. They live inconfig/profiles/*.yml.
The default profile (config/profiles/default.yml) is included and ready to use:
Environment variables
Profiles support${ENV_VAR} substitution for API keys:
Create a custom profile
Createconfig/profiles/production.yml:
Multi-node deployment (clustering)
For geo-distributed deployments with aggregated observability:1
Enable DNS-based discovery
Set the DNS query for node discovery:Your DNS should return all Lasso node IPs.
2
Set unique node IDs
Each node needs a unique identifier (typically a region name):Node 1 (US East):Node 2 (EU West):
3
Verify cluster formation
Check the dashboard at
http://localhost:4000/dashboard. You should see all nodes listed with their regions.Or check via IEx:Clustering is optional. A single node works great standalone. Clustering aggregates metrics for observability—it doesn’t impact routing decisions.
- Makes independent routing decisions based on local latency measurements
- Shares observability data with the cluster
- Allows regional drill-down in the dashboard
Troubleshooting
Port already in use
If port 4000 is already in use, set a different port:config/runtime.exs:
Mix not found
Ifmix is not in your PATH after installing Elixir:
Compilation errors
Clear dependencies and rebuild:Docker build failures
Ensure you have enough disk space and memory:Profile not loading
Check for YAML syntax errors:Next steps
Quickstart
Make your first RPC request through Lasso
Configuration
Customize profiles, providers, and routing strategies
Deployment
Production deployment with clustering
Architecture
Learn how Lasso works under the hood