Skip to content

Data directories

Nexus separates application code from persistent data. All data that must survive container rebuilds and updates lives outside the Docker container, on the host filesystem.


/opt/nexus/ Application code and configuration
├── .env Secrets and configuration (mode 600)
├── Caddyfile Canonical Caddyfile (edit this, not /etc/caddy/Caddyfile)
├── docker-compose.prod.yml Docker Compose configuration
└── ... Application source files
/opt/nexus-data/ Persistent data (never touched by nexus-update)
├── postgres/ PostgreSQL data volume
└── uploads/ User-uploaded files
├── posts/ Images attached to posts
├── avatars/ User profile pictures
├── covers/ User profile cover images
├── logos/ Site logo, favicon, OG image
├── webp/ WebP-converted versions
│ ├── posts/
│ ├── avatars/
│ ├── covers/
│ └── logos/
└── extensions/
└── <slug>/ Files for each installed extension
/opt/nexus-backups/ Backup archives (created by nexus-backup)
├── db_TIMESTAMP.sql.gz
└── uploads_TIMESTAMP.tar.gz

Application code, configuration, and management scripts. This directory is updated on every nexus-update run, except for files explicitly preserved:

FilePreserved by nexus-update
.env✓ Always preserved
docker-compose.yml✓ Always preserved
docker-compose.prod.yml✓ Always preserved
Caddyfile✓ Always preserved
Everything else✗ Overwritten

Contains all secrets generated at install time. Mode 600 — readable only by root. Fields:

VariablePurpose
PHX_HOSTThe forum’s domain name
SECRET_KEY_BASEPhoenix session encryption key
JWT_SECRETJWT token signing secret
SESSION_SIGNING_SALTSession cookie signing salt
DB_PASSWORDPostgreSQL password

Back this file up and store it securely. Loss of SECRET_KEY_BASE or JWT_SECRET invalidates all active sessions.


Persistent data that survives container rebuilds and nexus-update. The Docker Compose file bind-mounts this directory into the container:

  • postgres/ → PostgreSQL stores its data files here. The database container reads and writes this directory directly.
  • uploads/ → User-uploaded files. Mounted into the application container at /app/uploads.

This directory is never modified by nexus-update. It is your source of truth for all user-generated content.


Created by nexus-backup. Contains database dumps and upload archives. Not created until the first backup is run. See Backups for details.


The two directories that grow over time are:

  • /opt/nexus-data/postgres/ — grows with forum activity (posts, users, indexes)
  • /opt/nexus-data/uploads/ — grows with user uploads

Monitor available disk space with:

Terminal window
df -h /opt/nexus-data
du -sh /opt/nexus-data/uploads /opt/nexus-data/postgres

The upload directory stores both original files and WebP-converted versions, so each uploaded image occupies roughly double the space of the original.