Skip to content

Carlys17/blockcast-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Blockcast BEACON Node Setup Guide

Complete guide for deploying Blockcast BEACON CDN Gateway nodes.

Overview

Blockcast BEACON is a decentralized Content Delivery Network (CDN) that allows node operators to earn rewards by caching and serving content. BEACON nodes act as gateways between users and the Blockcast network.

System Requirements

Minimum Requirements

  • CPU: 2 cores
  • RAM: 4 GB
  • Storage: 50 GB SSD
  • Network: 10 Mbps upload/download
  • OS: Ubuntu 20.04/22.04 LTS, Debian 11/12

Recommended

  • CPU: 4+ cores
  • RAM: 8 GB
  • Storage: 200 GB SSD (more = more cache capacity)
  • Network: 100 Mbps+ with static IP
  • Location: Major metropolitan areas for better latency

Installation

Step 1: System Preparation

# Update system
sudo apt update && sudo apt upgrade -y

# Install dependencies
sudo apt install -y curl wget git docker.io docker-compose

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

Step 2: Install Blockcast CLI

# Download Blockcast CLI
curl -sSL https://install.blockcast.io/beacon.sh | bash

# Or manual installation
wget https://github.com/blockcast/beacon/releases/latest/download/beacon-linux-amd64
chmod +x beacon-linux-amd64
sudo mv beacon-linux-amd64 /usr/local/bin/beacon

# Verify
beacon --version

Step 3: Initialize Node

# Create working directory
mkdir -p ~/.blockcast/beacon
cd ~/.blockcast/beacon

# Initialize configuration
beacon init

# Register node (requires invitation code or stake)
beacon register --name "your-node-name"

Step 4: Configure Node

# Edit configuration
cat > ~/.blockcast/beacon/config.yaml << 'EOF'
node:
  name: "carly-beacon-node"
  region: "asia-southeast"
  cache_size: "100GB"
  
network:
  listen_port: 8080
  public_ip: "auto"  # or set your static IP
  
performance:
  max_connections: 1000
  cache_ttl: "24h"
  compression: true
  
rewards:
  address: "YOUR_ETHEREUM_ADDRESS"
  auto_claim: true
  
monitoring:
  enabled: true
  metrics_port: 9090
EOF

Step 5: Start Node

Option A: Docker (Recommended)

# Create docker-compose.yml
cat > docker-compose.yml << 'EOF'
version: '3.8'

services:
  beacon:
    image: blockcast/beacon:latest
    container_name: blockcast-beacon
    restart: unless-stopped
    ports:
      - "8080:8080"
      - "9090:9090"
    volumes:
      - ./config.yaml:/app/config.yaml
      - ./cache:/app/cache
    environment:
      - BEACON_CONFIG=/app/config.yaml
    command: ["beacon", "start", "--config", "/app/config.yaml"]
EOF

# Start
docker-compose up -d

# View logs
docker-compose logs -f

Option B: Systemd Service

sudo tee /etc/systemd/system/blockcast-beacon.service > /dev/null << 'EOF'
[Unit]
Description=Blockcast BEACON Node
After=network.target docker.service
Requires=docker.service

[Service]
Type=simple
User=$USER
WorkingDirectory=$HOME/.blockcast/beacon
ExecStart=/usr/local/bin/docker-compose up
ExecStop=/usr/local/bin/docker-compose down
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable blockcast-beacon
sudo systemctl start blockcast-beacon

Monitoring

Check Node Status

# Node health
beacon status

# Cache statistics
beacon cache stats

# Network connections
beacon network connections

# Rewards status
beacon rewards status

View Logs

# Docker logs
docker logs -f blockcast-beacon

# Systemd logs
sudo journalctl -u blockcast-beacon -f

# Log file
tail -f ~/.blockcast/beacon/logs/beacon.log

Metrics Dashboard

Access metrics at: http://your-node-ip:9090/metrics

Troubleshooting

Issue: Node registration fails

Symptoms: beacon register returns error

Solutions:

  1. Check invitation code:

    beacon register --code YOUR_INVITE_CODE
  2. Verify stake requirement:

    beacon stake check
  3. Check network connectivity:

    curl https://api.blockcast.io/health

Issue: Low cache hit rate

Symptoms: Cache efficiency below 50%

Solutions:

  1. Increase cache size:

    cache_size: "500GB"
  2. Optimize cache TTL:

    cache_ttl: "48h"
  3. Check popular content:

    beacon cache popular

Issue: Node not earning rewards

Symptoms: Zero or minimal rewards

Solutions:

  1. Verify node is online:

    beacon status | grep "online"
  2. Check bandwidth usage:

    beacon network bandwidth
  3. Verify reward address:

    beacon config get rewards.address
  4. Check geographic location (closer to users = more rewards)

Issue: High memory usage

Symptoms: Node consuming excessive RAM

Solutions:

  1. Limit cache memory:

    performance:
      max_memory: "4GB"
  2. Restart node:

    docker-compose restart
  3. Clear cache:

    beacon cache clear

Issue: Connection refused

Symptoms: Cannot connect to node API

Solutions:

  1. Check firewall:

    sudo ufw allow 8080/tcp
    sudo ufw allow 9090/tcp
  2. Verify port binding:

    netstat -tlnp | grep 8080
  3. Check config:

    beacon config validate

FAQ

Q: How much can I earn? A: Earnings depend on cache efficiency, bandwidth served, and geographic location. Check the Blockcast dashboard for estimates.

Q: Can I run multiple nodes? A: Yes, but each node needs unique IP and sufficient resources.

Q: What content is cached? A: Popular web content, media files, and API responses from Blockcast partner networks.

Q: Is my IP exposed? A: The node's public IP is used for content delivery but can be masked with CDN in front.

Q: How to update the node? A: ```bash docker-compose pull docker-compose up -d


## Advanced Configuration

### Reverse Proxy (Nginx)

```nginx
server {
    listen 80;
    server_name your-domain.com;
    
    location / {
        proxy_pass http://localhost:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

SSL with Let's Encrypt

# Install certbot
sudo apt install certbot python3-certbot-nginx

# Obtain certificate
sudo certbot --nginx -d your-domain.com

Resources

License

MIT

About

Blockcast BEACON CDN gateway node setup and deployment guide

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors