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" 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: Enclave CLI (Recommended)

The Enclave 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 config-set \
  --rpc-url wss://ethereum-sepolia-rpc.publicnode.com \
  --eth-address 0xYourAddress

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: '0x01E657C16192854E8d7D7055228C7D6532E345Be'
        deploy_block: 9761354
      ciphernode_registry:
        address: '0x754490FF874f24fe36124006f9fE0bBaCADDd746'
        deploy_block: 9761351
      bonding_registry:
        address: '0xA8E7583955797F4C3827eC7bf20872C687bD6313'
        deploy_block: 9761313

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 nodes upStart all configured nodes
enclave nodes downStop all nodes
enclave nodes psList running nodes
enclave nodes status <name>Check specific node status
enclave nodes restart <name>Restart a specific node
enclave ciphernode statusShow on-chain registration status
enclave purge-allWipe all local data (use with caution)

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: '0x01E657C16192854E8d7D7055228C7D6532E345Be'
        deploy_block: 9761354
      ciphernode_registry:
        address: '0x754490FF874f24fe36124006f9fE0bBaCADDd746'
        deploy_block: 9761351
      bonding_registry:
        address: '0xA8E7583955797F4C3827eC7bf20872C687bD6313'
        deploy_block: 9761313

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[]
autonetkeyAuto-generate network key if missingfalse
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:

ContractDescription
enclaveMain Enclave coordinator
ciphernode_registryTracks registered operators
bonding_registryManages bonds and tickets
fee_tokenOptional: stablecoin address for tickets

Networking Requirements

Firewall Configuration

Open the following ports:

PortProtocolPurpose
9091UDPQUIC/libp2p P2P networking

Bootstrap Peers

Connect to the Enclave 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