Personal user folders ("My Files")
nextExplorer can expose a per-user home space alongside your shared volumes. In the UI this appears as a separate entry labeled “My Files”, and it uses the same Folder View, search, favorites, editor, and ONLYOFFICE integrations as your other folders.
This section explains how it works and how to enable it.
How personal folders work
- Each authenticated user gets a private directory under a common root (
USER_ROOT). - Logical paths for personal items always start with
personal/:- Example:
personal,personal/photos,personal/docs/report.docx.
- Example:
- The backend maps those logical paths to the filesystem:
- Volume paths:
Projects/file.txt→<VOLUME_ROOT>/Projects/file.txt. - Personal paths:
personal/docs/file.txt→<USER_ROOT>/<userFolder>/docs/file.txt.
- Volume paths:
- The
<userFolder>name is derived from the user’s identity (id / username / email) and sanitized so it is safe as a directory name.- You can control which identity fields are preferred with
USER_FOLDER_NAME_ORDER(see below).
- You can control which identity fields are preferred with
- Access control rules, favorites, search and previews work on the logical path:
- You can define access rules for
personal/...if you want to further restrict or hide parts of the personal tree.
- You can define access rules for
On the frontend:
- When the feature is enabled the sidebar and Home screen show a translated “My Files” entry (
drives.personalin i18n). - Clicking it navigates to
/browse/personal, which uses the existing Folder View UI and APIs. - The standard Share workflow also works from within My Files: when you share items under
personal/..., links resolve back to the owner’s personal folder while still respecting Access Control and share settings (read-only/read-write, password, expiration).
Enabling personal folders
Personal folders are controlled entirely via environment variables on the backend.
Required environment variables
In addition to your usual VOLUME_ROOT/CONFIG_DIR/CACHE_DIR settings, configure:
USER_DIR_ENABLED=true
USER_ROOT=/srv/users
USER_FOLDER_NAME_ORDER=id,username,email_localUSER_DIR_ENABLED:- Default:
false. - When
true, the backend exposes thepersonal/namespace and the frontend shows the “My Files” entry (via/api/features).
- Default:
USER_ROOT:- Default:
<VOLUME_ROOT>/_userswhen unset. - Root directory on disk where all per-user folders are stored.
- For each user, nextExplorer creates (or reuses) a subdirectory under this path when they first access their personal space.
- Default:
USER_FOLDER_NAME_ORDER:- Default:
id,username,email_local. - Controls how
<userFolder>is chosen for personal folders. Valid values:id,username,email,email_local,displayname. - Example (reuse existing Linux home directories): set
USER_ROOT=/homeandUSER_FOLDER_NAME_ORDER=username,id. - The order is a preference, not a formula. The first account to be given a name keeps it, and an account whose preferred name is already taken walks down the rest of the order to the next free one —
idis always last, and ids are unique, so it always ends somewhere. Nothing aboutusernameoremail_localis unique on its own (bob@a.comandbob@b.comboth yieldbob), and without this two accounts would share a folder and see each other's files.
- Default:
Note: the name an account is given is kept. Changing
USER_FOLDER_NAME_ORDERafterwards applies to accounts created from then on, and leaves the existing ones where they are — so the change cannot silently take a folder away from whoever is using it.To move existing accounts to a new order deliberately, move or rename their directories on disk, then clear the assignment so it is worked out again at their next sign-in:
sqlUPDATE users SET personal_folder_name = NULL;Where two accounts then prefer the same name, the first to sign in gets it. Assign the names yourself in the same statement if that matters.
Note: The personal folder UI will not appear unless
USER_DIR_ENABLED=true. The app also refuses to resolvepersonal/...when this flag is off.
Example: development compose
The included docker/docker-compose.development.yml shows a development-friendly setup:
services:
backend:
# …
volumes:
# Shared volumes
- /Users/you/projects:/mnt/Projects
- /Users/you/Downloads:/mnt/Downloads
# Config & cache
- /Users/you/Downloads/config:/config
- /Users/you/Downloads/cache:/cache
# Personal user folders on the host
- /Users/you/Downloads/user_vols:/srv/users
environment:
- VOLUME_ROOT=/mnt
- CONFIG_DIR=/config
- CACHE_DIR=/cache
# …
- USER_DIR_ENABLED=true
- USER_ROOT=/srv/usersWith this configuration:
- All shared volumes still live under
/mnt/*and show up under Volumes. - Each authenticated user gets a private home under
/srv/users/<userFolder>/….- The
userFoldername is derived from their id/username/email and is created automatically.
- The
- In the UI, users see a “My Files” entry that opens their own personal root (
personal).
Example: production compose
To enable personal folders in a production deploy (see the full example in Deployment):
services:
nextexplorer:
image: ghcr.io/cerede2000/explorer:latest
environment:
- NODE_ENV=production
- PUBLIC_URL=https://files.example.com
- SESSION_SECRET=please-change-me
- PUID=1000
- PGID=1000
# Personal folders
- USER_DIR_ENABLED=true
- USER_ROOT=/srv/nextexplorer/users
volumes:
- /srv/nextexplorer/config:/config
- /srv/nextexplorer/cache:/cache
- /srv/data/Projects:/mnt/Projects
- /srv/data/Media:/mnt/Media
# Personal home folders on the host
- /srv/nextexplorer/users:/srv/nextexplorer/usersPermissions and access control
- Personal folders are designed to be per-user homes.
- By default, access control rules (Settings → Access Control) apply to logical paths:
- You can create rules targeting
personalorpersonal/<subpath>if you want to further restrict access.
- You can create rules targeting
- Favorites and quick access:
- Users can favorite folders under both volumes and
personal/.... - Favorites store the logical path (e.g.
personal/docs), so they continue to work even if you adjust underlying mounts.
- Users can favorite folders under both volumes and
Behavior when disabled
If USER_DIR_ENABLED is false (or unset):
- The backend rejects
personal/...paths and does not create user folders. - The
/api/featuresendpoint reportspersonal.enabled=false, so:- The sidebar and Home view do not show the “My Files” entry.
- All existing volume behavior remains unchanged.
