Skip to main content

Quickstart

To build on EigenCompute:

  1. Place your application in a Docker container.
  2. Subscribe to EigenCompute. All new customers receive a $100 credit.
  3. Upload it to EigenCompute using the ecloud CLI.

It's that simple to ship a verifiable application.

See for yourself

$ecloud compute app create --name my-trading-bot --language typescript
⏎ Click anywhere or press Enter to run this command
Deploy Your Own →

Next

Get started with ecloud CLI and deploy your first verifiable application to a Trusted Execution Environment (TEE) in minutes.

Prerequisites

Before you begin, ensure you have:

  • Docker - To package and publish application images (Download)
  • Testnet or Mainnet ETH - For deployment transactions

Installation

npm install -g @layr-labs/ecloud-cli

Initial Setup

Docker Login

First, log in to your Docker registry. This is required to push your application images:

docker login

Authenticate with EigenCloud

You have two options for authentication:

Option 1: Use an Existing Private Key

ecloud auth login

This command will prompt you to enter your private key and store it securely in your OS keyring.

Option 2: Generate a New Private Key

ecloud auth generate --store

This generates a new private key and stores it securely.

Get Testnet Funds

Check your wallet address:

ecloud auth whoami
Address: 0x9431Cf5DA0CE60664661341db650763B08286B18
Source: stored credentials

The current environment (Mainnet or Sepolia testnet) is displayed. To change from Mainnet to Sepolia, use ecloud compute env set sepolia.

Developing on Sepolia

To get testnet ETH, use:

Create & Deploy Your First App

Create a New Application

Create a new application from a template. Choose from: typescript, python, golang, or rust

ecloud compute app create --name my-app --language typescript --template-repo minimal
cd my-app

This creates a new project with:

  • Application code from the template
  • A Dockerfile configured for TEE deployment
  • An .env.example file for environment variables

Templates include:

  1. TEE-Ready Dockerfile. Pre-configured to:
  • Target linux/amd64 architecture.
  • Run as root user (required for TEE).
  • Include necessary system dependencies.
  1. Environment Variable Handling. Access to:
  • MNEMONIC - Auto-generated wallet mnemonic.
  • Custom environment variables from .env.
  1. Example Code. Demonstrates:
  • Accessing the TEE mnemonic.
  • Creating wallet accounts.
  • Making onchain transactions.
  • Environment variable usage.
  1. Development Setup. Includes:
  • Local development instructions.
  • Testing guidelines.
  • Deployment best practices.

Configure Environment Variables

cp .env.example .env

Edit .env to add any environment variables your application needs:

# Example .env content
API_KEY=your_api_key_here
DATABASE_URL=your_database_url

# Variables with _PUBLIC suffix are visible to users
NETWORK_PUBLIC=sepolia

Variables with the _PUBLIC suffix will be visible to users for transparency. Standard variables remain encrypted within the TEE.

Auto-Generated MNEMONIC

The MNEMONIC environment variable is automatically provided by KMS at runtime. Any mnemonic in .env.example is just a placeholder. The TEE overwrites it with your app's unique, persistent KMS-generated mnemonic.

Test locally (if needed)

npm install
npm run dev

Subscribe to EigenCompute

Before deploying, you'll need an EigenCompute subscription.

To subscribe:

ecloud billing subscribe

The payment portal is displayed. Enter your payment method details and click the Subscribe button.

Deploy to TEE

Deploy your application to a Trusted Execution Environment:

ecloud compute app deploy

When prompted, select Build and deploy from Dockerfile option.

The CLI will:

  1. Build your Docker image targeting linux/amd64
  2. Push the image to your Docker registry
  3. Deploy to a TEE instance
  4. Return your app details including app ID and instance IP

View Your Application

After deployment, view your app's information:

ecloud compute app info

Port Configuration

To make your application accessible over the internet, you need to expose ports in your Dockerfile.

Basic Port Exposure

Add the EXPOSE directive to your Dockerfile:

FROM --platform=linux/amd64 node:18
USER root
WORKDIR /app
COPY . .
RUN npm install

# Expose the port your app listens on
EXPOSE 3000

CMD ["npm", "start"]

Application Binding

Your application must bind to 0.0.0.0 (not localhost) to be accessible.

For more advanced port configuration including multiple ports and port ranges, see the Port Exposure Guide.

Next Steps

  • Explore CLI Commands - Learn about all available commands
  • Review Core Concepts - Deep dive into keys, environment variables, and security

Troubleshooting

Docker Build Fails

Ensure your Dockerfile targets the correct platform:

FROM --platform=linux/amd64 node:18

Deployment Transaction Fails

Check your ETH balance:

ecloud auth whoami

Ensure you have sufficient mainnet ETH for deployment transactions.

Image Push Fails

Ensure you're logged into Docker:

docker login

App Not Starting

Check your app logs for errors:

ecloud compute app logs

Common issues:

  • Port conflicts - ensure APP_PORT is set correctly
  • Missing environment variables
  • Application crashes - check your code

Get Help