Skip to main content

4. Node Provider Workflow

This workflow applies to an entity who wants to host VPN nodes and earn rewards from VPN Providers.

4.1 Registering as a Node Provider

  1. Deposit/Staking: Run:

    apivpn-cli node provider register --name "MyNodeProvider"

    This sends an on-chain transaction to the Node Provider Registry, staking a small initial deposit.

  2. Listing Node Providers:

    apivpn-cli node provider list --count 10 --page 0

    Shows existing providers, including yours.

  3. Checking or Adding Node Limits:

    apivpn-cli node provider limit

    This shows how many nodes you can deploy based on your deposit. To increase:

    apivpn-cli node provider limit add --count 5

    This will prompt for extra deposit coverage.

4.2 Deploying Nodes

  1. After you have a sufficient limit
    apivpn-cli node add \
    --plan time \
    --hostname myvps.example.com \
    --country US \
    --region CA \
    --city "San Francisco" \
    --ip 203.0.113.5 \
    --ssl=false \
    --port 8080 \
    --path /api/v1 \
    --limit 100
    • Speed Test: The CLI also attempts to auto-detect your VPS IP/country if not provided.
    • A private/public key pair is generated for each node. The private key is saved in your config file (private_key)

4.3 Updating or Deleting Nodes

  • Update:

    apivpn-cli node update --ip 203.0.113.5 --port 8081 --ssl=true
  • Delete:

    apivpn-cli node delete --ip 203.0.113.5

4.4 Running the Node Server

apivpn-cli node server --port 8080
  • Starts an HTTP server with /api/v1/connect and /api/v1/status.
  • Launches an embedded V2Ray process for user traffic forwarding.
  • Sends “heartbeat” messages to the aggregator URL (configured in config.yaml -> ton.endpoint_web2).
  • Checks user tickets presented at /api/v1/connect.