Velic
Self-hosting

Configuration

Every environment variable Velic reads, grouped and documented from the real schema.

Velic is configured entirely through environment variables, validated once at startup against a typed schema. Copy .env.example to .env and fill it in; an incomplete or invalid configuration fails fast with a readable error.

Never commit secrets

The values below are documented by name and purpose only. Generate your own secrets and keys, and keep .env out of version control.

Runtime

VariableDefaultDescription
NODE_ENVdevelopmentdevelopment, test, or production.
LOG_LEVELinfofatal, error, warn, info, debug, trace, or silent.

API server

VariableDefaultDescription
API_HOST0.0.0.0Bind address for the API.
API_PORT4000API port.
API_PUBLIC_URLhttp://localhost:4000Public base URL the web app uses to reach the API.
WEB_ORIGINhttp://localhost:5173Allowed CORS origin for the web app.

App secrets

VariableRequiredDescription
APP_SESSION_SECRETYesSigns session cookies. Minimum 32 characters.
APP_DOWNLOAD_URL_SECRETYesSigns short-lived restore/download URLs. Minimum 32 characters.

Generate each with openssl rand -hex 32.

Postgres

VariableDefaultDescription
DATABASE_URLNone (required)Postgres connection string.
DATABASE_POOL_MAX10Maximum pool connections.

Redis

VariableDefaultDescription
REDIS_URLredis://localhost:6379Redis connection (used by the BullMQ queues and the session cache).

MinIO / S3 staging

Resumable uploads are staged here as ciphertext before being chunked and stored on Filecoin.

VariableDefaultDescription
S3_ENDPOINThttp://localhost:9000S3-compatible endpoint (MinIO locally).
S3_REGIONus-east-1Region.
S3_BUCKETvelic-stagingStaging bucket.
S3_ACCESS_KEY_IDNone (required)Access key.
S3_SECRET_ACCESS_KEYNone (required)Secret key.
S3_FORCE_PATH_STYLEtruePath-style addressing (MinIO requires it).

Filecoin / chain

VariableDefaultDescription
CHAINcalibrationcalibration (314159) or mainnet (314).
RPC_URLGlif Calibration RPCFilecoin JSON-RPC endpoint.
RPC_WS_URLNone (optional)Optional WebSocket RPC for subscriptions.
SYNAPSE_SOURCEvelicDataset namespace tag; datasets are reused only when it matches.

Contract addresses are not configured by hand

The FWSS, PDPVerifier, Filecoin Pay, and USDFC contract addresses are resolved at init from the installed Synapse packages. They are intentionally not environment variables, so they cannot drift from the SDK you actually run.

Operator signer

All signer backends are real (no mocks). Select one with SIGNER_BACKEND.

VariableDefaultDescription
SIGNER_BACKENDlocallocal, kms, or turnkey.
OPERATOR_KEYSTORE_PATHNoneEncrypted JSON keystore (preferred for local).
OPERATOR_KEYSTORE_PASSWORDNonePassphrase for the keystore.
OPERATOR_PRIVATE_KEYNoneRaw 0x private key (dev convenience only).
TURNKEY_API_BASE_URLhttps://api.turnkey.comTurnkey API base URL.
TURNKEY_API_PUBLIC_KEYNoneRequired when SIGNER_BACKEND=turnkey.
TURNKEY_API_PRIVATE_KEYNoneRequired when SIGNER_BACKEND=turnkey.
TURNKEY_ORGANIZATION_IDNoneRequired when SIGNER_BACKEND=turnkey.
TURNKEY_SIGN_WITHNoneRequired when SIGNER_BACKEND=turnkey.

For local, provide either a keystore (path + password) or OPERATOR_PRIVATE_KEY.

KMS (encryption-key wrapping)

Wraps the per-master AES data-encryption keys; can also back the signer.

VariableDefaultDescription
KMS_PROVIDERlocallocal, aws, or gcp.
KMS_LOCAL_MASTER_KEYNoneBase64 32-byte master key (required when KMS_PROVIDER=local). Generate with openssl rand -base64 32.
KMS_KEY_IDNoneCloud KMS key id/ARN (required for aws/gcp, or SIGNER_BACKEND=kms).
KMS_REGIONNoneCloud KMS region.

Media tooling

Invoked as separate-process binaries (LGPL FFmpeg; pinned c2patool).

VariableDefaultDescription
FFMPEG_PATHffmpegFFmpeg binary (thumbnail frames only, no transcoding).
FFPROBE_PATHffprobeFFprobe binary (technical metadata).
MEDIAINFO_PATHmediainfoMediaInfo binary (optional metadata enrichment).
C2PATOOL_PATHNone (optional)Leave unset to use the pinned, vendored c2patool; or set an absolute path.

Worker

VariableDefaultDescription
WORKER_CONCURRENCY4Concurrent jobs per worker process.

Transactional email

Powers password-reset and team-invite links.

VariableDefaultDescription
SMTP_HOSTNone (optional)SMTP relay host (e.g. Brevo).
SMTP_PORT587587 = STARTTLS, 465 = implicit TLS.
SMTP_SECUREfalsetrue for implicit TLS (port 465).
SMTP_USERNoneRequired when SMTP_HOST is set.
SMTP_PASSWORDNoneRequired when SMTP_HOST is set.
EMAIL_FROMNoneRequired when SMTP_HOST is set; must be a verified sender.
EMAIL_REPLY_TONoneReply-To address (a real inbox).

Email console fallback

When SMTP_HOST is unset, the email module uses a clearly-logged console fallback so local development works without a relay. It never silently pretends to deliver a message.

No billing variables

Billing is not part of this build, so there are intentionally no Stripe or payment variables. The on-chain treasury settles operator-side; see the architecture.

On this page