You must obtain an mTLS certificate from the Gateway team to network with our Storage Layer.

See Authentication Requirements to generate your certificate.

This guide walks through the process of setting up and running an Encrypted Data Vault (EDV) node. EDV nodes form the backbone of Gateway Protocol’s distributed storage network, providing secure and private data storage capabilities.

Installation Prerequisites

Before deploying an EDV node, ensure your system meets the hardware requirements outlined in the previous section and has the following software prerequisites installed:

# Install Docker Engine
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

# Verify Docker installation
docker --version

The system should have Docker Engine version 20.10 or later installed. Docker manages container deployment, ensuring consistent operation across different environments.

Configuration Options

EDV nodes offer various configuration options to customize their behavior and performance. These options can be specified as command-line arguments or environment variables.

Essential Configuration Parameters

The following parameters are crucial for proper node operation:

FieldDescription
dataCenterOrganization name
rackRack identifier within the organization
dirData directory path for storing encrypted data
events.dirDirectory path for event logs
portHTTP port for client connections (default: 8080)
port.grpcgRPC port for client connections (default: 10000+port=18080)
ipBind IP address for the node
publicUrlPublic URL or IP address for node access
mserverMaster server address for network coordination
metricsPortPort for exposing Prometheus metrics

Volume Management

EDV nodes use Docker volumes for persistent storage. The primary volumes include:

PathDescription
/etc/gatewayfs/certsDirectory for mTLS certificates (e.g., node.key, node.crt, ca.crt)
/dataPrimary storage for encrypted data
/eventsEvent log storage

See Authentication Requirements for details on requesting your certificate.

These volumes persist data across container restarts and updates. Regular backup of these volumes is recommended for data safety.

Deployment

Docker CLI

The simplest way to deploy an EDV node is using Docker. Our official Docker image contains all necessary components pre-configured for immediate deployment:

# Pull the latest EDV node image
docker pull gatewaylabs/edv:testnet

# Set environment variables
ORG="<org-name>"
RACK="<org-subidentity>"
BINDIP="<network-interface-address>"
PUBLICURL="<public-access-address>"

# Run the EDV node
docker run -d \
    --name edv1 \
    -p 8080:8080 \
    -p 18080:18080 \
    -p 1234:1234 \
    -v edv1-data:/data \
    -v edv1-events:/events \
    -v $(pwd)/ca.crt:/etc/gatewayfs/certs/ca.crt \
    -v $(pwd)/node.crt:/etc/gatewayfs/certs/node.crt \
    -v $(pwd)/node.key:/etc/gatewayfs/certs/node.key \
    --restart unless-stopped \
    --log-driver json-file \
    --log-opt max-size=200m \
    --log-opt max-file=3 \
    gatewaylabs/edv:testnet \
    -v=${VOLUME_LOG_LEVEL:-3} \
    volume -dataCenter=$ORG -rack=$RACK \
    -dir /data -events.dir /events \
    -port=8080 -ip=$BINDIP -publicUrl=$PUBLICURL \
    -mserver="testnet.edv.gateway.tech:9333" \
    -preStopSeconds=1 -metricsPort=1234

Docker Compose

For production environments, Docker Compose provides better management and configuration options. Create a docker-compose.yml file in your deployment directory:

services:
  edv1:
    image: gatewaylabs/edv:testnet
    container_name: edv1
    ports:
      - 8080:8080   # http
      - 18080:18080 # grpc
      - 1234:1234   # metrics
    environment:
      ORG: ""         # your-org
      RACK: ""        # org-subidentity
      BINDIP: ""      # network-interface-address
      PUBLICURL: ""   # public-access-address
    command: >
      -v=${VOLUME_LOG_LEVEL:-3}
      volume -dataCenter=$ORG -rack=$RACK
      -dir /data
      -events.dir /events
      -port=8080 -ip=$BINDIP -publicUrl=$PUBLICURL
      -mserver="testnet.edv.gateway.tech:9333"
      -preStopSeconds=1 -metricsPort=1234
    volumes:
      - edv1-data:/data
      - edv1-events:/events
      - ca.crt:/etc/gatewayfs/certs/ca.crt      # GatewayFS-signed Certificate
      - node.crt:/etc/gatewayfs/certs/node.crt  # Gateway-signed Certificate
      - node.key:/etc/gatewayfs/certs/node.key  # Locally created OpenSSL Key
    restart: unless-stopped
    logging:
      driver: "json-file"
      options:
        max-size: "200m"
        max-file: "3"

volumes:
  edv1-data:
  edv1-events:

Start the node using Docker Compose:

docker-compose up -d

Data Directory Structure

The EDV node organizes data in a specific structure:

/data/
  ├── chunks/       # Encrypted data chunks
  ├── indexes/      # Data indexing information
  ├── meta/         # Metadata storage
  └── events/       # Event logs

Understanding this structure helps in monitoring and maintaining the node effectively.

Version Management

Checking Current Version

Verify your node’s current version:

docker inspect --format='{{index .Config.Labels "org.opencontainers.image.version"}}' volume1

Update Process

The update process involves pulling the latest image and redeploying the container:

# Pull latest image
docker pull gatewaylabs/edv:testnet

# Stop current container
docker-compose down

# Start new container with updated image
docker-compose up -d

Storage volumes persist during updates, ensuring no data loss during the upgrade process.

Monitoring

After deployment, verify your node’s operation:

# Check container status
docker ps -a

# View container logs
docker logs volume1

# Verify metrics endpoint
curl http://localhost:1234/metrics

A properly functioning node should show:

  • Container status as “Up”
  • No error messages in logs
  • Accessible metrics endpoint
  • Successful connection to the master server

Troubleshooting

Common issues and their solutions:

Connection Issues

If the node fails to connect to the master server, verify:

  • Network connectivity
  • Correct master server address
  • Proper port configuration
  • Firewall settings

Storage Issues

For storage-related problems, check:

  • Available disk space
  • Volume mount points
  • File permissions
  • I/O performance

Performance Problems

When experiencing performance issues, verify:

  • Resource utilization
  • Network bandwidth
  • Storage I/O rates
  • System logs for bottlenecks

Contact the Gateway Protocol team if you encounter persistent issues requiring additional support.