Enclave is now The Interfold. Documentation is being updated.
Ciphernode Operators
Running a Ciphernode

Running a Ciphernode

This guide covers three methods to run a ciphernode, from easiest to most flexible. Choose the method that best fits your infrastructure.

Method 1: DappNode (Easiest)

DappNode provides a user-friendly interface for running a ciphernode with minimal configuration.

Installation

  1. Open your DappNode UI (http://my.dappnode)

  2. Search for "Enclave Ciphernode" (the current package name for the Interfold ciphernode) and install the package

  3. The setup wizard will prompt you for:

    • RPC_URL - WebSocket RPC endpoint (e.g., wss://ethereum-sepolia-rpc.publicnode.com)
    • NETWORK - Network name (e.g., sepolia, mainnet)
    • Contract addresses and deploy blocks
    • Node role (ciphernode or aggregator)
    • Optional: encryption password, network key, private key
  4. Confirm and complete the installation

  5. Check Packages → enclave-ciphernode → Logs to verify the node started

Configuration via Environment Variables

VariableDescriptionRequired
RPC_URLWebSocket RPC endpointYes
NETWORKNetwork name (sepolia, mainnet, etc.)No
NODE_ROLEciphernode or aggregatorNo
NODE_ADDRESSYour Ethereum addressNo
QUIC_PORTUDP port for P2P networking (default: 37173)No
ENCRYPTION_PASSWORDPassword to encrypt local dataNo
NETWORK_PRIVATE_KEYlibp2p network key (ed25519)No
PRIVATE_KEYEthereum private key (for aggregator)No
PEERSComma-separated peer multiaddressesNo

Method 2: Interfold CLI (Recommended)

The Interfold CLI provides the most control and is recommended for production deployments.

Install the CLI

# Quick install
curl -fsSL https://raw.githubusercontent.com/gnosisguild/enclave/main/install | bash
 
# Then install the CLI
enclaveup install

Initialize Configuration

enclave ciphernode setup

This creates ~/.config/enclave/enclave.config.yaml. You'll be prompted for a password to encrypt sensitive data.

Set Up Credentials

# Set encryption password (encrypts local keystore)
enclave password set
 
# Generate or set network keypair (for libp2p)
enclave net keypair generate
# Or import an existing key:
# enclave net keypair set --net-keypair 0x...
 
# Set your wallet private key (for on-chain transactions)
enclave wallet set --private-key 0xYourPrivateKey

Configure Your Node

Edit ~/.config/enclave/enclave.config.yaml:

node:
  address: '0xYourAddress'
  quic_port: 9091
  peers:
    - '/dnsaddr/bootstrap.enclave.gg'
  autonetkey: true
  autopassword: true
 
chains:
  - name: sepolia
    rpc_url: 'wss://ethereum-sepolia-rpc.publicnode.com'
    contracts:
      enclave:
        address: '0x450015E41E1F6b6AfaEbf598E32a8d02a368c0A0'
        deploy_block: 10395619
      ciphernode_registry:
        address: '0xc8D2880c59D5e807eFFDee3451fb0Aa97f6aefDA'
        deploy_block: 10395615
      bonding_registry:
        address: '0x1323d235Cd040d64D01d3C2adf084F9A16a675aE'
        deploy_block: 10395616

Start Your Node

# Start in foreground with verbose logging
enclave start -v
 
# Or use the node supervisor for multiple nodes
enclave nodes up --detach
enclave nodes ps          # Check status
enclave nodes logs cn1    # View logs
enclave nodes down        # Stop all nodes

CLI Commands Reference

CommandDescription
enclave startStart the node in foreground
enclave start -vStart with INFO logging (-vv=DEBUG, -vvv=TRACE)
enclave nodes upStart all configured nodes
enclave nodes up --detachStart all nodes in background
enclave nodes up --exclude xStart all nodes except x
enclave nodes downStop all nodes
enclave nodes psList running nodes and their status
enclave nodes start <name>Start an individual node
enclave nodes stop <name>Stop an individual node
enclave nodes status <name>Check specific node status
enclave nodes restart <name>Restart a specific node
enclave nodes purgePurge all local ciphernode data
enclave ciphernode statusShow on-chain registration status
enclave net get-peer-idShow your libp2p peer ID
enclave wallet getShow your wallet address
enclave revShow the git SHA the CLI was built from
enclave purge-allWipe all local data (use with caution)
enclave print-envPrint contract addresses as env vars
enclave print-env --vitePrint env vars with VITE_ prefix
enclave print-env --chain xPrint env vars for chain x
enclave noir statusCheck ZK prover status
enclave noir setupInstall/update ZK prover components

Method 3: Docker

For containerized deployments, you can run the ciphernode Docker image directly.

Pull the Image

docker pull ghcr.io/gnosisguild/ciphernode:latest

Create Configuration

Create a config.yaml file:

node:
  address: '0xYourAddress'
  quic_port: 9091
  peers:
    - '/dnsaddr/bootstrap.enclave.gg'
  autonetkey: true
  autopassword: true
 
chains:
  - name: sepolia
    rpc_url: 'wss://ethereum-sepolia-rpc.publicnode.com'
    contracts:
      enclave:
        address: '0x450015E41E1F6b6AfaEbf598E32a8d02a368c0A0'
        deploy_block: 10395619
      ciphernode_registry:
        address: '0xc8D2880c59D5e807eFFDee3451fb0Aa97f6aefDA'
        deploy_block: 10395615
      bonding_registry:
        address: '0x1323d235Cd040d64D01d3C2adf084F9A16a675aE'
        deploy_block: 10395616

Run the Container

docker run -d \
  --name ciphernode \
  -v $(pwd)/config.yaml:/home/ciphernode/.config/enclave/config.yaml:ro \
  -v ciphernode-data:/home/ciphernode/.local/share/enclave \
  -p 9091:9091/udp \
  -e ENCRYPTION_PASSWORD=your_password \
  -e PRIVATE_KEY=0xYourPrivateKey \
  ghcr.io/gnosisguild/ciphernode:latest

Docker Compose

For a more manageable setup, use Docker Compose:

services:
  ciphernode:
    image: ghcr.io/gnosisguild/ciphernode:latest
    restart: unless-stopped
    volumes:
      - ./config.yaml:/home/ciphernode/.config/enclave/config.yaml:ro
      - ciphernode-data:/home/ciphernode/.local/share/enclave
    ports:
      - '9091:9091/udp'
    environment:
      ENCRYPTION_PASSWORD: ${ENCRYPTION_PASSWORD}
      PRIVATE_KEY: ${PRIVATE_KEY}
 
volumes:
  ciphernode-data:

View Logs

docker logs -f ciphernode

Configuration Reference

Node Configuration

FieldDescriptionDefault
addressYour Ethereum addressRequired
quic_portUDP port for QUIC/libp2p networking9091
peersBootstrap peer multiaddresses[]
autopasswordAuto-generate password if missingfalse
autowalletAuto-load wallet from environmentfalse
data_dirOverride data directory~/.local/share/enclave
config_dirOverride config directory~/.config/enclave

Chain Configuration

FieldDescriptionRequired
nameChain identifierYes
rpc_urlWebSocket RPC endpointYes
contractsContract addresses and deploy blocksYes

Contract Addresses

Each chain requires these contract addresses:

ContractDescriptionRequired for ciphernode
enclaveMain Interfold coordinator contractYes
ciphernode_registryTracks registered operatorsYes
bonding_registryManages bonds and ticketsYes
slashing_managerManages slashing penaltiesYes
e3_programE3 Program contract addressNo
fee_tokenStablecoin address for fees and ticketsNo

Each contract can be specified as a simple address string or with a deploy block for faster syncing:

contracts:
  enclave:
    address: '0x450015E41E1F6b6AfaEbf598E32a8d02a368c0A0'
    deploy_block: 10395619
  ciphernode_registry: '0xc8D2880c59D5e807eFFDee3451fb0Aa97f6aefDA'

Networking Requirements

Firewall Configuration

Open the following ports:

PortProtocolPurpose
9091UDPQUIC/libp2p P2P networking

Bootstrap Peers

Connect to the Interfold bootstrap network:

peers:
  - '/dnsaddr/bootstrap.enclave.gg'

Or specify individual peers:

peers:
  - '/dns4/node1.example.com/udp/9091/quic-v1'
  - '/ip4/192.168.1.100/udp/9091/quic-v1'

Data Directories

DirectoryContents
~/.config/enclave/Configuration files, network keys
~/.local/share/enclave/Databases, job data, keystores
~/.local/share/enclave/jobs/Per-E3 secret shares and state

Back up these directories regularly. The jobs/ directory contains encrypted key shares for active E3s - losing this data while participating in a committee may result in slashing.


Monitoring

Log Levels

Control verbosity with the -v flag:

FlagLevelDescription
(none)WARNWarnings and errors only
-vINFONormal operation logs
-vvDEBUGDetailed debug output
-vvvTRACEFull trace logging

Key Events to Watch

EventMeaning
E3RequestedNew computation request detected
TicketGeneratedYour sortition ticket was calculated
CiphernodeSelectedYou were selected for a committee
KeyshareCreatedYour key share was generated
PublicKeyAggregatedCommittee public key is ready
CiphertextOutputPublishedTime to generate decryption share
DecryptionshareCreatedYour decryption share was published
PlaintextAggregatedFinal result is available

Next Steps

Once your node is running:

  1. Register & License - Bond ENCL and register as an operator
  2. Add Tickets - Purchase tickets to participate in sortition