Skip to content

Example A · First Boot

Gateway first boot → health check → get account address.


1. Start the container

docker run -d \
  --name privitty-edged \
  --restart unless-stopped \
  -e PRIVITTY_PROFILE=factory-gw-01 \
  -p 127.0.0.1:7200:7200 \
  -v privitty-data:/var/lib/privitty \
  privitty/edge:latest

2. Monitor provisioning

docker logs -f privitty-edged

Wait until you see:

[privitty-edged] Account ready: abc123@chat.privittytech.com  (display: factory-gw-01)
HTTP server ready on http://0.0.0.0:7200

This typically takes 10–30 seconds on first run.


3. Health check

curl -s http://127.0.0.1:7200/health | jq .

Expected:

{
  "status": "ok",
  "service": "privitty-edged",
  "version": "0.1.0"
}

If the daemon is still provisioning, wait and retry. Docker's built-in health check allows a 60-second start period.


4. Get account address

curl -s -X POST http://127.0.0.1:7200/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"get_config","params":[1,"addr"],"id":1}' | jq .
{
  "jsonrpc": "2.0",
  "result": "abc123@chat.privittytech.com",
  "id": 1
}

5. Get display name and connectivity

curl -s -X POST http://127.0.0.1:7200/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"get_config","params":[1,"displayname"],"id":2}' | jq .

curl -s -X POST http://127.0.0.1:7200/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"get_connectivity","params":[1],"id":3}' | jq .

Connectivity 4000+ means fully connected to the relay.


6. Verify persistence (optional)

Restart the container and confirm the same address is returned:

docker restart privitty-edged
sleep 5
curl -s -X POST http://127.0.0.1:7200/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"get_config","params":[1,"addr"],"id":1}' | jq .result

Next