outline

environment and configuration, read statically · 2026-12-04 11:28 · 2569 source files, 165 variables read, 121 declared
Nothing here stops it starting.

6 things would fail quietly instead.

What it needs before it starts

Set these and the program has what it asks for. Anything not listed has a default in the code.
variablewhydeclared forfirst read at
UTILS_SECRETthe read raises when unsetci, example, prod, testserver/env.ts:80
76 more are read with no fallback — empty if you do not set them
These do not stop anything. The read evaluates to nothing and whatever depends on it is inactive, which is why this class of problem survives into production.
variabledeclared forread at
ALLOWED_PRIVATE_IP_ADDRESSES— — nowhereserver/env.ts:896
AWS_S3_UPLOAD_BUCKET_NAMEexample, prodserver/env.ts:717
AWS_S3_UPLOAD_MAX_SIZE— — nowhereserver/env.ts:640
AWS_S3_UPLOAD_METHODexampleserver/env.ts:743
DATABASE_CONNECTION_POOL_MAXexampleserver/env.ts:177
DATABASE_CONNECTION_POOL_MINexampleserver/env.ts:166
DATABASE_CONNECTION_POOL_URL— — nowhereserver/env.ts:157
DATABASE_HOST— — nowhereserver/config/database.js:4
DATABASE_NAME— — nowhereserver/config/database.js:8
DATABASE_SCHEMA— — nowhereserver/env.ts:149
DATABASE_URL_READ_ONLY— — nowhereserver/env.ts:104
DATABASE_USER— — nowhereserver/config/database.js:6
DISCORD_CLIENT_IDexampleplugins/discord/server/env.ts:13
DISCORD_CLIENT_SECRETexampleplugins/discord/server/env.ts:19
DISCORD_SERVER_IDexampleplugins/discord/server/env.ts:25
DISCORD_SERVER_ROLESexampleplugins/discord/server/env.ts:31
DROPBOX_APP_KEYexampleserver/env.ts:508
FIGMA_CLIENT_IDexample, testplugins/figma/server/env.ts:13
FIGMA_CLIENT_SECRETexample, testplugins/figma/server/env.ts:21
FILE_STORAGEexample, testserver/env.ts:749
FILE_STORAGE_IMPORT_MAX_SIZEexampleserver/env.ts:773
FILE_STORAGE_IMPORT_TIMEOUT— — nowhereserver/env.ts:783
FILE_STORAGE_LOCAL_ROOT_DIRbuild, example, testserver/env.ts:755
FILE_STORAGE_UPLOAD_MAX_SIZEexample, prodserver/env.ts:763
FILE_STORAGE_WORKSPACE_IMPORT_MAX_SIZEexampleserver/env.ts:790
GOOGLE_ANALYTICS_IDprodserver/env.ts:537
GOOGLE_CLIENT_IDexample, prod, testplugins/google/server/env.ts:12
GOOGLE_CLIENT_SECRETexample, prod, testplugins/google/server/env.ts:17
IFRAMELY_API_KEYexample, testplugins/iframely/server/env.ts:24
LINEAR_CLIENT_IDexample, testplugins/linear/server/env.ts:13
LINEAR_CLIENT_SECRETexample, testplugins/linear/server/env.ts:21
MAXIMUM_EXPORT_SIZE— — nowhereserver/env.ts:815
MAXIMUM_IMPORT_SIZE— — nowhereserver/env.ts:774
NOTION_CLIENT_IDexample, testplugins/notion/server/env.ts:10
NOTION_CLIENT_SECRETexample, testplugins/notion/server/env.ts:15
OAUTH_PROVIDER_ACCESS_TOKEN_LIFETIME— — nowhereserver/env.ts:822
OAUTH_PROVIDER_AUTHORIZATION_CODE_LIFETIME— — nowhereserver/env.ts:839
OAUTH_PROVIDER_REFRESH_TOKEN_LIFETIME— — nowhereserver/env.ts:830
OIDC_AUTH_URIexample, prod, testplugins/oidc/server/env.ts:50
OIDC_CLIENT_IDexample, prod, testplugins/oidc/server/env.ts:14
OIDC_CLIENT_SECRETexample, prod, testplugins/oidc/server/env.ts:19
OIDC_DISABLE_REDIRECTprodplugins/oidc/server/env.ts:95
OIDC_ISSUER_URL— — nowhereplugins/oidc/server/env.ts:32
OIDC_LOGOUT_URIexample, prod, testplugins/oidc/server/env.ts:107
OIDC_TOKEN_URIexample, prod, testplugins/oidc/server/env.ts:60
OIDC_USERINFO_URIexample, prod, testplugins/oidc/server/env.ts:71
POPULARITY_ACTIVITY_THRESHOLD_WEEKS— — nowhereserver/env.ts:929
POPULARITY_GRAVITY— — nowhereserver/env.ts:920
POPULARITY_UPDATE_INTERVAL_HOURS— — nowhereserver/env.ts:938
PROXY_IP_HEADER— — nowhereserver/env.ts:398
RATE_LIMITER_COLLABORATION_REQUESTS— — nowhereserver/env.ts:605
RATE_LIMITER_DURATION_WINDOWexampleserver/env.ts:616
RATE_LIMITER_MULTIPLIERexampleserver/env.ts:630
RATE_LIMITER_REQUESTSexampleserver/env.ts:596
REDIS_COLLABORATION_URLexampleserver/env.ts:202
RELEASE— — nowhereserver/env.ts:529
REQUEST_TIMEOUT— — nowhereserver/env.ts:343
SEARCH_PROVIDER— — nowhereserver/env.ts:905
SLACK_APP_IDexample, prodplugins/slack/server/env.ts:24
SLACK_KEY— — nowhereplugins/slack/server/env.ts:15
SLACK_SECRET— — nowhereplugins/slack/server/env.ts:28
SLACK_VERIFICATION_TOKENci, example, prod, testplugins/slack/server/env.ts:45
SMTP_FROM_EMAILexample, local, prod, testserver/env.ts:468
SMTP_HOSTprod, testserver/env.ts:425
SMTP_NAME— — nowhereserver/env.ts:443
SMTP_PASSWORDexample, prodserver/env.ts:461
SMTP_PORTprodserver/env.ts:451
SMTP_REPLY_EMAILprod, testserver/env.ts:476
SMTP_SERVICEexample, prodserver/env.ts:433
SMTP_TLS_CIPHERSprodserver/env.ts:481
SMTP_USERNAMEci, example, prod, testserver/env.ts:456
SOURCE_VERSION— — nowhereserver/env.ts:558
WEBHOOK_FAILURE_RATE_THRESHOLD— — nowhereserver/env.ts:885
WEBHOOK_FAILURE_TIME_WINDOW— — nowhereserver/env.ts:876
WORKER_CONCURRENCY_EVENTS— — nowhereserver/env.ts:568
WORKER_CONCURRENCY_TASKS— — nowhereserver/env.ts:577

Missing from the example file risk

Read with no fallback, and absent from the file that tells a new developer what to set.

GOOGLE_ANALYTICS_ID is read with no fallback, and .env.sample does not mention it

It is declared for prod and nowhere else, so the documented setup path is incomplete: someone configuring this from the example file never learns the variable exists, and whatever it controls is quietly inactive for them.

fix
Add GOOGLE_ANALYTICS_ID to .env.sample, with a comment saying what it is for.
server/env.ts:537

OIDC_DISABLE_REDIRECT is read with no fallback, and .env.sample does not mention it

It is declared for prod and nowhere else, so the documented setup path is incomplete: someone configuring this from the example file never learns the variable exists, and whatever it controls is quietly inactive for them.

fix
Add OIDC_DISABLE_REDIRECT to .env.sample, with a comment saying what it is for.
plugins/oidc/server/env.ts:95

SMTP_HOST is read with no fallback, and .env.sample does not mention it

It is declared for prod, test and nowhere else, so the documented setup path is incomplete: someone configuring this from the example file never learns the variable exists, and whatever it controls is quietly inactive for them.

fix
Add SMTP_HOST to .env.sample, with a comment saying what it is for.
server/env.ts:425

SMTP_PORT is read with no fallback, and .env.sample does not mention it

It is declared for prod and nowhere else, so the documented setup path is incomplete: someone configuring this from the example file never learns the variable exists, and whatever it controls is quietly inactive for them.

fix
Add SMTP_PORT to .env.sample, with a comment saying what it is for.
server/env.ts:451

SMTP_REPLY_EMAIL is read with no fallback, and .env.sample does not mention it

It is declared for prod, test and nowhere else, so the documented setup path is incomplete: someone configuring this from the example file never learns the variable exists, and whatever it controls is quietly inactive for them.

fix
Add SMTP_REPLY_EMAIL to .env.sample, with a comment saying what it is for.
server/env.ts:476

SMTP_TLS_CIPHERS is read with no fallback, and .env.sample does not mention it

It is declared for prod and nowhere else, so the documented setup path is incomplete: someone configuring this from the example file never learns the variable exists, and whatever it controls is quietly inactive for them.

fix
Add SMTP_TLS_CIPHERS to .env.sample, with a comment saying what it is for.
server/env.ts:481

Where each required variable is declared

One column per place this repository configures itself. A gap in a column is a way of running it that is missing a value.
variableexamplelocaltestciprodbuild
UTILS_SECRETyesnoyesyesyesno
ALLOWED_PRIVATE_IP_ADDRESSESnononononono
AWS_S3_UPLOAD_BUCKET_NAMEyesnononoyesno
AWS_S3_UPLOAD_MAX_SIZEnononononono
AWS_S3_UPLOAD_METHODyesnonononono
DATABASE_CONNECTION_POOL_MAXyesnonononono
DATABASE_CONNECTION_POOL_MINyesnonononono
DATABASE_CONNECTION_POOL_URLnononononono
DATABASE_HOSTnononononono
DATABASE_NAMEnononononono
DATABASE_SCHEMAnononononono
DATABASE_URL_READ_ONLYnononononono
DATABASE_USERnononononono
DISCORD_CLIENT_IDyesnonononono
DISCORD_CLIENT_SECRETyesnonononono
DISCORD_SERVER_IDyesnonononono
DISCORD_SERVER_ROLESyesnonononono
DROPBOX_APP_KEYyesnonononono
FIGMA_CLIENT_IDyesnoyesnonono
FIGMA_CLIENT_SECRETyesnoyesnonono
FILE_STORAGEyesnoyesnonono
FILE_STORAGE_IMPORT_MAX_SIZEyesnonononono
FILE_STORAGE_IMPORT_TIMEOUTnononononono
FILE_STORAGE_LOCAL_ROOT_DIRyesnoyesnonoyes
FILE_STORAGE_UPLOAD_MAX_SIZEyesnononoyesno
FILE_STORAGE_WORKSPACE_IMPORT_MAX_SIZEyesnonononono
GOOGLE_ANALYTICS_IDnonononoyesno
GOOGLE_CLIENT_IDyesnoyesnoyesno
GOOGLE_CLIENT_SECRETyesnoyesnoyesno
IFRAMELY_API_KEYyesnoyesnonono
LINEAR_CLIENT_IDyesnoyesnonono
LINEAR_CLIENT_SECRETyesnoyesnonono
MAXIMUM_EXPORT_SIZEnononononono
MAXIMUM_IMPORT_SIZEnononononono
NOTION_CLIENT_IDyesnoyesnonono
NOTION_CLIENT_SECRETyesnoyesnonono
OAUTH_PROVIDER_ACCESS_TOKEN_LIFETIMEnononononono
OAUTH_PROVIDER_AUTHORIZATION_CODE_LIFETIMEnononononono
OAUTH_PROVIDER_REFRESH_TOKEN_LIFETIMEnononononono
OIDC_AUTH_URIyesnoyesnoyesno
OIDC_CLIENT_IDyesnoyesnoyesno
OIDC_CLIENT_SECRETyesnoyesnoyesno
OIDC_DISABLE_REDIRECTnonononoyesno
OIDC_ISSUER_URLnononononono
OIDC_LOGOUT_URIyesnoyesnoyesno
OIDC_TOKEN_URIyesnoyesnoyesno
OIDC_USERINFO_URIyesnoyesnoyesno
POPULARITY_ACTIVITY_THRESHOLD_WEEKSnononononono
POPULARITY_GRAVITYnononononono
POPULARITY_UPDATE_INTERVAL_HOURSnononononono
PROXY_IP_HEADERnononononono
RATE_LIMITER_COLLABORATION_REQUESTSnononononono
RATE_LIMITER_DURATION_WINDOWyesnonononono
RATE_LIMITER_MULTIPLIERyesnonononono
RATE_LIMITER_REQUESTSyesnonononono
REDIS_COLLABORATION_URLyesnonononono
RELEASEnononononono
REQUEST_TIMEOUTnononononono
SEARCH_PROVIDERnononononono
SLACK_APP_IDyesnononoyesno
SLACK_KEYnononononono
SLACK_SECRETnononononono
SLACK_VERIFICATION_TOKENyesnoyesyesyesno
SMTP_FROM_EMAILyesyesyesnoyesno
SMTP_HOSTnonoyesnoyesno
SMTP_NAMEnononononono
SMTP_PASSWORDyesnononoyesno
SMTP_PORTnonononoyesno
SMTP_REPLY_EMAILnonoyesnoyesno
SMTP_SERVICEyesnononoyesno
SMTP_TLS_CIPHERSnonononoyesno
SMTP_USERNAMEyesnoyesyesyesno
SOURCE_VERSIONnononononono
WEBHOOK_FAILURE_RATE_THRESHOLDnononononono
WEBHOOK_FAILURE_TIME_WINDOWnononononono
WORKER_CONCURRENCY_EVENTSnononononono
WORKER_CONCURRENCY_TASKSnononononono
37 optional settings, with the default the code falls back to
variabledefaultdeclared forread at
AWS_S3_ACCELERATE_URL—exampleserver/env.ts:671
AWS_S3_ACLprivateexample, prodserver/env.ts:733
AWS_S3_FORCE_PATH_STYLEtrueexample, prodserver/env.ts:726
AWS_S3_UPLOAD_BUCKET_URL—example, prodserver/env.ts:710
CDN_URL—build, exampleserver/env.ts:281
COLLABORATION_MAX_CLIENTS_PER_DOCUMENT100—server/env.ts:306
COLLABORATION_URL—example, testserver/env.ts:295
DATABASE_PASSWORD——server/config/database.js:7
DATABASE_PORT——server/config/database.js:5
DATABASE_READ_ONLY_URL——server/env.ts:104
DEFAULT_LANGUAGEen_USexample, prodserver/env.ts:365
DEVELOPMENT_UNSAFE_INLINE_CSPfalselocalserver/env.ts:866
ENABLE_UPDATES—example, prodserver/env.ts:416
FORCE_HTTPStrueexampleserver/env.ts:390
IFRAMELY_URLhttps://iframe.lyexampleplugins/iframely/server/env.ts:17
INSTANCE_ID——server/logging/Metrics.ts:23
OAUTH_DISABLE_CIMDfalse—server/env.ts:858
OAUTH_DISABLE_DCRfalse—server/env.ts:848
OIDC_DISPLAY_NAMEOpenID Connectexample, prodplugins/oidc/server/env.ts:40
OIDC_SCOPESopenid profile emailexample, prodplugins/oidc/server/env.ts:85
OIDC_USERNAME_CLAIMpreferred_usernameexample, prodplugins/oidc/server/env.ts:79
PROXY_HEADERS_TRUSTEDtrue—server/env.ts:407
RATE_LIMITER_ENABLEDtrueexample, testserver/env.ts:585
REDIS_EPHEMERAL_COMMAND_TIMEOUT500—server/env.ts:245
REDIS_HEALTHCHECK_INTERVAL30000—server/env.ts:211
REDIS_HEALTHCHECK_TIMEOUT5000—server/env.ts:222
REDIS_UNAVAILABLE_TIMEOUT300000—server/env.ts:233
SECRET_KEY—ci, example, prod, testserver/env.ts:73
SERVICEScollaboration,websockets,worker,web—server/env.ts:377
SLACK_CLIENT_ID—example, prod, testplugins/slack/server/env.ts:15
SLACK_CLIENT_SECRET—example, prod, testplugins/slack/server/env.ts:37
SLACK_MESSAGE_ACTIONSfalseexampleplugins/slack/server/env.ts:55
SMTP_DISABLE_STARTTLSfalseprodserver/env.ts:500
SMTP_SECUREtrueprodserver/env.ts:490
SOURCE_COMMIT——server/env.ts:558
TELEMETRYtrue—server/env.ts:416
URL—ci, example, local, prod, testserver/env.ts:261

What this report could not see

Stated plainly, because a configuration report that hides its blind spots is worse than none.
1 read use a name the tool cannot seeThe variable is looked up through a value computed at runtime, so its name is not in the source. Those variables cannot appear in any list here, and the declared-but-unread list below may name one of them. Nothing else in the report is affected.

More measured notes on coding agents: alexenabled.github.io