# Run Key Loading Now - Quick Guide

**Node.js is now installed!** ✅

Run these commands in order:

## Step 1: Generate Keys

```bash
cd /home/intlc/projects/proxmox/rpc-translator-138
./scripts/generate-and-load-keys.sh 3 TestWallet123!
```

This will create keystore files in `/tmp/web3signer-keys/`

## Step 2: Copy Keys to Proxmox Host

**Use r630-01 (192.168.11.11) - that's where the containers are deployed:**

```bash
# Copy keys to r630-01
scp /tmp/web3signer-keys/keystore-*.json root@192.168.11.11:/tmp/web3signer-keys/
```

**Proxmox Host Mappings:**
- 192.168.11.10 = ml110
- 192.168.11.11 = r630-01 ← **Use this one** (containers are here)
- 192.168.11.12 = r630-02

## Step 3: Load Keys into Web3Signer

**Use r630-01 (192.168.11.11):**

```bash
# Load keys into Web3Signer container on r630-01
ssh root@192.168.11.11 'bash -s' < /home/intlc/projects/proxmox/rpc-translator-138/scripts/load-keys-complete.sh
```

Or manually (on r630-01):
```bash
ssh root@192.168.11.11
pct exec 107 -- mkdir -p /opt/web3signer/data/keys
pct push 107 /tmp/web3signer-keys/keystore-test-1.json /opt/web3signer/data/keys/
pct push 107 /tmp/web3signer-keys/keystore-test-2.json /opt/web3signer/data/keys/
pct push 107 /tmp/web3signer-keys/keystore-test-3.json /opt/web3signer/data/keys/
pct exec 107 -- chmod 644 /opt/web3signer/data/keys/*.json
pct exec 107 -- systemctl restart web3signer
sleep 5
exit
```

## Step 4: Verify Keys Loaded

```bash
curl http://192.168.11.111:9000/api/v1/eth1/publicKeys
```

Should return JSON array with 3 addresses.

## Step 5: Configure Allowlist

```bash
cd /home/intlc/projects/proxmox/rpc-translator-138
ADDRESSES=$(curl -s http://192.168.11.111:9000/api/v1/eth1/publicKeys | jq -r '.[]' | tr '\n' ',' | sed 's/,$//')
./scripts/configure-wallet-allowlist.sh "$ADDRESSES"
```

## All-in-One (using r630-01)

```bash
cd /home/intlc/projects/proxmox/rpc-translator-138 && \
./scripts/generate-and-load-keys.sh 3 TestWallet123! && \
scp /tmp/web3signer-keys/keystore-*.json root@192.168.11.11:/tmp/web3signer-keys/ && \
ssh root@192.168.11.11 'bash -s' < scripts/load-keys-complete.sh && \
sleep 3 && \
ADDRESSES=$(curl -s http://192.168.11.111:9000/api/v1/eth1/publicKeys | jq -r '.[]' | tr '\n' ',' | sed 's/,$//') && \
./scripts/configure-wallet-allowlist.sh "$ADDRESSES"
```

---

**You're ready to go!** Node.js is installed, scripts are ready. Run the commands above to complete the setup.
