Reading the repo
Reading the repo
Saved setup from 6 h ago
Will it work on my device?
CONTRIBUTING.mdThanks for helping improve nextExplorer! This guide keeps contributions smooth, minimal, and maintainable.
docs/.frontend/ – Vue 3 + Vite app (Pinia, TailwindCSS, Vitest, ESLint).backend/ – Express API (Node 18+, Pino logging, OIDC via express-openid-connect).docs/ – VitePress docs (site content and guides).Dockerfile – Multi-stage build packaging the full app.Option A — single-port dev via Compose (recommended):
docker compose -f docker/docker-compose.development.yml up --build
http://localhost:3000.3001 inside the Compose network; Vite proxies API calls.Option B — run services locally in two terminals:
# Terminal 1: backend
npm install
PORT=3001 CONFIG_DIR=$PWD/.config CACHE_DIR=$PWD/.cache
npm run dev -w backend
# Terminal 2: frontend
VITE_BACKEND_ORIGIN=http://localhost:3001 npm run dev -w frontend
Environment tips:
PUBLIC_URL when running behind a reverse proxy; OIDC defaults derive from it.OIDC_ISSUER, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, optional OIDC_SCOPES/OIDC_ADMIN_GROUPS.ONLYOFFICE_URL, ONLYOFFICE_SECRET, ONLYOFFICE_LANG.cd backend && npm test
cd frontend && npm run test:unit
cd frontend && npm run lint
docker build -t nextexplorer:dev .
cd frontend && npm run build && npm run preview
docs/ and user-facing README.md when behavior or settings change.Checklist:
backend/frontend)frontend)feat/*, fix/*, or docs/*.TRUST_PROXY settings; rely on PUBLIC_URL-derived defaults or explicitly set safe values.backend/config/index.js, backend/config/trustProxy.js.backend/utils/logger.js (Pino).backend/routes/auth.js, backend/middleware/authMiddleware.js.frontend/src/stores/*, frontend/src/api/index.js.Thanks again for contributing!
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
Needs Git: xcode-select --install
git clone https://github.com/nxzai/NextExplorer.git cd NextExplorer
Node.js >=24 <25
# needs nvm: brew install nvm (or https://github.com/nvm-sh/nvm) nvm install --lts
npm ci
npm run dev
npm test
services:
nextexplorer:
image: nxzai/explorer:latest
container_name: nextexplorer
restart: unless-stopped
ports:
- '3000:3000'
volumes:
- ./config:/config
- ./cache:/cache
# Each /mnt/<Label> mount becomes a top-level volume in the UI
- /path/to/your/files:/mnt/Files
environment:
- NODE_ENV=production
- PUBLIC_URL=http://localhost:3000
<details>
<summary> Full docker-compose with all configurations</summary>
services:
nextexplorer:
image: nxzai/explorer:latest
container_name: nextexplorer
restart: unless-stopped
ports:
- '3000:3000'
volumes:
- ./config:/config # contains config files, db, settings etc.
- ./cache:/cache # contains thumbnail cache and other files which are generated automatically
# Each /mnt/<Label> mount becomes a top-level volume in the UI
- /path/to/your/files:/mnt/Files
environment:
# Required basics
NODE_ENV: production # Set to `production` for the Docker image defaults.
PORT: '3000' # Port the Express API + frontend listen on *inside* the container.
PUBLIC_URL: 'http://localhost:3000' # External URL (no trailing slash); drives cookies, CORS defaults, and derived callback URLs. Accessing the app via a different URL may cause CORS/cookie/OIDC issues.
# Reverse proxy / networking (optional)
# INTERNAL_URL: "http://192.168.1.250:3017" # Extra origin(s) the app may also be reached from (e.g. a LAN IP for fast local uploads), comma-separated. Treated as valid (no public-URL mismatch warning) and accepted by CORS; PUBLIC_URL stays the canonical URL for share links / OIDC.
# TRUST_PROXY: "loopback,uniquelocal" # Express trust proxy config; set when running behind a reverse proxy (often auto-derived when `PUBLIC_URL` is set).
# CORS_ORIGINS: "" # Comma-separated allowed origins; aliases: `CORS_ORIGIN`, `ALLOWED_ORIGINS` (defaults to `PUBLIC_URL` origin when set).
# Logging & debugging (optional)
# LOG_LEVEL: "info" # `trace|debug|info|warn|error` (defaults to `debug` when `DEBUG=true`).
# DEBUG: "false" # When `true`, forces `LOG_LEVEL=debug` and enables more verbose diagnostics.
# ENABLE_HTTP_LOGGING: "false" # When `true`, logs HTTP requests (recommended with centralized logs in production).
# Paths & volumes (optional)
# VOLUME_ROOT: "/mnt" # Root directory that houses all mounted volumes. App will display all directores inside this directory as volumes.
# CONFIG_DIR: "/config" # Location for SQLite, `app-config.json`, extensions, and settings.
# CACHE_DIR: "/cache" # Location for thumbnails, ripgrep indexes, and temporary data.
# USER_ROOT: "/mnt/_users" # Root directory for per-user personal folders (defaults to `<VOLUME_ROOT>/_users` when unset). Make sure you persist this path if you use USER_DIR_ENABLED.
# Authentication (optional)
# AUTH_MODE: "both" # `local|oidc|both|disabled` what authentication methods you want to enable.
# AUTH_ENABLED: "true" # Deprecated: use `AUTH_MODE=disabled` to skip login.
# SESSION_SECRET: "please-change-me" # Session cookie secret (alias: `AUTH_SESSION_SECRET`); set a long, random, stable value (>= 32 chars) to keep sessions valid across restarts/replicas.
# AUTH_MAX_FAILED: "5" # Failed login attempts before temporary lockout.
# AUTH_LOCK_MINUTES: "15" # Lockout duration (minutes) when max failures reached.
# AUTH_ADMIN_EMAIL: "" # First-run bootstrap (local auth): when set with `AUTH_ADMIN_PASSWORD`, creates an admin user on startup and skips setup.
# AUTH_ADMIN_PASSWORD: "" # Password for `AUTH_ADMIN_EMAIL` bootstrap; overrides/resets password on startup if the user already exists.
# OIDC & SSO (optional)
# OIDC_ENABLED: "false" # Enable Express OpenID Connect auth flow.
# OIDC_ISSUER: "https://auth.example.com/application/o/next/" # IdP issuer URL (discovery).
# OIDC_AUTHORIZATION_URL: "" # Optional discovery override.
# OIDC_TOKEN_URL: "" # Optional discovery override.
# OIDC_USERINFO_URL: "" # Optional discovery override.
# OIDC_CLIENT_ID: "nextexplorer" # IdP client ID.
# OIDC_CLIENT_SECRET: "" # IdP client secret.
# OIDC_CALLBACK_URL: "http://localhost:3000/callback" # Explicit callback URL (defaults to `${PUBLIC_URL}/callback` when `PUBLIC_URL` is set).
# OIDC_SCOPES: "openid profile email" # Add `groups` to propagate group claims.
# OIDC_ADMIN_GROUPS: "" # Space/comma-separated group names that grant admin rights (matched in `groups`, `roles`, or `entitlements`).
# OIDC_REQUIRE_EMAIL_VERIFIED: "false" # When `true`, requires IdP to verify user email before allowing user creation/auto-linking.
# OIDC_AUTO_CREATE_USERS: "true" # When `false`, denies OIDC login unless the user already exists in the DB.
# Feature toggles (optional)
# SEARCH_DEEP: "false" # Enab
…
No reports for macOS yet.
Claude reads the 9 key files and writes a step-by-step guide for macOS. Once written, it's saved for everyone.