Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.vane.build/llms.txt

Use this file to discover all available pages before exploring further.

Server

VariableTypeDefaultRequiredDescription
DATABASE_URLstringYesPostgreSQL connection string. Example: postgresql://user:pass@host:5432/counsel.
PORTnumber3000NoPort the HTTP server listens on.
COUNSEL_BASE_URLstringInferred from Host + X-Forwarded-ProtoNoPublic base URL of this Vane instance. Set this when running behind a reverse proxy so the jwks_uri in GET /v1/ca/well-known is correct. Example: https://vane.build.

Security

VariableTypeDefaultRequiredDescription
COUNSEL_MASTER_KEYstringNo (strongly recommended)Passphrase used to encrypt Ed25519 private keys at rest with AES-256-GCM. Derive the actual key as SHA-256 of this string. Use a 64-character random hex string for adequate entropy. If not set, keys are stored in plaintext and a warning is logged.
SPIFFE_TRUST_DOMAINstringvane.localNoTrust domain used in all SPIFFE IDs. Example: vane.build. All companies in one deployment share this domain.

mTLS

VariableTypeDefaultRequired for mTLSDescription
COUNSEL_MTLS_CA_CERTstringEnables mTLSPEM-encoded CA certificate used to verify client certificates. Accepts raw PEM or a file path. Setting this variable switches the server to HTTPS mode.
COUNSEL_TLS_CERTstringYes (when mTLS enabled)PEM-encoded server certificate. Accepts raw PEM or a file path.
COUNSEL_TLS_KEYstringYes (when mTLS enabled)PEM-encoded server private key. Accepts raw PEM or a file path.

Observability

VariableTypeDefaultRequiredDescription
LOG_LEVELstringinfoNoPino log level. Valid values: trace, debug, info, warn, error, fatal, silent.
SENTRY_DSNstringNoSentry DSN for error reporting. If not set, Sentry is not initialized and exceptions are only logged.

Sidecar

VariableTypeDefaultRequiredDescription
COUNSEL_API_URLstringYesBase URL of the Vane server. Example: https://vane.build.
COUNSEL_API_KEYstringYesCompany-scoped API key.
COUNSEL_AGENT_IDstringYesAgent ID pre-registered on the server.
COUNSEL_COMPANY_IDstringYesCompany ID.
SIDECAR_PORTnumber8080NoPort for the sidecar proxy. Always binds to 127.0.0.1.
SIDECAR_AGENT_TARGETstringNoWhere to forward verified inbound calls. Required for inbound (reverse proxy) mode. Example: http://localhost:3001.
SIDECAR_CA_CERT_FILEstring./vane-ca.pemNoFile path to write the MITM CA certificate.

Example .env

# Required
DATABASE_URL=postgresql://counsel:secret@db.example.com:5432/counsel

# Security
COUNSEL_MASTER_KEY=a1b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f67890
SPIFFE_TRUST_DOMAIN=vane.build

# Server
PORT=3000
COUNSEL_BASE_URL=https://vane.build

# Observability
LOG_LEVEL=info
SENTRY_DSN=https://key@o1234.ingest.sentry.io/5678

Validation

The server does not validate DATABASE_URL format at startup — PostgreSQL connection errors will surface on the first query. Check the server logs for pool error entries if the database is unreachable. COUNSEL_MASTER_KEY is validated lazily — the server starts successfully without it, but logs a warning at startup:
WARN  Vane: COUNSEL_MASTER_KEY is not set — private keys are stored in plaintext in the database