Files
proxmox/docs/04-configuration/APPLY_DIRECT_ROUTE_MANUAL.md
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

173 lines
4.2 KiB
Markdown

# Apply Direct Route - Manual Instructions
**Last Updated:** 2026-01-31
**Document Version:** 1.0
**Status:** Active Documentation
---
**Date**: 2026-01-18
**Status**: ⚠️ **Action Required**
---
## Current Situation
The configuration files have been updated to use port 4000, but **NPMplus still needs to be updated** in the running system. The 502 errors confirm that NPMplus is still routing to port 80 (nginx).
---
## Quick Fix Steps
### Step 1: Verify Blockscout is Accessible
First, check if Blockscout is accessible on port 4000:
```bash
curl -I http://192.168.11.140:4000/api/v2/stats
```
**Expected Result**: HTTP 200
**If you get connection refused or timeout**:
- Blockscout may only be listening on localhost (127.0.0.1:4000)
- Or Blockscout service may not be running
- See troubleshooting section below
### Step 2: Update NPMplus Configuration
**Option A: Via Web UI (Recommended)**
1. **Log into NPMplus**:
- URL: `https://192.168.0.166:81`
- Email: `nsatoshi2007@hotmail.com`
- Password: (check `.env` file)
2. **Navigate to Proxy Hosts**:
- Click on "Proxy Hosts" in the menu
- Find `explorer.d-bis.org`
3. **Update Configuration**:
- **Forward Host**: `192.168.11.140` (should already be correct)
- **Forward Port**: Change from `80` to `4000` ⚠️ **IMPORTANT**
- **Forward Scheme**: `http` (should already be correct)
- **WebSocket Support**: Unchecked (not needed)
4. **Save Changes**:
- Click "Save"
- Wait 10-30 seconds for NPMplus to reload
5. **Verify**:
```bash
curl -I https://explorer.d-bis.org/api/v2/stats
```
Should return HTTP 200 (not 502).
**Option B: Run Automated Script**
From a machine that can access NPMplus:
```bash
cd /home/intlc/projects/proxmox
./scripts/apply-direct-blockscout-route.sh
```
---
## Troubleshooting
### Issue 1: Blockscout Not Accessible on Port 4000
**Symptom**: `curl http://192.168.11.140:4000/api/v2/stats` returns connection refused
**Solution**: Blockscout needs to be configured to listen on the network interface
**Check from Proxmox host**:
```bash
# Check if Blockscout is running
pct exec 5000 -- systemctl status blockscout.service
# Check what port Blockscout is listening on
pct exec 5000 -- ss -tlnp | grep :4000
# Test localhost access
pct exec 5000 -- curl -I http://127.0.0.1:4000/api/v2/stats
```
**If only localhost works**:
- Blockscout is listening on `127.0.0.1:4000` (localhost only)
- Need to configure it to listen on `0.0.0.0:4000` (all interfaces)
**For Docker containers**:
- Check `docker-compose.yml` for port binding
- Ensure port is bound to `0.0.0.0:4000`, not `127.0.0.1:4000`
- Restart Blockscout container
**For systemd services**:
- Check service file: `pct exec 5000 -- systemctl cat blockscout.service`
- Update environment variables to bind to `0.0.0.0:4000`
- Restart service: `pct exec 5000 -- systemctl restart blockscout.service`
### Issue 2: Still Getting 502 After NPMplus Update
**Check**:
1. NPMplus configuration was saved
2. NPMplus reloaded (wait 30 seconds)
3. Blockscout is still accessible: `curl -I http://192.168.11.140:4000/api/v2/stats`
**If still 502**:
- Check NPMplus logs
- Verify Blockscout service is running
- Check firewall rules
### Issue 3: Cannot Access NPMplus
**Alternative**: Use the full configuration script to reconfigure all domains:
```bash
cd /home/intlc/projects/proxmox/scripts/nginx-proxy-manager
node configure-npmplus-domains.js
```
This will update all domains including explorer with the new port 4000.
---
## Rollback (If Needed)
If the direct route doesn't work, you can rollback:
1. In NPMplus, change Forward Port back to `80`
2. Save changes
3. This will restore the old route through nginx
---
## Verification Commands
After applying the update, verify:
```bash
# Test API endpoint
curl -I https://explorer.d-bis.org/api/v2/stats
# Check NPMplus is routing correctly
curl -v https://explorer.d-bis.org/api/v2/stats 2>&1 | grep -i "HTTP"
# Test direct Blockscout access
curl -I http://192.168.11.140:4000/api/v2/stats
```
All should return HTTP 200.
---
## Status
- ✅ Configuration files updated
- ✅ Scripts created
-**NPMplus configuration update pending** (manual action required)
---
**Next Step**: Log into NPMplus and update the Forward Port from 80 to 4000.