Configuration

All PC2 configuration options and environment variables.

Configuration File

Location: data/config/pc2.json

{
  "pc2_mode": true,
  "http_port": 4200,
  "accessControl": {
    "enabled": false,
    "allowedWallets": []
  },
  "boson": {
    "enabled": true,
    "superNodes": [...]
  },
  "ai": {
    "defaultProvider": "ollama",
    "ollama": {
      "baseUrl": "http://localhost:11434"
    }
  },
  "updates": {
    "autoCheck": true,
    "checkInterval": 21600000
  }
}

Core Settings

KeyTypeDefaultDescription
pc2_modebooleantrueEnable PC2 features (vs vanilla Puter)
http_portnumber4200HTTP server port
data_dirstring"./data"Data storage directory

Access Control

{
  "accessControl": {
    "enabled": false,
    "allowedWallets": [
      {
        "wallet": "0x1234...",
        "role": "admin",
        "addedAt": "2024-01-15T10:00:00Z"
      }
    ]
  }
}
KeyTypeDescription
enabledbooleanEnable access control
allowedWalletsarrayList of allowed wallet entries
allowedWallets[].walletstringEthereum address (0x…)
allowedWallets[].rolestring”owner”, “admin”, or “member”
allowedWallets[].addedAtstringISO timestamp when added

Boson Network

{
  "boson": {
    "enabled": true,
    "superNodes": [
      {
        "host": "69.164.241.210",
        "dhtPort": 39001,
        "proxyPort": 8090
      }
    ],
    "proxy": {
      "enabled": true,
      "keepaliveInterval": 30000,
      "reconnectDelay": 5000
    }
  }
}
KeyTypeDefaultDescription
enabledbooleantrueEnable Boson integration
superNodesarray[…]List of super node endpoints
proxy.enabledbooleantrueEnable Active Proxy
proxy.keepaliveIntervalnumber30000PING interval (ms)
proxy.reconnectDelaynumber5000Reconnect delay (ms)

Blockchain / RPC

PC2 reads the Base chain for token-ownership checks (including dDRM playback access). The node maintains a rotating, health-tracked pool of public RPC endpoints and exposes its own caching proxy at /api/rpc/base.

{
  "blockchain": {
    "chain_id": 8453,
    "chain_name": "base",
    "public_proxy_url": "",
    "rpc_unhealthy_cooldown_ms": 60000,
    "rpc_urls": [
      "https://base-rpc.publicnode.com",
      "https://base.drpc.org",
      "https://mainnet.base.org"
    ]
  }
}
KeyTypeDefaultDescription
chain_idnumber8453Base mainnet chain ID
chain_namestring"base"Chain name
public_proxy_urlstring""Optional. A publicly-reachable URL pointing at this node’s own /api/rpc/base proxy (e.g. https://yourname.ela.city/api/rpc/base). When set, dDRM access checks run through your rotating, cached, multi-RPC proxy instead of a single public RPC. Leave empty for auto-detection — the node now auto-routes through its own public proxy during playback when reachable, falling back to a healthy public RPC otherwise.
rpc_unhealthy_cooldown_msnumber60000How long (ms) a public RPC is sidelined after returning 5xx / 429 before it’s retried.
rpc_urlsarray[…]Ordered pool of Base RPC endpoints. Index 0 must be a key-less, rate-tolerant public RPC.

Playback shows “purchase access tokens” on a video you own? That’s almost always a transient RPC rate-limit during the on-chain ownership check. As of the May 2026 release, the node auto-routes these checks through its own resilient /api/rpc/base proxy when it has a public address — no configuration needed. If your node runs without a public hostname, you can pin public_proxy_url to any reliable RPC or your own proxy to harden it further.

AI Providers

{
  "ai": {
    "defaultProvider": "ollama",
    "ollama": {
      "baseUrl": "http://localhost:11434",
      "defaultModel": "deepseek-r1:7b"
    },
    "openai": {
      "apiKey": "sk-...",
      "defaultModel": "gpt-4o"
    },
    "anthropic": {
      "apiKey": "sk-ant-...",
      "defaultModel": "claude-3-opus-20240229"
    },
    "gemini": {
      "apiKey": "AIza...",
      "defaultModel": "gemini-2.0-flash"
    },
    "xai": {
      "apiKey": "xai-...",
      "defaultModel": "grok-3"
    }
  }
}
KeyTypeDescription
defaultProviderstringDefault AI provider
[provider].apiKeystringAPI key for provider
[provider].baseUrlstringCustom API endpoint
[provider].defaultModelstringDefault model to use

Updates

{
  "updates": {
    "autoCheck": true,
    "checkInterval": 21600000,
    "githubRepo": "Elacity/pc2.net"
  }
}
KeyTypeDefaultDescription
autoCheckbooleantrueAuto-check for updates
checkIntervalnumber21600000Check interval (ms, 6 hours)
githubRepostring"Elacity/pc2.net"GitHub repo for updates

Session

{
  "session": {
    "expiryDays": 7,
    "cookieName": "session"
  }
}
KeyTypeDefaultDescription
expiryDaysnumber7Session duration in days
cookieNamestring"session"Cookie name for session

Storage

{
  "storage": {
    "maxFileSize": 104857600,
    "ipfs": {
      "enabled": true,
      "repo": "./data/ipfs"
    }
  }
}
KeyTypeDefaultDescription
maxFileSizenumber104857600Max upload size (100MB)
ipfs.enabledbooleantrueEnable IPFS storage
ipfs.repostring"./data/ipfs"IPFS repo directory

Environment Variables

Override config with environment variables:

VariableDescription
PORTHTTP port (overrides http_port)
NODE_ENVEnvironment (“development” or “production”)
PC2_DATA_DIRData directory path
PC2_CONFIG_FILEPath to config file
OPENAI_API_KEYOpenAI API key
ANTHROPIC_API_KEYAnthropic API key
GEMINI_API_KEYGoogle AI API key
XAI_API_KEYxAI API key

Example Configurations

Minimal (Development)

{
  "pc2_mode": true,
  "http_port": 4200
}

Production (VPS)

{
  "pc2_mode": true,
  "http_port": 4200,
  "accessControl": {
    "enabled": true
  },
  "boson": {
    "enabled": true
  },
  "updates": {
    "autoCheck": true
  }
}

Private (Home Server)

{
  "pc2_mode": true,
  "http_port": 4200,
  "accessControl": {
    "enabled": true,
    "allowedWallets": [
      {"wallet": "0xmywallet...", "role": "owner"}
    ]
  },
  "ai": {
    "defaultProvider": "ollama",
    "ollama": {
      "baseUrl": "http://localhost:11434"
    }
  }
}

Config Validation

PC2 validates configuration on startup. Invalid config causes:

[ERROR] Configuration validation failed:
  - accessControl.allowedWallets[0].wallet: Invalid Ethereum address

Fix the error and restart.


→ See Troubleshooting for common issues

© 2025 Elacity Labs. All rights reserved.