Skip to content

03 Install Node EN

loopy-iri edited this page Jun 25, 2026 · 1 revision

🇬🇧 English · 🇮🇷 فارسی

2) Install a node (operator)

Install a node on every server you want to sell.

One-line install

sudo bash -c "$(curl -sL https://raw.githubusercontent.com/loopy-iri/NodeAgent/main/scripts/pg-node.sh)" @ install

A core key is generated by default so you can manage the Xray core from your own PasarGuard panel out of the box. To set your own:

sudo bash -c "$(curl -sL https://raw.githubusercontent.com/loopy-iri/NodeAgent/main/scripts/pg-node.sh)" @ install --core-key "$(openssl rand -hex 32)"

At the end it prints — save these (especially the master key and certificate):

Address (HTTPS control):  https://SERVER_IP:8090
gRPC (PasarGuard-compat): SERVER_IP:62050
Master key (register in main panel):
    <MASTER_KEY>
Core key (PasarGuard core management):
    <CORE_KEY>
Node certificate (paste into the main panel when adding the node):
-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----

Options

Option Default Description
--master-key KEY random Full-control key (to register in the main panel)
--core-key KEY auto-generated Key to manage the core from your PasarGuard panel
--http-port PORT 8090 HTTP control port (HTTPS)
--grpc-port PORT 62050 gRPC port
--force-inbounds CSV vless-in Apply every customer's users to these inbound tags (must match a tag in the fixed config)
--san-entries CSV Extra cert SANs, e.g. DNS:node.example.com
--version vX.Y.Z latest Install a specific release
--name NAME pg-node-agent Instance name — to install alongside the official PasarGuard node

Xray core config

A default fixed config is created at /var/lib/pg-node-agent/fixed-config.json with one inbound named vless-in on port 443. This config is shared by all customers.

  • Edit locally: sudo pg-node-agent edit (then restart).
  • Or push from the main panel: PUT /api/v1/nodes/{id}/config.

📌 Full core-config guide (Reality/WS examples, key generation, what to give the customer): Configure the node core.

Important: any inbound you want customer users to land on must have its tag listed in --force-inbounds, and you must give its settings (port/SNI/network) to the customer so end-user links work.

Management commands

sudo pg-node-agent status
sudo pg-node-agent logs
sudo pg-node-agent restart
sudo pg-node-agent edit         # edit core config
sudo pg-node-agent edit-env     # edit env vars
sudo pg-node-agent renew-cert   # regenerate certificate (re-pin in the panel)
sudo pg-node-agent core-update  # update Xray-core
sudo pg-node-agent update       # update the node binary

Next

Add the node to the panel and sell.

Clone this wiki locally