Files
proxmox/docs/archive/completion/FINAL_TUNNEL_INSTALLATION.md

117 lines
3.0 KiB
Markdown
Raw Normal View History

# Final Step: Install Cloudflare Tunnel Service
**Status**: ✅ DNS & Tunnel Route Configured | ⏳ Tunnel Service Installation Required
---
## Current Status
**Completed**:
- DNS Record: `explorer.d-bis.org``b02fe1fe-cb7d-484e-909b-7cc41298ebe8.cfargotunnel.com` (🟠 Proxied)
- Tunnel Route: `explorer.d-bis.org``http://192.168.11.140:80`
- SSL/TLS: Automatic (Cloudflare Universal SSL)
- Blockscout Service: ✅ Running (HTTP 200 on port 4000)
- Nginx Proxy: ✅ Working (HTTP 200 on ports 80/443)
**Pending**:
- Cloudflare Tunnel Service: Needs installation in container
---
## Installation Instructions
The container (VMID 5000) is on **pve2** node. Run these commands **on pve2**:
```bash
pct exec 5000 -- bash << 'INSTALL_SCRIPT'
# Install cloudflared if needed
if ! command -v cloudflared >/dev/null 2>&1; then
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 tunnel service with token
cloudflared service install eyJhIjoiNTJhZDU3YTcxNjcxYzVmYzAwOWVkZjA3NDQ2NTgxOTYiLCJ0IjoiYjAyZmUxZmUtY2I3ZC00ODRlLTkwOWItN2NjNDEyOThlYmU4IiwicyI6Ik5HTmtOV0kwWXpNdFpUVmxaUzAwTVRFMkxXRXdNMk10WlRJNU1ETTFaRFF4TURBMiJ9
# Start and enable service
systemctl start cloudflared
systemctl enable cloudflared
sleep 3
# Verify installation
systemctl status cloudflared --no-pager -l | head -15
cloudflared tunnel list
INSTALL_SCRIPT
```
---
## Alternative: Step-by-Step Commands
If the above doesn't work, run these commands one by one:
```bash
# 1. Enter container
pct exec 5000 -- bash
# 2. Install cloudflared (if needed)
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
# 3. Install tunnel service
cloudflared service install eyJhIjoiNTJhZDU3YTcxNjcxYzVmYzAwOWVkZjA3NDQ2NTgxOTYiLCJ0IjoiYjAyZmUxZmUtY2I3ZC00ODRlLTkwOWItN2NjNDEyOThlYmU4IiwicyI6Ik5HTmtOV0kwWXpNdFpUVmxaUzAwTVRFMkxXRXdNMk10WlRJNU1ETTFaRFF4TURBMiJ9
# 4. Start service
systemctl start cloudflared
systemctl enable cloudflared
# 5. Check status
systemctl status cloudflared
cloudflared tunnel list
# 6. Exit container
exit
```
---
## Verification
After installation, wait 1-2 minutes, then test:
```bash
# Test public URL
curl https://explorer.d-bis.org/api/v2/stats
# Should return HTTP 200 with JSON response
```
---
## Troubleshooting
### If tunnel service fails to start:
```bash
# Check logs
pct exec 5000 -- journalctl -u cloudflared -n 50
# Check if token is valid
pct exec 5000 -- cloudflared tunnel list
```
### If public URL still returns 530:
1. Wait 2-5 minutes for tunnel to connect
2. Verify tunnel is running: `pct exec 5000 -- systemctl status cloudflared`
3. Check Cloudflare Zero Trust dashboard for tunnel status
4. Verify DNS is proxied (orange cloud) in Cloudflare dashboard
---
**Once tunnel service is installed and running, the public URL will be fully functional!**