@@ -289,12 +289,18 @@ Important:
289289
290290### 2.7 Verify Cluster Sync
291291
292+ The admin API requires a bearer token (see ` core.admin.admin_token ` in ` gateway.toml ` ,
293+ or the ` ADMIN_API_TOKEN ` env injected by ` deploy-to-vmm.sh ` ). Export it once:
294+
292295``` bash
296+ export ADMIN_API_TOKEN=... # value from .env or gateway.toml
297+ ADMIN_AUTH=(-H " Authorization: Bearer $ADMIN_API_TOKEN " )
298+
293299# Check sync status on any node (replace port with your admin port)
294- curl -s http://localhost:9016/prpc/WaveKvStatus | jq .
300+ curl -s " ${ADMIN_AUTH[@]} " http://localhost:9016/prpc/WaveKvStatus | jq .
295301
296302# List known cluster nodes
297- curl -s http://localhost:9016/prpc/Status | jq ' .nodes'
303+ curl -s " ${ADMIN_AUTH[@]} " http://localhost:9016/prpc/Status | jq ' .nodes'
298304```
299305
300306A healthy cluster sync shows:
@@ -567,7 +573,8 @@ $CLI info <vm-id>
567573Check that the gateway sees the new app:
568574
569575``` bash
570- curl -s http://localhost:< admin-port> /prpc/Status | jq ' .hosts'
576+ curl -s -H " Authorization: Bearer $ADMIN_API_TOKEN " \
577+ http://localhost:< admin-port> /prpc/Status | jq ' .hosts'
571578```
572579
573580Expected output should include an entry with the app's ` instance_id ` and an assigned WireGuard IP:
@@ -619,8 +626,11 @@ Gateway supports automatic TLS certificate management via the ACME protocol. Con
619626### 6.1 Configure ACME Service
620627
621628``` bash
629+ ADMIN_AUTH=(-H " Authorization: Bearer $ADMIN_API_TOKEN " )
630+
622631# Set ACME URL (Let's Encrypt production)
623- curl -X POST " http://localhost:9016/prpc/SetCertbotConfig" \
632+ curl -X POST " ${ADMIN_AUTH[@]} " \
633+ " http://localhost:9016/prpc/SetCertbotConfig" \
624634 -H " Content-Type: application/json" \
625635 -d ' {"acme_url": "https://acme-v02.api.letsencrypt.org/directory"}'
626636
@@ -637,7 +647,8 @@ The Cloudflare API token needs the **DNS:Edit** permission on the target zone. C
637647Cloudflare example:
638648
639649``` bash
640- curl -X POST " http://localhost:9016/prpc/CreateDnsCredential" \
650+ curl -X POST " ${ADMIN_AUTH[@]} " \
651+ " http://localhost:9016/prpc/CreateDnsCredential" \
641652 -H " Content-Type: application/json" \
642653 -d ' {
643654 "name": "cloudflare-prod",
@@ -669,15 +680,17 @@ Parameter description:
669680Basic usage (using default DNS credential):
670681
671682``` bash
672- curl -X POST " http://localhost:9016/prpc/AddZtDomain" \
683+ curl -X POST " ${ADMIN_AUTH[@]} " \
684+ " http://localhost:9016/prpc/AddZtDomain" \
673685 -H " Content-Type: application/json" \
674686 -d ' {"domain": "example.com", "port": 443}'
675687```
676688
677689Specifying DNS credential and node binding:
678690
679691``` bash
680- curl -X POST " http://localhost:9016/prpc/AddZtDomain" \
692+ curl -X POST " ${ADMIN_AUTH[@]} " \
693+ " http://localhost:9016/prpc/AddZtDomain" \
681694 -H " Content-Type: application/json" \
682695 -d ' {
683696 "domain": "internal.example.com",
@@ -711,15 +724,16 @@ Note: After adding a domain, the certificate is not issued immediately. Gateway
711724### 6.4 Manually Trigger Certificate Renewal
712725
713726``` bash
714- curl -X POST " http://localhost:9016/prpc/RenewZtDomainCert" \
727+ curl -X POST " ${ADMIN_AUTH[@]} " \
728+ " http://localhost:9016/prpc/RenewZtDomainCert" \
715729 -H " Content-Type: application/json" \
716730 -d ' {"domain": "example.com", "force": true}'
717731```
718732
719733### 6.5 Check Certificate Status
720734
721735``` bash
722- curl -s http://localhost:9016/prpc/ListZtDomains | jq .
736+ curl -s " ${ADMIN_AUTH[@]} " http://localhost:9016/prpc/ListZtDomains | jq .
723737```
724738
725739A healthy certificate shows ` has_cert: true ` and ` loaded_in_memory: true ` :
0 commit comments