Skip to main content

Aztec Node Installation

This guide will walk you through installing and setting up an Aztec node on your system.

System Requirements

Minimum Requirements

  • CPU: 8 cores (Intel Xeon, AMD EPYC recommended)
  • RAM: 16 GB
  • Storage: 500 GB NVMe SSD
  • Network: 1 Gbps dedicated bandwidth

Recommended Requirements

  • CPU: 16 cores
  • RAM: 32 GB
  • Storage: 1 TB NVMe SSD
  • Network: 1 Gbps dedicated bandwidth

Prerequisites

Before you begin, ensure you have:

  • Ubuntu 20.04 LTS or higher (or compatible Linux distribution)
  • Git installed
  • At least 16GB RAM and 500GB SSD
  • A stable internet connection

Installation Methods

1. Install Docker and Docker Compose

# Update package index
sudo apt update

# Install prerequisites
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common

# Add Docker GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

# Add Docker repository
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

# Install Docker
sudo apt update && sudo apt install -y docker-ce docker-ce-cli containerd.io

# Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

# Add current user to docker group
sudo usermod -aG docker $USER
newgrp docker

2. Clone Aztec Repository

# Create working directory
mkdir -p $HOME/aztec && cd $HOME/aztec

# Clone the repository
git clone https://github.com/AztecProtocol/aztec-packages.git
cd aztec-packages

3. Configure Environment

# Copy example environment file
cp .env.example .env

# Edit configuration (adjust as needed)
nano .env

Example .env configuration:

# Network Configuration
AZTEC_NETWORK=testnet
AZTEC_NODE_TYPE=full

# RPC Configuration
AZTEC_RPC_HOST=0.0.0.0
AZTEC_RPC_PORT=8545

# P2P Configuration
AZTEC_P2P_PORT=30303
AZTEC_P2P_ENABLED=true

# Ethereum L1 Configuration
ETHEREUM_RPC_URL=https://eth-mainnet.alchemyapi.io/v2/YOUR_API_KEY

# Data Directory
AZTEC_DATA_DIR=/var/aztec/data

4. Start the Node

# Start using Docker Compose
docker-compose up -d aztec-node

# Check logs
docker-compose logs -f aztec-node

Configuration Options

Node Types

  • Full Node: Stores complete blockchain data
  • Light Node: Minimal storage requirements
  • Archive Node: Stores all historical states

Network Selection

  • Testnet: --network testnet
  • Mainnet: --network mainnet (when available)
  • Local: --network local (for development)

Monitoring

Check Node Status

docker exec aztec-node aztec-cli status

View Metrics

Aztec nodes expose Prometheus metrics on port 9090:

curl http://localhost:9090/metrics

Advanced Configuration

Sequencer Configuration

For running as a sequencer, additional configuration is needed:

# Enable sequencer mode
AZTEC_SEQUENCER_ENABLED=true
AZTEC_SEQUENCER_PRIVATE_KEY=your_sequencer_private_key

# Sequencer-specific settings
AZTEC_SEQUENCER_POLLING_INTERVAL=1000
AZTEC_SEQUENCER_MAX_TX_PER_BLOCK=1000

Prover Configuration

For running as a prover, configure proving settings:

# Enable prover mode
AZTEC_PROVER_ENABLED=true
AZTEC_PROVER_PRIVATE_KEY=your_prover_private_key

# Hardware-specific settings
AZTEC_PROVER_THREADS=8
AZTEC_PROVER_MEMORY_LIMIT=16G

# GPU acceleration (optional)
AZTEC_PROVER_USE_GPU=true

Running Local Ethereum Sepolia & Beacon RPC

For better performance and reliability, you can run your own Ethereum Sepolia execution and consensus clients locally instead of relying on third-party RPC providers.

Prerequisites

  • Storage: At least 500GB free space for Sepolia chain data
  • RAM: 16GB minimum (32GB recommended)
  • CPU: 4+ cores
  • Network: Stable internet connection

1. Install Geth (Execution Client)

# Download Geth
wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.13.5-916d6a44.tar.gz
tar -xzf geth-linux-amd64-1.13.5-916d6a44.tar.gz
sudo cp geth-linux-amd64-1.13.5-916d6a44/geth /usr/local/bin/

# Create data directory
sudo mkdir -p /var/lib/geth-sepolia
sudo chown $USER:$USER /var/lib/geth-sepolia

2. Install Lighthouse (Consensus Client)

# Download Lighthouse
wget https://github.com/sigp/lighthouse/releases/download/v4.5.0/lighthouse-v4.5.0-x86_64-unknown-linux-gnu.tar.gz
tar -xzf lighthouse-v4.5.0-x86_64-unknown-linux-gnu.tar.gz
sudo cp lighthouse /usr/local/bin/

# Create data directory
sudo mkdir -p /var/lib/lighthouse-sepolia
sudo chown $USER:$USER /var/lib/lighthouse-sepolia

3. Generate JWT Secret

# Create shared JWT secret for authentication
mkdir -p ~/.ethereum
openssl rand -hex 32 > ~/.ethereum/jwt.hex

4. Start Geth (Execution Client)

# Start Geth for Sepolia
geth \
--sepolia \
--datadir /var/lib/geth-sepolia \
--http \
--http.addr 0.0.0.0 \
--http.port 8545 \
--http.api eth,net,web3,debug,admin,txpool \
--http.corsdomain "*" \
--ws \
--ws.addr 0.0.0.0 \
--ws.port 8546 \
--ws.api eth,net,web3,debug,admin,txpool \
--ws.origins "*" \
--authrpc.jwtsecret ~/.ethereum/jwt.hex \
--authrpc.addr 0.0.0.0 \
--authrpc.port 8551 \
--syncmode snap \
--gcmode archive

5. Start Lighthouse (Consensus Client)

# Start Lighthouse beacon node for Sepolia
lighthouse bn \
--network sepolia \
--datadir /var/lib/lighthouse-sepolia \
--http \
--http-address 0.0.0.0 \
--http-port 5052 \
--execution-endpoint http://localhost:8551 \
--execution-jwt ~/.ethereum/jwt.hex \
--checkpoint-sync-url https://sepolia.beaconstate.info

Option 2: Using Reth + Prysm

1. Install Reth (Alternative Execution Client)

# Install Reth
curl --proto '=https' --tlsv1.2 -sSf https://reth.rs | sh
source ~/.bashrc

# Create data directory
sudo mkdir -p /var/lib/reth-sepolia
sudo chown $USER:$USER /var/lib/reth-sepolia

2. Install Prysm (Alternative Consensus Client)

# Download Prysm
mkdir -p ~/prysm && cd ~/prysm
curl https://raw.githubusercontent.com/prysmaticlabs/prysm/master/prysm.sh --output prysm.sh && chmod +x prysm.sh

# Create data directory
sudo mkdir -p /var/lib/prysm-sepolia
sudo chown $USER:$USER /var/lib/prysm-sepolia

3. Start Reth

# Start Reth for Sepolia
reth node \
--chain sepolia \
--datadir /var/lib/reth-sepolia \
--http \
--http.addr 0.0.0.0 \
--http.port 8545 \
--http.api eth,net,web3,debug,admin,txpool \
--http.corsdomain "*" \
--ws \
--ws.addr 0.0.0.0 \
--ws.port 8546 \
--authrpc.jwtsecret ~/.ethereum/jwt.hex \
--authrpc.addr 0.0.0.0 \
--authrpc.port 8551

4. Start Prysm Beacon Node

# Start Prysm beacon node for Sepolia
cd ~/prysm
./prysm.sh beacon-chain \
--sepolia \
--datadir /var/lib/prysm-sepolia \
--rpc-host 0.0.0.0 \
--grpc-gateway-host 0.0.0.0 \
--grpc-gateway-port 3500 \
--execution-endpoint http://localhost:8551 \
--jwt-secret ~/.ethereum/jwt.hex \
--checkpoint-sync-url https://sepolia.beaconstate.info \
--genesis-beacon-api-url https://sepolia.beaconstate.info

Creating Systemd Services

To run your nodes as background services:

Geth Service

sudo tee /etc/systemd/system/geth-sepolia.service > /dev/null <<EOF
[Unit]
Description=Geth Sepolia Execution Client
After=network.target

[Service]
Type=simple
User=$USER
WorkingDirectory=/home/$USER
ExecStart=/usr/local/bin/geth \\
--sepolia \\
--datadir /var/lib/geth-sepolia \\
--http \\
--http.addr 0.0.0.0 \\
--http.port 8545 \\
--http.api eth,net,web3,debug,admin,txpool \\
--http.corsdomain "*" \\
--ws \\
--ws.addr 0.0.0.0 \\
--ws.port 8546 \\
--ws.api eth,net,web3,debug,admin,txpool \\
--ws.origins "*" \\
--authrpc.jwtsecret /home/$USER/.ethereum/jwt.hex \\
--authrpc.addr 0.0.0.0 \\
--authrpc.port 8551 \\
--syncmode snap \\
--gcmode archive
Restart=always
RestartSec=10
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Lighthouse Service

sudo tee /etc/systemd/system/lighthouse-sepolia.service > /dev/null <<EOF
[Unit]
Description=Lighthouse Sepolia Consensus Client
After=network.target geth-sepolia.service
Wants=geth-sepolia.service

[Service]
Type=simple
User=$USER
WorkingDirectory=/home/$USER
ExecStart=/usr/local/bin/lighthouse bn \\
--network sepolia \\
--datadir /var/lib/lighthouse-sepolia \\
--http \\
--http-address 0.0.0.0 \\
--http-port 5052 \\
--execution-endpoint http://localhost:8551 \\
--execution-jwt /home/$USER/.ethereum/jwt.hex \\
--checkpoint-sync-url https://sepolia.beaconstate.info
Restart=always
RestartSec=10
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Enable and Start Services

# Enable services
sudo systemctl daemon-reload
sudo systemctl enable geth-sepolia lighthouse-sepolia

# Start services
sudo systemctl start geth-sepolia
sudo systemctl start lighthouse-sepolia

# Check status
sudo systemctl status geth-sepolia
sudo systemctl status lighthouse-sepolia

Configure Aztec to Use Local RPCs

Once your local Ethereum clients are running, configure your Aztec node to use them:

# Set environment variables
export ETHEREUM_HOSTS="http://localhost:8545"
export L1_CONSENSUS_HOST_URLS="http://localhost:5052"

# Or in your Docker Compose configuration:
environment:
ETHEREUM_HOSTS: "http://host.docker.internal:8545"
L1_CONSENSUS_HOST_URLS: "http://host.docker.internal:5052"

Monitoring Your Local RPCs

Check Sync Status

# Check Geth sync status
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' \
http://localhost:8545

# Check Lighthouse sync status
curl http://localhost:5052/eth/v1/node/syncing

Monitor Performance

# Check Geth logs
sudo journalctl -u geth-sepolia -f

# Check Lighthouse logs
sudo journalctl -u lighthouse-sepolia -f

# Monitor resource usage
htop
df -h # Check disk usage

Benefits of Running Local RPCs

Better Performance: No network latency to external providers ✅ No Rate Limits: Full control over request limits ✅ Better Reliability: No dependency on third-party services ✅ Cost Savings: No fees for RPC requests ✅ Privacy: Your requests don't go through external services ✅ Full Control: Access to debug APIs and advanced features

Maintenance

# Update Geth
wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-latest.tar.gz
# Extract and replace binary

# Update Lighthouse
wget https://github.com/sigp/lighthouse/releases/latest/download/lighthouse-v4.5.0-x86_64-unknown-linux-gnu.tar.gz
# Extract and replace binary

# Restart services after updates
sudo systemctl restart geth-sepolia lighthouse-sepolia

Next Steps

After successfully installing your Aztec node, you can:

  1. Run a Sequencer - Participate in block production
  2. Run a Prover - Generate zero-knowledge proofs
  3. Monitor Your Node - Set up monitoring and alerts

Resources