Files
proxmox/scripts/archive/consolidated/deploy/install-tunnel-pve2.sh
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

62 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
set -euo pipefail
# Install Cloudflare Tunnel on pve2 node
# Run this ON pve2 node
TUNNEL_TOKEN="eyJhIjoiNTJhZDU3YTcxNjcxYzVmYzAwOWVkZjA3NDQ2NTgxOTYiLCJ0IjoiYjAyZmUxZmUtY2I3ZC00ODRlLTkwOWItN2NjNDEyOThlYmU4IiwicyI6Ik5HTmtOV0kwWXpNdFpUVmxaUzAwTVRFMkxXRXdNMk10WlRJNU1ETTFaRFF4TURBMiJ9"
VMID=5000
# Colors
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m'
log_info() { echo -e "${BLUE}[INFO]${NC} $1"; }
log_success() { echo -e "${GREEN}[✓]${NC} $1"; }
echo ""
log_info "Installing Cloudflare Tunnel in container $VMID"
echo ""
# Check if container is running
CONTAINER_STATUS=$(pct status $VMID 2>/dev/null | awk '{print $2}' || echo "unknown")
if [ "$CONTAINER_STATUS" != "running" ]; then
log_info "Starting container..."
pct start $VMID
sleep 5
fi
# Install cloudflared if needed
log_info "Checking cloudflared installation..."
if ! pct exec $VMID -- command -v cloudflared >/dev/null 2>&1; then
log_info "Installing cloudflared..."
pct exec $VMID -- bash -c "cd /tmp && wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && dpkg -i cloudflared-linux-amd64.deb || apt install -f -y"
fi
# Install service with token
log_info "Installing cloudflared service..."
pct exec $VMID -- cloudflared service install "$TUNNEL_TOKEN" 2>&1
# Start and enable service
log_info "Starting cloudflared service..."
pct exec $VMID -- systemctl start cloudflared
pct exec $VMID -- systemctl enable cloudflared
sleep 3
# Check status
log_info "Service status:"
pct exec $VMID -- systemctl status cloudflared --no-pager -l | head -15
# Get tunnel info
log_info "Tunnel information:"
pct exec $VMID -- cloudflared tunnel list 2>&1
echo ""
log_success "Installation complete!"
echo ""
log_info "Next: Configure DNS and tunnel route in Cloudflare dashboard"