Skip to main content
No real secret values appear on this page — variable names, purposes, and whether a value is safe to reuse across environments only. Generate fresh secrets for every deployment; never reuse a development value in production.

Coordinator (pushed via VSOCK:7000 inside the enclave)

VariableWhatNotes
DATABASE_URLPostgres connection stringMust use ?sslmode=require; needs the Session pooler host if using Supabase free tier (direct connect is IPv6-only)
REDIS_URLRedis connection stringUse rediss:// + auth — the VSOCK bridge doesn’t terminate TLS itself
POSTGRES_BRIDGE_HOST / _PORTReal upstream Postgres host/portinit writes a 127.0.0.1 /etc/hosts alias so TLS SNI still sees the real hostname
REDIS_BRIDGE_HOST / _PORTSame trick for Redis
SUI_RPC_URLSui fullnode URLe.g. https://fullnode.testnet.sui.io
SUI_NETWORKmainnet / testnet / devnet
OPERATOR_PRIVATE_KEYSui secret key used by the sidecar to sign PTBsNever the same key as the enclave’s signing key — see On-chain contracts for why that separation matters
PINAIVU_PACKAGE_IDPublished pinaivu contracts address
PINAIVU_ENCLAVE_CONFIG_IDShared-object id of EnclaveConfig<ENCLAVE>
PINAIVU_CAP_IDOwned-object id of Cap<ENCLAVE>Held by the operator address
PINAIVU_VAULT_IDShared-object id of Vault<SUI>
PINAIVU_ENCLAVE_OBJECT_IDSet automatically by register-coordinator.sh after a successful registrationLives in the dynamic env file, not the static one
SIDECAR_URLDefaults to http://127.0.0.1:8200
SIDECAR_SECRETAuthenticates coordinator↔sidecar and /v1/admin/*Auto-generated from NSM entropy if not supplied
PINAIVU_BINDDefaults to 127.0.0.1:4000
PINAIVU_LIBP2P_LISTENDefaults to /ip4/0.0.0.0/tcp/4001

Gateway (api.pinaivu.com backend)

VariablePurposeReuse across environments?
DATABASE_URLGateway’s own Postgres (API keys, usage)No — provision real Postgres per environment
REDIS_URLRate limitingNo
COORDINATOR_URLLive coordinator’s HTTPS endpointRe-verify via GET /enclave_health before relying on it — the IP can change on redeploy
ADMIN_SECRETAuth for the key-management dashboardNo — generate fresh per environment
PORTListen portYes, as a default
NODE_TLS_REJECT_UNAUTHORIZEDSet to 0 only to trust the coordinator’s self-signed cert in devMust not be set in production once a real cert chain is in place

chat-relayer (chat.pinaivu.ai backend)

VariablePurposeReuse across environments?
CHAT_RELAYER_BINDListen addressYes, as a default
DATABASE_URLchat-relayer’s own Postgres (pgvector)No — dedicated instance per environment
REDIS_URLRate limitingNo
MEMORY_ENCRYPTION_KEY32-byte hex secret, HKDF-derives a per-owner AES-256-GCM key (see the memory layers caveat)No — generate with openssl rand -hex 32 per environment, never reuse a dev value
WALRUS_PUBLISHER_URL / WALRUS_AGGREGATOR_URLWalrus testnet HTTP endpointsYes, while on testnet
WALRUS_EPOCHSBlob lifetimeYes, as a default
PINAIVU_API_BASEUpstream coordinator (or gateway, once live)No — points directly at the coordinator during early testing; switch to the gateway URL once provisioned
INSECURE_COORDINATORTrusts a self-signed coordinator certDev-only, like the gateway’s equivalent flag
EMBEDDING_API_BASE / EMBEDDING_API_KEY / EMBEDDING_MODELJina embeddings for cross-session recallGet your own production API key rather than sharing one across environments
EMBEDDING_DIMFixes the pgvector column’s dimension at migration timeOnly reusable if EMBEDDING_MODEL doesn’t change — changing models later needs a new migration, not just an env edit
SUI_RPC_URLSui fullnode URLYes
For the enclave deploy, the same variable names go into .env.runtime and are pushed over VSOCK:7000 by parent_forwarder.sh, exactly like the coordinator.

explorer-indexer (explorer.pinaivu.com backend)

VariablePurposeReuse across environments?
DATABASE_URLRead-only role against the coordinator’s real PostgresNo — provision a dedicated read-only role per environment, never reuse a seeded dev DB
INDEXER_BINDListen addressYes, as a default
WALRUS_PUBLISHER_URLWalrus testnet endpointYes, while on testnet
ARCHIVE_AFTER_HOURSDelay before a receipt is batched to WalrusNo — dev uses 0 to force immediate archiving for testing; production should use a real delay (e.g. 24)
RUST_LOGLog verbosityYes

What each new operator must provision themselves

  • Real Postgres + Redis for the gateway.
  • Real Postgres with the pgvector extension, plus Redis, for chat-relayer.
  • A read-only Postgres role on the coordinator’s actual database for explorer-indexer.
  • A fresh MEMORY_ENCRYPTION_KEY and ADMIN_SECRET — generated, not copied from any other environment.
  • Their own embeddings API key rather than a shared one, for production use.