⚠️ IMPLEMENTATION STATUS
The core services (p2p-gateway, fullnode) exist in the codebase. However, the Docker containers, docker-compose files, configuration templates, deployment scripts, and release packages described here are not yet implemented. This guide represents the target deployment experience.
A light node provides basic network infrastructure by participating in P2P gossip and maintaining recent data. Perfect for users who want to contribute to network health without running full services.
curl -L https://github.com/ParichayaHQ/credence/releases/latest/download/light-node.tar.gz -o light-node.tar.gz
tar -xzf light-node.tar.gz
cd light-node/
# Copy example configuration
cp config/light-node.example.yml config/light-node.yml
# Edit configuration (see Configuration section below)
nano config/light-node.yml
# Start light node stack
docker-compose -f docker-compose.light.yml up -d
# Check status
docker-compose -f docker-compose.light.yml ps
# Check P2P connectivity
curl http://localhost:8080/health
# View logs
docker-compose -f docker-compose.light.yml logs -f
config/light-node.yml
)# Network Configuration
network:
listen_addresses:
- "/ip4/0.0.0.0/tcp/4001"
bootstrap_peers:
- "/dns4/seed1.credence.network/tcp/4001/p2p/12D3..."
- "/dns4/seed2.credence.network/tcp/4001/p2p/12D4..."
# Storage Configuration
storage:
retention_days: 30 # Keep data for 30 days
max_storage_gb: 10 # Limit storage usage
prune_interval: "24h" # Check for old data daily
# API Configuration
api:
listen: "0.0.0.0:8080"
cors_origins: ["*"]
rate_limit: "100/minute"
# Resource Limits
resources:
max_memory: "2GB"
max_cpu: "1.0"
max_connections: 100
docker-compose.light.yml
)version: '3.8'
services:
p2p-gateway:
image: credence/p2p-gateway:latest
ports:
- "4001:4001"
- "8080:8080"
volumes:
- ./config:/config
- ./data/p2p:/data
environment:
- CONFIG_PATH=/config/light-node.yml
- LOG_LEVEL=info
restart: unless-stopped
fullnode:
image: credence/fullnode:latest
ports:
- "8081:8081"
volumes:
- ./config:/config
- ./data/fullnode:/data
depends_on:
- p2p-gateway
environment:
- CONFIG_PATH=/config/light-node.yml
- MODE=light
- P2P_ENDPOINT=http://p2p-gateway:8080
restart: unless-stopped
volumes:
p2p-data:
fullnode-data:
# Start services
docker-compose -f docker-compose.light.yml up -d
# Stop services
docker-compose -f docker-compose.light.yml down
# Restart services
docker-compose -f docker-compose.light.yml restart
# View status
docker-compose -f docker-compose.light.yml ps
# View logs
docker-compose -f docker-compose.light.yml logs -f
# Check resource usage
docker stats
# Monitor P2P connectivity
curl http://localhost:8080/peers | jq .
# Check data sync status
curl http://localhost:8081/sync/status | jq .
# Pull latest images
docker-compose -f docker-compose.light.yml pull
# Restart with new images
docker-compose -f docker-compose.light.yml up -d
# Allow P2P traffic
sudo ufw allow 4001/tcp comment "Credence P2P"
# Allow API access (optional, for local development)
sudo ufw allow from 192.168.0.0/16 to any port 8080
sudo ufw allow from 192.168.0.0/16 to any port 8081
No peers connecting:
# Check firewall
sudo ufw status
# Test external connectivity
nc -zv your-external-ip 4001
# Verify bootstrap peers
curl http://localhost:8080/peers
High resource usage:
# Adjust resource limits in config
nano config/light-node.yml
# Restart with new limits
docker-compose -f docker-compose.light.yml restart
Storage filling up:
# Check current usage
du -sh data/
# Adjust retention period
nano config/light-node.yml # Reduce retention_days
# Force pruning
docker-compose -f docker-compose.light.yml exec fullnode /app/prune-now
# P2P Gateway health
curl http://localhost:8080/health
# Should return: {"status": "healthy", "peers": N, "uptime": "Xs"}
# Full Node health
curl http://localhost:8081/health
# Should return: {"status": "healthy", "events": N, "sync": "up-to-date"}
Ready for more participation? Consider upgrading to:
Running a light node helps make Credence more decentralized and resilient!