Skip to content

Quick Start

flyworker edited this page Jun 25, 2026 · 1 revision

Quick Start

Get a computing provider running in under 5 minutes.

Prerequisites

  • Go 1.21+ (go version)
  • A running model server: SGLang, vLLM, Ollama, or any OpenAI-compatible endpoint
  • A Swan Chain provider account (see step 2)

1. Build

git clone https://github.com/swanchain/computing-provider
cd computing-provider
make mainnet && make install

2. Create a provider account

Sign up at swanchain.io or on your local swan-inference instance:

# Sign up
curl -X POST https://<your-inference-host>/api/v1/user/signup \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"YourPass1","display_name":"My Provider"}'

# Upgrade to provider — save the sk-prov-* key
curl -X POST https://<your-inference-host>/api/v1/user/upgrade-to-provider \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"name":"My Provider"}'

3. Initialize and configure

computing-provider --repo ~/.swan/computing init --node-name my-provider --port 9085

Edit ~/.swan/computing/config.toml:

[Inference]
  Enable = true
  WebSocketURL = "ws://inference-ws.swanchain.io"   # no /ws suffix
  ApiKey = "sk-prov-<your-key>"
  Models = ["meta-llama/Llama-3.2-3B-Instruct"]

Create ~/.swan/computing/models.json:

{
  "meta-llama/Llama-3.2-3B-Instruct": {
    "endpoint": "http://localhost:30000",
    "gpu_memory": 8000,
    "category": "text-generation"
  }
}

4. Run

computing-provider run

You should see:

Connected to Swan Inference
Registration successful: registered successfully
Model meta-llama/Llama-3.2-3B-Instruct health changed: unknown -> healthy

Next steps

Clone this wiki locally