ngdpbase uses a two-file configuration model: a bootstrap .env in the project root that tells the server where data lives, and a full instance config (app-custom-config.json) inside the data directory that controls how the platform behaves.
.env FileLocation: project root (.env) — gitignored, never committed
Purpose: tells server.sh and PM2 where to find data before the app starts
Template: .env.example in the project root
FAST_STORAGE=/path/to/fast/data
SLOW_STORAGE=/path/to/slow/data
Without this file server.sh falls back to ./data for both paths and shows the install page.
| Variable | Default | Description |
|---|---|---|
FAST_STORAGE | ./data | Operational data directory — sessions, logs, users, search index, config. Use fast storage (SSD). |
SLOW_STORAGE | ./data | Bulk content directory — pages, attachments, backups. Can be a NAS or large drive. |
NODE_ENV | development | Runtime environment: development, production, test, staging |
PORT | 3000 | HTTP port the server listens on |
PM2_MAX_MEMORY | 4G | Maximum memory before PM2 restarts the process. Large instances (14K+ pages) spike to ~3 GB during search index rebuilds — keep at 4G or higher. |
HEADLESS_INSTALL | *(unset)* | Set to true for Docker/Kubernetes automated deployment — skips the setup wizard entirely |
INSTANCE_DATA_FOLDER | *(deprecated)* | Legacy alias for FAST_STORAGE — use FAST_STORAGE instead |
INSTANCE_CONFIG_FILE | app-custom-config.json | Name of the config file to load from ${FAST_STORAGE}/config/ |
ngdpbase splits data across two storage locations to allow operational data (frequent small reads/writes) to live on fast storage while bulk content lives on cheaper or larger storage.
| Tier | Variable | What lives here |
|---|---|---|
| **Fast** | FAST_STORAGE | Sessions, logs, users, search index, config, .install-complete, page-index.json |
| **Slow** | SLOW_STORAGE | Pages (content), attachments, backups |
For single-drive setups, set both to the same path — or leave the defaults (./data).
FAST_STORAGE=./data
SLOW_STORAGE=./data
FAST_STORAGE=/mnt/ssd/ngdpbase/data
SLOW_STORAGE=/mnt/hdd/ngdpbase/data
FAST_STORAGE=/mnt/ssd/ngdpbase/data
SLOW_STORAGE=/mnt/nas/ngdpbase
The full per-instance configuration lives at ${FAST_STORAGE}/config/app-custom-config.json.
config/app-default-config.jsonDuring headless installation, this file is seeded from config/app-custom-config.example.
server.sh Uses .envserver.sh sources .env before starting PM2, making FAST_STORAGE, SLOW_STORAGE, and other variables available to the Node.js process as environment variables. Configuration values in JSON config files can reference these as ${FAST_STORAGE} and ${SLOW_STORAGE}.
# server.sh sources .env, then starts PM2
./server.sh start # production
./server.sh start dev # development
./server.sh status # shows resolved env paths
./server.sh env # shows all environment and config values
See Server Management for full server.sh usage.
Set HEADLESS_INSTALL=true in .env (or as a container environment variable) to skip the setup wizard entirely. The server will:
config/*.example files to ${FAST_STORAGE}/config/ (if not already present)required-pages/ to the pages directory (if empty).install-complete markeradmin / admin123)The admin password should be changed immediately after first login.