Headless, GUI-less P2P seeder for the SmartNet network. Run it on any cheap VPS (no X / no webkit) to keep dApps alive 24/7 - it learns the app directory from the trackers, pulls each app's content-addressed blob over iroh-blobs and re-serves the identical blob, multiplying availability ("seeding").
It speaks the exact same wire protocol as the desktop client (iroh preset N0 +
LAN mDNS, iroh_blobs::ALPN, tracker POST /announce + GET /apps). The
signed {merkle, signature, publicKey} are read from each app's content.json
inside the tar, so the seeder's relay re-announce verifies on the tracker
unchanged.
cd seeder
cargo build --release # binary: target/release/smartnet-seeder./smartnet-seeder # uses ./config.yaml (auto-created on first run)
./smartnet-seeder /etc/sn.yaml # custom config path
RUST_LOG=smartnet_seeder=info ./smartnet-seederRun it under systemd / tmux / nohup ... & to seed around the clock.
data_dir: ./smartnet-seed-data # blobs + state live here
storage_limit_gb: 5.0 # disk budget for seeded blobs
trackers:
- http://159.69.188.60:7374
- http://91.99.119.119:7374
reward_address: "" # SmartHoldem S... address for future rewards
reward_passphrase: "" # OR derive the address from this passphrase
poll_interval_secs: 30
relay_only: false # true = hide direct IP (relay only, no mDNS)
metrics_port: 9466 # HTTP /metrics (JSON) + status page (0 = off)
metrics_interval_secs: 300 # also print a one-line STATS summary this oftenThe seeder serves a tiny dependency-free HTTP endpoint on metrics_port:
GET /metrics-> JSON:{ version, uptimeSecs, appsSeeded, bytesSeeded, gbSeeded, storageLimitGb, endpointId, rewardAddress, trackers, lastAnnounceAcks, mediaEnabled, mediaStorageGb, mediaBytes, mediaItems, mediaEndpointId, apps[] }GET /-> a small dark status page (version, uptime, apps, GB, media, acks, reward address).
Chat media (photos / audio / files / video ≤ 500 MB) normally lives only on the
sender's machine and on peers that already downloaded it - once the author goes
offline the media is unreachable. With media_storage_gb > 0 the seeder becomes
an always-on media mirror:
media_storage_gb: 5 # 0 = off (default). e.g. 5 = 5 GB dedicated to chat media- Fully separate from the dApp store: own
<data_dir>/media-blobsFsStore, own iroh endpoint (media.key, shown asmediaEndpointId), ownmedia.jsonstate and own GC - the dApp budget (storage_limit_gb) is never touched. - Netfory clients discover media-capable seeders via the tracker (
/seeders-> seeder/metricswith a non-emptymediaEndpointId) and, right after sending a media message,POST /media/announce {"h": <hash>, "n": <sender media endpoint>, "s": <size>, "p": [extra providers]}. The seeder pulls the blob immediately (up to 3 parallel fetches, 4 attempts each) and re-serves it 24/7. Receivers addmediaEndpointIdto their provider list, so media loads even when the author is offline. - Hygiene: when usage (+ incoming file) exceeds 90 % of the media budget the oldest 50 % (by bytes) is dropped; the store GC reclaims the blobs.
- Endpoints:
POST /media/announce,GET /media/has?h=<hash>,GET /media(list, newest first, ≤ 500). The status page showsMEDIA X GB / Y GB · N filesand the header// SMARTNET SEEDER v<version>.
It also prints a one-line STATS · uptime ... · seeding N app(s) · X/Y GB · last acks ... summary to the log every metrics_interval_secs. VPS operators can
scrape /metrics (Prometheus-style polling) to see their contribution, and the
rewardAddress ties that contribution to a payout identity for future
seeding-reward ranking.
reward_address / reward_passphrase are reserved for the upcoming
seeding-reward + proof-of-storage system. The passphrase derives the address
with the same scheme as the SmartNet wallet, so you can import the same phrase
into the wallet to control the rewards.
State (seeded.json) + the iroh blob store persist across restarts, so a
restart re-announces immediately without re-downloading.