Skip to content

Environment Reference

nextExplorer is configured almost entirely through environment variables. The backend (backend/src/config/env.js) centralizes the defaults you see here. Use this reference when you want to tune ports, paths, auth, integrations, or feature flags.

Server & networking

VariableDefaultDescription
PORT3000Port the Express API and frontend listen on inside the container.
PUBLIC_URLnoneExternal URL (no trailing slash). Drives cookie settings, CORS defaults, and derived callback URLs (OIDC/OnlyOffice).
TRUST_PROXYloopback,uniquelocal when PUBLIC_URL is setExpress trust proxy configuration. Accepts false, numbers, CIDRs, or lists.
CORS_ORIGIN, CORS_ORIGINS, ALLOWED_ORIGINSemptyComma-separated list of allowed CORS origins. Defaults to PUBLIC_URL origin when set.

Logging & debugging

VariableDefaultDescription
LOG_LEVELinfo (or debug when DEBUG=true)Application log level: trace, debug, info, warn, or error.
DEBUGfalseWhen true, forces LOG_LEVEL=debug and shows more verbose diagnostics (including more detailed error output in development).
ENABLE_HTTP_LOGGINGfalseWhen true, enables HTTP request logging in the backend (use with centralized log collection in production).

Paths & volumes

VariableDefaultDescription
VOLUME_ROOT/mntRoot directory that houses all mounted volumes.
CONFIG_DIR/configLocation for SQLite, app-config.json, extensions, and settings.
CACHE_DIR/cacheLocation for thumbnails, ripgrep indexes, and temporary data.
USER_ROOT<VOLUME_ROOT>/_users when unsetRoot directory for per-user personal folders. Each authenticated user gets their own subdirectory under this path.

Authentication

VariableDefaultDescription
AUTH_ENABLEDtrue (in prod)Toggles authentication; disabling makes all APIs public. Deprecated: use AUTH_MODE=disabled instead.
AUTH_MODEboth (or local if OIDC not configured)Controls which authentication methods are available: local (username/password only), oidc (SSO only), both (both methods), or disabled (skip login entirely, same as AUTH_ENABLED=false).
SESSION_SECRET, AUTH_SESSION_SECRETauto-generatedCryptographic secret used by Express to sign and encrypt session cookies and related tokens. In production, set this to a long, random, stable value (at least 32 characters) so sessions remain valid across restarts and multiple replicas; if left unset, a new random secret is generated on each start and all users will be logged out after every restart.
AUTH_MAX_FAILED5Failed login attempts before temporary lockout.
AUTH_LOCK_MINUTES15Lockout duration in minutes when max failures reached.
AUTH_ADMIN_EMAILnoneOptional first-run bootstrap for local auth: when set with AUTH_ADMIN_PASSWORD, the backend creates an admin user on startup (and the setup wizard is skipped).
AUTH_ADMIN_PASSWORDnonePassword used for AUTH_ADMIN_EMAIL bootstrap. If a user already exists with the same email, this value overrides/resets the local password on startup. (Minimum 6 chars; avoid leaving this set unless you want the password enforced on every restart.)

OIDC & SSO

VariableDefaultDescription
OIDC_ENABLEDfalseEnable Express OpenID Connect authentication flow.
OIDC_ISSUERnoneIdP issuer URL (discovery).
OIDC_AUTHORIZATION_URL, OIDC_TOKEN_URL, OIDC_USERINFO_URLnoneOptional overrides for discovery endpoints.
OIDC_CLIENT_ID, OIDC_CLIENT_SECRETnoneIdP credentials.
OIDC_CALLBACK_URL${PUBLIC_URL}/callback when PUBLIC_URL is setExplicit callback path; defaults to /callback under PUBLIC_URL.
OIDC_SCOPESopenid profile emailDefault scopes; add groups to propagate group claims.
OIDC_ADMIN_GROUPSnoneSpace/comma-separated names that grant admin rights when found in groups, roles, or entitlements.
OIDC_REQUIRE_EMAIL_VERIFIEDfalseWhen true, requires the IdP to verify the user's email before allowing user creation or auto-linking. Some providers like newer Authentik versions set email_verified to false by default.
OIDC_AUTO_CREATE_USERStrueWhen false, the user must already exist in the nextExplorer database (local or previously OIDC-linked), otherwise OIDC login is denied.

Feature toggles

VariableDefaultDescription
SEARCH_DEEPfalseEnables deep content search; ripgrep is used when SEARCH_RIPGREP is true.
SEARCH_RIPGREPtruePrefer ripgrep for fast searches; fallback search is used when unavailable.
SEARCH_MAX_FILESIZEunboundedSkip ripgrep for files larger than this (e.g., 5MB).
SHOW_VOLUME_USAGEfalseShow volume usage badges in the sidebar.
USER_DIR_ENABLEDfalseWhen true, enables a personal “My Files” space for each authenticated user under USER_ROOT. The frontend shows a “My Files” entry when this flag is on.
USER_VOLUMESfalseWhen true, non-admin users only see volumes assigned to them by an admin. See User volumes.
SKIP_HOMEfalseWhen true, visits to the home view (/browse/) automatically redirect into the first volume instead.

The sharing system (toolbar Share button, guest links such as /share/:token, and the Shared with me page) works out of the box with the feature flags above. Advanced share tuning knobs are documented under Sharing (advanced) below.

Editor

VariableDefaultDescription
EDITOR_EXTENSIONSemptyComma-separated list of additional file extensions to support in the inline text editor (e.g., toml,proto,graphql). These are added to the built-in defaults (txt, md, json, js, ts, py, etc.), not replacing them. Changes take effect immediately on container restart—no frontend rebuild required.

OnlyOffice & thumbnails

VariableDefaultDescription
ONLYOFFICE_URLnonePublic URL for Document Server (must reach your app's PUBLIC_URL).
ONLYOFFICE_SECRETnoneJWT secret shared with OnlyOffice Document Server for /api/onlyoffice calls.
ONLYOFFICE_LANGenLanguage code for the editor UI.
ONLYOFFICE_FORCE_SAVEfalseWhen true, OnlyOffice forces users to save via the editor UI.
ONLYOFFICE_FILE_EXTENSIONSdefault listExtra file extensions to surface to the Document Server.
FFMPEG_PATH, FFPROBE_PATHbundled binariesPoint to custom ffmpeg/ffprobe if the bundle doesn't suit your needs.

Container user mapping

VariableDescription
PUID, PGIDMap container processes to host user/group IDs so created files have consistent ownership. Defaults to 1000. The entrypoint adjusts ownership of /app, /config, and /cache accordingly.