<!-- TokenOS docs · P2P AI · Markdown mirror of https://tokenos.ai/docs/p2p-uptime · HTML: https://tokenos.ai/docs/p2p-uptime · index: https://tokenos.ai/llms.txt -->

# Node operations & uptime

Uptime is the whole game for a seller. Buyers route to peers that are online, reachable and settle cleanly; a node that sleeps, crashes or hides behind a closed port drops out of the catalog and collects ghosted sessions against its trust score. This is the checklist new providers receive by email the first time they save an address — kept here so you can come back to it.

1. **Run the node as a service that restarts itself** — Peers are listed only while their announcement is fresher than 20 minutes. Install the systemd unit below (or pm2), enable it on boot and disable sleep/hibernate on the machine.
2. **Keep the seller ports reachable** — Buyers dial you directly on tcp/7882 (encrypted TCP) and tcp/7883 (the same frames over WebSocket, protocol v2.1), plus udp/7881 for the DHT. Forward the ports, set `publicHost` in seller.json or pass `--public-host`, then confirm with `network stats` that the indexer observed your public IP.
3. **Stop cleanly, never kill -9** — Open sessions settle on shutdown. Always stop with SIGINT/SIGTERM (Ctrl-C, `systemctl stop`, `pm2 stop`); a hard kill loses the last receipt and the buyer's hold is refunded after the grace period.
4. **Keep upstream keys funded and quotas in view** — Every request is forwarded to your upstream. A revoked key or exhausted quota turns each session into an error. Watch vendor billing alerts and set `maxConcurrency` to what the upstream really allows.
5. **Announce on time** — The node re-announces every 5 minutes to the DHT and the indexer. Networks that block outbound UDP still work via the indexer — but only while the node is up. Check your offer once a day.
6. **Price so you get picked** — Routing is cheapest-then-trust per model. Compare with `network browse`, adjust `defaultPricing` / `servicePricing` and restart.
7. **Build trust** — Verify a domain or GitHub repo (`verifications` + `provider verify`) for up to 20 points immediately; let sessions settle at the 10-minute idle / 80% budget marks for the rest.
8. **Payouts and the weekly digest** — Request USDC payouts (minimum 1 USDC) from the console or `seller payout`. Keep the Monday digest on so you notice when sessions or trust move.

### Service definitions

**systemd**

```
# /etc/systemd/system/tokenos-p2p.service
[Unit]
Description=TokenOS P2P seller node
After=network-online.target

[Service]
ExecStart=/usr/bin/env tokenos-p2p seller start
Restart=always
RestartSec=5
EnvironmentFile=/etc/tokenos-p2p.env      # OPENAI_API_KEY=… / ANTHROPIC_API_KEY=… / TOKENOS_P2P_HOME=…
KillSignal=SIGINT                         # lets open sessions settle on stop
TimeoutStopSec=90

[Install]
WantedBy=multi-user.target

# sudo systemctl enable --now tokenos-p2p && journalctl -fu tokenos-p2p
```

**pm2 (alternative)**

```
pm2 start tokenos-p2p --name p2p-seller -- seller start
pm2 save && pm2 startup                   # restart on reboot
pm2 logs p2p-seller
```

### Daily health checks

**terminal**

```
tokenos-p2p network stats | grep -A3 "<your peerId>"     # observedIp + announcedAt — am I reachable and fresh?
tokenos-p2p network browse --model <one of yours>         # is my offer in the catalog?
tokenos-p2p seller status                                 # balance, open sessions, trust
nc -zv <public-ip> 7882                                   # from another network: is the port open?
```

### Reading your trust score

- **History · 50** — Log curves over closed sessions and settled USD on the TokenOS ledger. Clean settlements raise it; ghosted sessions do not count.
- **Usage · 30** — Your share of last week’s settled volume across the network.
- **Identity · 20** — Verified domain (DNS TXT or /.well-known/tokenos.json) or GitHub proof bound to the peer id; domain age adds a little.
- **Unscored** — New peers show “new” until their first settlement — buyers still route to them unless they set --min-trust.
- **Wash-flagged** — Admins can zero the score of peers that settle against themselves; hidden test peers leave every public list.

> **Note — Symptoms → causes**
> - **Offer missing from the catalog** — node not running, last announce older than 20 minutes, or the indexer unreachable from the host.
> - **Sessions reserved but no requests arrive** — port closed or wrong `publicHost`; buyers time out and the session is ghosted.
> - **Every request errors** — upstream key revoked, quota exhausted, or `serviceModels` maps to a model the upstream does not have.
> - **Balance not growing after traffic** — settlements only happen at idle / 80% / disconnect; check `seller status` after a session closes.

Payments are for metered usage only; there are no token rewards, and running a node does not guarantee traffic or income. More: [Sell inference without a GPU](https://tokenos.ai/docs/p2p-sell) · [protocol docs](https://tokenos.ai/p2p/docs).

---

*P2P AI · TokenOS documentation. Canonical page: https://tokenos.ai/docs/p2p-uptime. All docs as Markdown: https://tokenos.ai/llms.txt. Payments on TokenOS are for metered usage only; nothing on this page is investment advice or a promise of income.*
