Configuration
Generated from the settings schema in apps/api/src/config.ts; do not edit by hand. Regenerate with corepack pnpm --filter @academy/api config:doc.
The API reads 157 settings from its environment (in production /etc/academy/api.env). Annotated examples: apps/api/.env.example for development, deploy/api.env.example for a server, deploy/connectors.env.example for the connector host. “↑ as above” marks a setting described together with the one above it.
In production the API refuses to start without JWT_SECRET and KMS_MASTER_KEY, and with AUTH_MODE=dev or LAB_ISOLATION=none.
These are what belongs to one server or deployment. What the platform’s team changes (mail, payment providers, AI, the sign-in apps, the organisations’ defaults, the lab policy, the source agent, the operator’s addresses, the RTC targets …) is set in the admin console and kept in the database; the portal reads it live (ADR 0478; the console’s docs/configuration.md lists the settings that were environment variables here).
Server, database and sessions
Section titled “Server, database and sessions”| Setting | Values | Default | What it does |
|---|---|---|---|
NODE_ENV |
development / test / production | development |
production turns on the start checks below (secrets, email, no developer sign-in). |
HOST |
text | 0.0.0.0 |
Address the API listens on; behind nginx on a server: 127.0.0.1. |
PORT |
number | 4000 |
Port the API listens on. |
TRUST_PROXY |
text | loopback |
Which proxies’ X-Forwarded-For the API believes (proxy-addr list: addresses, ranges, or loopback/linklocal/uniquelocal). nginx on the same host by default; “none” believes no one. |
DATABASE_URL |
text | postgres://academy:academy@localhost:5432/academy |
PostgreSQL connection (with pgvector for semantic search over knowledge sources). |
DATABASE_SSL_CA_FILE |
text | – | The CA of a database server of its own (install.sh’s db role, ADR 0428): PostgreSQL’s certificate is checked against it (and only this CA), whatever sslmode the URL says. Only the database client trusts it, never other connections. |
REDIS_URL |
text | redis://localhost:6379 |
Redis for queues, rate limits and live events. |
REDIS_TLS_CA_FILE |
text | – | The CA for Redis over TLS (rediss://) on a database server of its own (ADR 0428); only the Redis client trusts it. |
JWT_SECRET |
text | a development value (refused in production) | Signs session tokens: at least 32 random characters, e.g. openssl rand -base64 48. Required in production. |
JWT_TTL |
text | 8h |
How long a session token lasts, e.g. 8h. |
Sign-in and email
Section titled “Sign-in and email”| Setting | Values | Default | What it does |
|---|---|---|---|
AUTH_MODE |
dev / standard | dev |
dev: also allows password-less dev sign-in (never in production); standard: real sign-in methods only. |
MAIL_SETTINGS_KEY |
text | – | The platform’s mail is set in the admin console (Mail, its ADR 0002 and 0003; here ADR 0452 and 0455) and read live: one SMTP server or Microsoft 365, its secrets sealed with this key. The console makes it in /etc/academy/keys/mail-settings-key.env, which the API’s unit reads after its settings (ADR 0481): no copy in the API’s settings. SMTP_URL and M365_* are no longer read. |
MAIL_FROM |
text | Academy <no-reply@academy.local> |
Names the platform in texts and calendar invitations; the sender of mails is the console’s Mail. |
IDENTITY_PEPPER |
text | – | Secret for hashing emails in the global sign-in directory (defaults to one derived from JWT_SECRET). |
OAUTH_ENDPOINTS |
text | {} |
Endpoint overrides per provider (sovereign clouds, GitHub Enterprise, test doubles): {“github”:{“authorize”:“…”,“token”:“…”,“userinfo”:“…”,“emails”:“…”}}. |
Web addresses and sign-up
Section titled “Web addresses and sign-up”| Setting | Values | Default | What it does |
|---|---|---|---|
CORS_ORIGINS |
text | http://localhost:3000 |
Web app addresses allowed to call the API, comma-separated. |
ALLOW_SIGNUP |
true / false | true |
true: anyone may create an organisation at /signup; false once yours exists. |
INVITE_QUOTA_NEW_ORG_DAYS |
number | 14 |
Invitations of new organisations: for this many days after signup, until it proves a domain of its own, an organisation sends at most INVITE_QUOTA_NEW_ORG_DAILY invitations a day, and all such organisations together at most INVITE_QUOTA_NEW_ORGS_HOURLY an hour. |
INVITE_QUOTA_NEW_ORG_DAILY |
number | 50 |
↑ as above |
INVITE_QUOTA_NEW_ORGS_HOURLY |
number | 500 |
↑ as above |
CONTENT_NOTICE_ORGANISATION_DAYS |
number | 7 |
Fallback for the days an organisation has to decide a notice about its content before the platform’s team takes it over (ADR 0332), while the platform’s settings have none: the admin console seeds the setting (7) and changes it, the portal writes nothing. |
SIGNUP_ORGS_PER_IP_HOURLY |
number | 5 |
Self-service signups: organisations per network and hour and per owner email and day; public course and event registrations per email and hour (each sends a confirmation to that address). |
SIGNUP_ORGS_PER_EMAIL_DAILY |
number | 3 |
↑ as above |
REGISTRATIONS_PER_EMAIL_HOURLY |
number | 5 |
↑ as above |
SOURCE_COMMIT |
text | – | Names the running commit when the server is no git checkout (AGPLv3 section 13, ADR 0178): the source code’s address is the operator’s in the admin console (ADR 0269); “{commit}” there is replaced by it. |
Files, media and live sessions
Section titled “Files, media and live sessions”| Setting | Values | Default | What it does |
|---|---|---|---|
STORAGE_DIR |
text | .data/storage |
Folder for uploaded files, videos and generated media. |
ERASURE_LOG_FILE |
text | – | The erasure log’s copy outside the database (ADR 0316): ids of erased memberships and accounts, so the erasures a restored backup undoes run again. Keep it apart from the database and the files, and copy it off the server with them. Default: erasure-log/erasures.jsonl beside STORAGE_DIR (deploy/update.sh makes the folder for the API’s user). |
FILES_ENCRYPTION |
on / off | – | Stored files encrypted at rest (ADR 0448): uploads, videos, recordings, generated media. On by default in production, off elsewhere unless set. FILES_KEY_SOURCE names what wraps the file key: platform (KMS_MASTER_KEY, until a key in the KMS exists) or okms, a symmetric service key in OVHcloud’s KMS: FILES_OKMS_ENDPOINT, FILES_OKMS_ID, FILES_OKMS_KEY_ID, and to sign in an access certificate with its key (FILES_OKMS_CLIENT_CERT, FILES_OKMS_CLIENT_KEY, PEM files the API’s user reads) or FILES_OKMS_TOKEN_FILE. Switching to okms wraps the file key anew at the next start. |
FILES_KEY_SOURCE |
platform / okms | platform |
↑ as above |
FILES_OKMS_ENDPOINT |
URL | – | ↑ as above |
FILES_OKMS_ID |
text | – | ↑ as above |
FILES_OKMS_KEY_ID |
text | – | ↑ as above |
FILES_OKMS_CLIENT_CERT |
text | – | ↑ as above |
FILES_OKMS_CLIENT_KEY |
text | – | ↑ as above |
FILES_OKMS_TOKEN_FILE |
text | – | ↑ as above |
MAX_UPLOAD_BYTES |
number | 10 * 1024 * 1024 * 1024 |
Training videos can be long: 10 GB by default (uploads stream to disk, never into memory). |
ORG_DELETE_AFTER_EXPORT_DAYS |
number | 30 |
Target days after the retrieval period for the operator to execute erasure (7–30; contractual maximum 30). |
MEDIA_WORKERS |
number | 1 |
Video processing jobs at the same time on this node (0: none). |
C2PA_SIGNING_CERT |
text | – | Content Credentials (C2PA) on AI-made pictures and videos (ADR 0290): the signing certificate chain (PEM, end entity first) and its private key (PKCS#8 PEM), as files. Without them, AI media still carry the IPTC label in their XMP. C2PA_LIBRARY_PATH (read by the library itself) names the checked native binary deploy/install-c2pa.sh fetched. |
C2PA_SIGNING_KEY |
text | – | ↑ as above |
C2PA_SIGNING_ALG |
es256 / es384 / es512 / ps256 / ps384 / ps512 / ed25519 | es256 |
↑ as above |
C2PA_TSA_URL |
URL | – | An RFC 3161 time-stamp authority for the signatures. Kept, and not used yet: the C2PA library build the portal runs can not reach one, so signatures carry no time-stamp until the portal fetches it itself (ADR 0299). |
C2PA_TSA_HEADER |
text | – | A header the time-stamp authority asks for, as “Name: value” (an API key), ADR 0362. |
C2PA_COMPRESS_MANIFESTS |
on / off | on |
Compressed manifests where the format allows them (ADR 0362). |
C2PA_MODE |
production / test / off | test |
How Content Credentials run (ADR 0299). test (the default): signs with whatever certificate is there, also the test certificate the deploy makes; verifiers show such a signer as untrusted. production: the signer first proves itself, signing one pixel and reading it back against the C2PA trust list, and signs nothing unless that reads as trusted; the deploy makes no test certificate; C2PA_KEY_SOURCE must be said outright. off: nothing is signed (AI media keep the IPTC label in their XMP). |
C2PA_TRUST_ANCHORS |
text | – | Content Credentials a file comes with (a provider’s) count as trusted when their signer is under one of these certification authorities: a PEM file. Unset: the C2PA trust list that ships with the portal (ADR 0295). For an installation whose providers sign under another list. |
C2PA_KEY_SOURCE |
file / transit / okms | – | Where the key for Content Credentials is (ADR 0298). file: the PEM file C2PA_SIGNING_KEY names, or the certificate put in at the admin console. transit: a key that never leaves a key management system speaking the transit API (OpenBao, HashiCorp Vault); the signer sends a digest and gets the signature back. Unset means file, except with C2PA_MODE=production, where it has to be said. With transit: C2PA_TRANSIT_ADDR (http://127.0.0.1:8200, https://… or unix:/run/openbao/bao.sock), C2PA_TRANSIT_TOKEN_FILE (a file with a token that may read that key and sign with it, nothing else), C2PA_TRANSIT_KEY and C2PA_TRANSIT_MOUNT. The certificate chain is the one stored with the key there. |
C2PA_OKMS_ENDPOINT |
URL | – | With C2PA_KEY_SOURCE=okms the key is in the Key Management Service of OVHcloud, in software or on its HSM (ADR 0303): C2PA_OKMS_ENDPOINT (the regional address, https://eu-west-rbx.okms.ovh.net), C2PA_OKMS_ID (the id of the KMS), C2PA_OKMS_KEY_ID (the id of the service key), and to sign in either an access certificate with its key (C2PA_OKMS_CLIENT_CERT, C2PA_OKMS_CLIENT_KEY, PEM files) or C2PA_OKMS_TOKEN_FILE. The certificate chain is the file C2PA_SIGNING_CERT names. |
C2PA_OKMS_ID |
text | – | ↑ as above |
C2PA_OKMS_KEY_ID |
text | – | ↑ as above |
C2PA_OKMS_CLIENT_CERT |
text | – | ↑ as above |
C2PA_OKMS_CLIENT_KEY |
text | – | ↑ as above |
C2PA_OKMS_TOKEN_FILE |
text | – | ↑ as above |
C2PA_TRANSIT_ADDR |
text | – | ↑ as above |
C2PA_TRANSIT_TOKEN_FILE |
text | – | ↑ as above |
C2PA_TRANSIT_KEY |
text | c2pa-claim-signing |
↑ as above |
C2PA_TRANSIT_MOUNT |
text | transit |
↑ as above |
C2PA_SIGNER_SOCKET |
text | – | Where the native library doesn’t run on the host (AlmaLinux 9: its C++ runtime is too old), the signer runs in a container (academy-c2pa.service) and the API sends it the files over this socket; the key then stays in the container (ADR 0290). |
LIVE_MAX_PUBLISHERS |
number | 6 |
How many people may be on stage in a live session at once. |
ICE_SERVERS |
text | [] |
Live rooms without the media server (peer to peer): JSON array of RTCIceServer objects with fixed credentials for our own TURN server. Only turn: and turns: addresses count: the browser takes relayed connections only, so STUN entries are left out (ADR 0334). Prefer TURN_URLS. |
TURN_URLS |
text | – | Our own TURN server (coturn) for live rooms without the media server, comma-separated, e.g. turns:turn.academy.example.com:5349?transport=tcp,turn:turn.academy.example.com:3478?transport=udp. The API hands each person short-lived credentials for it (TURN_SECRET). Without the media server and without a TURN server, live rooms carry no audio or video (ADR 0334). |
TURN_SECRET |
text | – | coturn’s static-auth-secret (use-auth-secret), at least 32 characters: signs the short-lived TURN credentials. |
MEDIA_PROXY_HOSTS |
text | – | Provider preview pictures and sounds (ADR 0334): further hosts the media proxy may fetch from, comma-separated, beyond the providers’ own (e.g. a CDN a provider moved to). *.example.com takes the subdomains. https only; private addresses are never fetched. |
SCORM_CONTENT_URL |
URL | – | The separate host SCORM, H5P, cmi5 and xAPI packages are served from (ADR 0041), e.g. https://content.academy.example.com; without it SCORM is off. Its files need the media cookie it sets for itself at each launch (ADR 0337): keep it a subdomain of the portal’s own domain, or browsers that block third-party cookies show nothing. |
DOCS_SITE_URL |
URL | – | The docs site with every public handbook (ADR 0274), e.g. https://docs.academy.example.com; the help links it as “All handbooks”. deploy/update.sh sets it once the site answers. |
MAINTENANCE_GUARD |
on / off | – | Whether the API follows the maintenance windows the admin console plans (ADR 0284); on by default, off in tests (they share one database). |
LIVEKIT_URL |
text | – | Self-hosted LiveKit media server (SFU) for live sessions: the WebSocket URL browsers connect to, e.g. wss://rtc.academy.example.com. Without it, sessions fall back to a small peer-to-peer mesh. The fallback only (ADR 0477): once the admin console has the RTC targets (Operations → Live → RTC targets), they are used instead of LIVEKIT_*, TURN_URLS, TURN_SECRET and ICE_SERVERS. |
LIVEKIT_API_URL |
text | – | HTTP base of LiveKit’s server API, if not reachable at the host of LIVEKIT_URL (e.g. http://127.0.0.1:7880). |
LIVEKIT_API_KEY |
text | – | ↑ as above |
LIVEKIT_API_SECRET |
text | – | ↑ as above |
AI: development fallback and limits
Section titled “AI: development fallback and limits”| Setting | Values | Default | What it does |
|---|---|---|---|
AI_PROVIDER |
anthropic / openai / gemini / mistral / fake | – | Development and tests only: the language model for organisations that connected none, and for the AI learning companion until platform administrators set the platform’s model (anthropic | openai | gemini | mistral | fake; defaults to the first provider with an API key, in that order, else fake). Production ignores these (ADR 0018): the platform’s model is in the database. |
ANTHROPIC_API_KEY |
text | – | ↑ as above |
OPENAI_API_KEY |
text | – | ↑ as above |
OPENAI_BASE_URL |
text | – | Any OpenAI-compatible endpoint (Azure OpenAI, a gateway, a local server). |
GEMINI_API_KEY |
text | – | ↑ as above |
MISTRAL_API_KEY |
text | – | ↑ as above |
AI_MODEL |
text | – | Model name at the chosen provider; each provider has a default (llmDefaultModels in the contracts). |
AI_PRICES |
text | {} |
Cost estimates for other models, EUR per million tokens: {“gpt-5”:{“input”:1.25,“output”:10}}. |
AI_EFFORT |
low / medium / high / xhigh / max | medium |
Default reasoning effort for models that support it. |
AGE_POLICY |
on / off | on |
The learner policy (ADR 0216): the AI only for people with an age group and status that allow it. Off only in tests that don’t test it. |
Code lab
Section titled “Code lab”| Setting | Values | Default | What it does |
|---|---|---|---|
LAB_WORKERS |
number | 4 |
Concurrent lab runs per API process, each handed to a lab node (the API runs no code itself, ADR 0497). |
PREVIEW_DOMAIN |
text | – | The preview of lab sessions (ADR 0186): the domain whose subdomains are sessions (preview.academy.example.org; preview.localhost in development) and the port of the API’s preview server (the web server sends *. |
PREVIEW_PORT |
number | 4010 |
↑ as above |
PREVIEW_CERTIFICATES |
wildcard-manual / wildcard-auto / single | wildcard-manual |
Where the preview’s certificates come from (ADR 0186 addendum): - wildcard-manual: one wildcard certificate, through deploy/update.sh preview-certificate on the server and a TXT record set by hand; - wildcard-auto: one wildcard certificate, through a certbot DNS plugin (PREVIEW_DNS_AUTHENTICATOR), renewed by certbot’s timer; - single: a certificate for each project’s host over HTTP-01, from the root service academy-preview-certs, renewed by certbot’s timer. |
PREVIEW_CERT_SOCKET |
text | /run/academy-preview/certs.sock |
Mode single: the socket of the certificates’ service (deploy/update.sh sets it up). |
PREVIEW_CERT_WEEKLY |
number | 20 |
Mode single: new certificates a week at most. Let’s Encrypt’s 50 a week are shared with every other host of the registered domain. Read by the certificates’ service. |
PREVIEW_DNS_AUTHENTICATOR |
text | – | Mode wildcard-auto: the certbot DNS plugin, as certbot names it (dns-cloudflare, dns-ovh, dns-rfc2136, …). Read by deploy/update.sh. |
PREVIEW_DNS_CREDENTIALS |
text | – | Mode wildcard-auto: the plugin’s credentials file, put on the server by the admin (0600 root). Read by deploy/update.sh, never by the API. |
PREVIEW_DNS_PROPAGATION_SECONDS |
number | – | Mode wildcard-auto: seconds the plugin waits for DNS to show the record (its own default when unset). |
LAB_TUNNEL_ENDPOINT |
text | – | The tunnel to remote lab nodes (ADR 0213), written by deploy/update.sh once the hub is set up: where nodes reach the hub (nodes. |
LAB_TUNNEL_HUB_KEY |
text | – | ↑ as above |
LAB_TUNNEL_NETWORK |
text | 10.77.0.0/24 |
↑ as above |
LAB_TUNNEL_API_PORT |
number | 4080 |
↑ as above |
LAB_DOOR_URL |
text | – | Lab nodes in the private network (ADR 0213, addendum: our nodes, TLS, no tunnel), written by deploy/update.sh once the door is set up: the door’s address for nodes (https://<this server’s private address>:4443) and the lab CA’s certificate, which nodes get when they join. Without both no server joins this way. |
LAB_DOOR_CA_FILE |
text | – | ↑ as above |
GIT_SERVER |
off / local / container | off |
The Git area (ADR 0188). off: no Git; local: the API runs git http-backend itself (development and tests); container: in the gVisor container GIT_CONTAINER (no network, only the repositories), set up by deploy/update.sh. GIT_ROOT holds the bare repositories; GIT_PUBLIC_URL is where clients clone (https://git.<web app’s host>; the API’s /git when unset). |
GIT_ROOT |
text | ./data/git |
↑ as above |
GIT_CONTAINER |
text | academy-git |
↑ as above |
GIT_GATE |
text | – | In container mode: the Git gate’s socket (ADR 0265), so the API calls git in the container without docker rights. Unset, the API calls docker itself (development). |
GIT_PUBLIC_URL |
URL | – | ↑ as above |
LAB_DOCKER |
text | docker |
The docker command the Git area’s container is called with (GIT_SERVER=container without the gate). |
Encryption, cells and public addresses
Section titled “Encryption, cells and public addresses”| Setting | Values | Default | What it does |
|---|---|---|---|
KMS_MASTER_KEY |
text | – | Base64 of 32 random bytes: the platform key-encryption key (production: a cloud KMS key instead). |
CONSOLE_KMS_KEY |
text | – | Base64 of 32 random bytes: the admin console’s own key (ADR 0442). It seals only the secrets the console manages (the platform’s provider keys, its AI, search and knowledge connections, mail relay, Slack, proxies, platform messages, the sellers’ copy for the DAC7 report and payouts); the console holds it instead of KMS_MASTER_KEY. The console makes it in /etc/academy/keys/console-kms-key.env, which the API’s unit reads after its settings (ADR 0481): the portal never makes it and keeps no copy. |
CELL_ID |
text | local-1 |
This cell’s id and home region, and its public API URL (HLD §20 cells). |
REGION |
text | eu |
↑ as above |
PUBLIC_API_URL |
text | http://localhost:4000 |
↑ as above |
PUBLIC_WEB_URL |
text | http://localhost:3000 |
Public URL of the web app (LTI launches and deep linking land there). |
ADMIN_CONSOLE_URL |
URL | – | The admin console’s address (ADR 0261), only for the platform team’s emails: a ticket in the platform’s queue links there. Default: admin.<PUBLIC_WEB_URL’s host>, as the console installs. The portal’s pages never link to it. |
PASSKEY_RP_ID |
text | – | The passkeys’ relying party: a host name, the web app’s own or a parent domain of it (default: PUBLIC_WEB_URL’s host). Keep it when the web app moves to a subdomain (academy.example.com → portal.academy.example.com), or every passkey made before stops working. |
PASSKEY_ORIGINS |
text | – | Comma-separated web addresses passkeys may be used from (default: PUBLIC_WEB_URL); each must be on PASSKEY_RP_ID. |
PASSKEY_LEGACY_RP_ID |
text | – | After a move to new host names (ADR 0501): the passkeys’ relying party before the move (the old PASSKEY_RP_ID, else the old web app’s host). Passkeys made there keep working from PASSKEY_ORIGINS in browsers that know WebAuthn related origins: the old host serves /.well-known/webauthn naming them (deploy/update.sh, ACADEMY_LEGACY_HOSTS). New passkeys are made for PASSKEY_RP_ID. |
LEGACY_API_URL |
URL | – | After a move to new host names (ADR 0501): the API’s public address before the move, and the day of the move. A company sign-in made before it keeps sending its old redirect URI (or SAML addresses) to the identity provider until an administrator confirms the new one with a test sign-in, at most three months; the learning app’s proofs for the old address count, and so do Teams tokens for it. Both or neither. |
HOSTS_MOVED_AT |
text | – | ↑ as above |
LEARNING_APP_ANDROID_PACKAGE |
text | – | The learning app’s verified app links (ADR 0343), served by the web app under /.well-known so that phones and tablets hand the sign-in’s answer only to the real app. Android: the package name and the comma-separated SHA-256 fingerprints of its signing certificates. iOS: comma-separated app ids (“TEAMID.bundle.id”). Unset: no app links; notebooks sign in through the loopback address anyway. |
LEARNING_APP_ANDROID_CERT_SHA256 |
text | – | ↑ as above |
LEARNING_APP_IOS_APP_IDS |
text | – | ↑ as above |
PORTAL_WEB_PORT |
number | 3000 |
The port the web app listens on locally (127.0.0.1): organisations’ own portal domains are passed there. |
CELLS |
text | [] |
JSON array of the other cells: [{“id”,“region”,“apiUrl”}]. |
CONTROL_DATABASE_URL |
text | – | Global control-plane database holding tenant -> cell routing (defaults to DATABASE_URL). |
Learning analytics and catalogue
Section titled “Learning analytics and catalogue”| Setting | Values | Default | What it does |
|---|---|---|---|
BKT_FIT_HOURS |
number | 24 |
Re-fit knowledge-tracing parameters this often (hours); 0 turns the background job off. |
STRIPE_API_URL |
text | https://api.stripe.com |
API base (test doubles only). |
MOLLIE_API_URL |
text | https://api.mollie.com |
Mollie’s API and OAuth hosts (ADR 0205; test doubles only). |
MOLLIE_OAUTH_URL |
text | https://my.mollie.com |
↑ as above |
MANGOPAY_API_URL |
text | `` | Mangopay’s API host (ADR 0205; test doubles only); left empty, the sandbox or production as the platform’s account says. |
ADYEN_API_URL |
text | `` | One host for all of Adyen’s APIs (ADR 0205; test doubles only); left empty, Adyen’s test or live hosts as the platform’s account says. |
VIVA_API_URL |
text | `` | One host for all of Viva.com’s APIs (ADR 0205; test doubles only); left empty, Viva’s demo or live hosts as the platform’s account says. |
Provider addresses (change only for test doubles)
Section titled “Provider addresses (change only for test doubles)”| Setting | Values | Default | What it does |
|---|---|---|---|
HEYGEN_API_URL |
text | https://api.heygen.com |
AI video providers (each organisation brings its own key; bases are for test doubles). |
SYNTHESIA_API_URL |
text | https://api.synthesia.io |
↑ as above |
SYNTHESIA_UPLOAD_URL |
text | https://upload.api.synthesia.io |
↑ as above |
SYNTHESIA_DEVELOPER_URL |
text | https://developers.synthesia.io |
↑ as above |
LIVEAVATAR_API_URL |
text | https://api.liveavatar.com |
↑ as above |
BFL_API_URL |
text | https://api.eu.bfl.ai |
Picture sources for course covers (each organisation brings its own key; bases are for test doubles). |
OPENAI_IMAGES_URL |
text | https://api.openai.com |
↑ as above |
PEXELS_API_URL |
text | https://api.pexels.com |
↑ as above |
PIXABAY_API_URL |
text | https://pixabay.com |
↑ as above |
ANTHROPIC_API_URL |
text | https://api.anthropic.com |
Language model vendors’ API bases, for listing the models a key may use (test doubles only). |
OPENAI_API_URL |
text | https://api.openai.com |
↑ as above |
MISTRAL_API_URL |
text | https://api.mistral.ai |
↑ as above |
GEMINI_API_URL |
text | https://generativelanguage.googleapis.com |
↑ as above |
DEEPL_API_URL |
text | – | DeepL API base; by default chosen by the key (free keys end in “:fx”). Test doubles only. |
MOJEEK_API_URL |
text | https://www.mojeek.com |
Web search for the knowledge base (ADR 0123): the providers’ API addresses (tests point them elsewhere). |
WIKIMEDIA_COMMONS_URL |
text | https://commons.wikimedia.org |
Wikimedia Commons, for free pictures on course slides (ADR 0164). |
BRAVE_SEARCH_API_URL |
text | https://api.search.brave.com |
↑ as above |
Background workers and knowledge sources
Section titled “Background workers and knowledge sources”| Setting | Values | Default | What it does |
|---|---|---|---|
COMMONS_WORKERS |
number | 4 |
Whether the course factory and the source agent run on this node (0: not here), and the most factory jobs at once; how many run is the platform’s setting (ADR 0397). |
COMMONS_FETCH_ALLOW_PRIVATE |
true / false | false |
Tests only: the knowledge base may read pages on private addresses (local test servers). |
AI_VIDEO_WORKERS |
number | 1 |
Workers that hand AI video jobs to providers, wait for them and import the results. |
DOCLING_URL |
text | – | Docling (docling-serve) reads documents that connectors send as files, e.g. http://127.0.0.1:5001. Without it, only text sent as Markdown is taken. |
DOCLING_API_KEY |
text | – | Docling’s DOCLING_SERVE_API_KEY. |
DOCLING_LARGE_URL |
text | – | The document reader for large files (deploy/install-docling.sh on a server of 20 GB or more, ADR 0474), e.g. http://127.0.0.1:5003; same key as Docling’s. Without it, large files go to DOCLING_URL with a longer deadline. |
NAMES_URL |
text | – | The local name finder (Presidio + spaCy, deploy/install-names.sh, ADR 0470), e.g. http://127.0.0.1:5002: finds the people a document’s passages name before they are removed. Without it, the organisation’s model alone searches. |
NAMES_API_KEY |
text | – | The name finder’s NAMES_API_KEY (/etc/academy-names.env). |
CLAMD_SOCKET |
text | – | ClamAV’s clamd for files of knowledge sources and every upload (ADR 0394, 0407): its socket (/run/clamd.scan/clamd.sock) or tcp://host:port. Set, no file is read or kept without its verdict; deploy/install-clamav.sh sets it once clamd passes its self-test. Missing in production, every upload is refused (503 scanner_missing), knowledge files wait, and the server status opens a ticket for the platform team. |
KNOWLEDGE_WORKERS |
number | 1 |
Workers that read, cut and analyse documents from knowledge sources. |
KNOWLEDGE_MAX_FILE_MB |
number | 10_240 |
Largest file a connector may send for the portal to read: the ceiling; the platform’s setting knowledgeFiles.maxFileMb may set less (ADR 0393). |
CONNECTOR_HOST_SECRET |
text | – | The portal’s connector host signs in with this (at least 32 characters); without it, no connectors run on the portal. |
KNOWLEDGE_VECTORS |
on / off | on |
Semantic search over knowledge sources with pgvector (on when the extension is installed); “off” keeps it to full text. |
Logging
Section titled “Logging”| Setting | Values | Default | What it does |
|---|---|---|---|
LOG_LEVEL |
fatal / error / warn / info / debug / trace / silent | info |
How much the API logs. |
Web app
Section titled “Web app”The web app (apps/web) needs no settings in production. NEXT_PUBLIC_API_URL names the API’s address when it is not api.<the web app's host> (or port 4000 on the same host); ALLOWED_DEV_ORIGINS lets next dev serve other hostnames. See apps/web/.env.example.
Connector host
Section titled “Connector host”| Setting | What it does |
|---|---|
CONNECTOR_HOST_SECRET |
The same value as the API’s CONNECTOR_HOST_SECRET; without it the connector host does not start. |
PORTAL_URL |
Where the API is, from the connector host (default http://127.0.0.1:4000). |
CONNECTOR_HOST_REACH_PRIVATE |
Development only: true lets connectors reach private addresses (a local MinIO or Graph stand-in). |
Helper programs
Section titled “Helper programs”Programs beside the API with settings of their own, outside the schema above.
Migrations
Section titled “Migrations”Run by the API at its start and by pnpm db:migrate, with the API’s settings. Source: apps/api/src/db/migrate.ts.
| Setting | What it does |
|---|---|
MIGRATIONS_DIR |
Where the SQL migrations are; by default migrations/ of the package, from the source or the bundle. |
Knowledge intake
Section titled “Knowledge intake”Part of the API: files waiting for the document reader (Docling). Source: apps/api/src/knowledge/intake.ts.
| Setting | What it does |
|---|---|
ACADEMY_INTAKE_DIR |
The folder for those files; by default academy-knowledge in the system’s temporary folder. |
Git gate
Section titled “Git gate”academy-git-gate.service (ADR 0265), run as root; it reads none of the API’s settings. Source: apps/api/src/git/gate-cli.ts.
| Setting | What it does |
|---|---|
GIT_GATE_SOCKET |
Its socket (default /run/academy-git/gate.sock). |
GIT_GATE_USER |
The API’s user: git runs as it in the container, and its group may connect (default academy-api). |
GIT_CONTAINER |
The container git runs in (default academy-git). |
GIT_DOCKER |
The docker command (default docker). |
Preview certificates
Section titled “Preview certificates”academy-preview-certs.service (ADR 0186), run as root with PREVIEW_CERTIFICATES=single; settings in /etc/academy/preview-certs.env, written by deploy/update.sh. Source: apps/api/src/labs/preview-certs-cli.ts.
| Setting | What it does |
|---|---|
PREVIEW_DOMAIN |
The previews’ domain, as for the API. |
PREVIEW_CERT_SOCKET |
Its socket (default /run/academy-preview/certs.sock). |
PREVIEW_CERT_GROUP |
The API’s group, which may connect (default academy-api). |
PREVIEW_CERT_WEEKLY |
Certificates it asks for in a week at most, 1 to 45 (default 20). |
PREVIEW_CERTBOT |
The certbot command (default certbot). |
PREVIEW_WEBROOT |
The folder for the HTTP challenge (default /var/lib/academy-preview/webroot). |
PREVIEW_TLS_DIR |
Where the certificates go (default /var/lib/academy-preview/tls). |
PREVIEW_CERT_HOOK |
The hook run after a new certificate (required). |
PREVIEW_CERT_STATE |
Its record of what it asked for (default /var/lib/academy-preview/state.json). |
ACADEMY_CERT_EMAIL |
The address for the certificate authority’s notices (optional). |