Upgrading
Nexus updates are released as tagged releases on GitHub. The upgrade process is a single command run on the server — the admin panel tells you when one is available.
Checking for updates
Section titled “Checking for updates”The admin panel checks for updates automatically. Go to Admin → Updates to see your current version, the latest available release, and the release notes. If a new version is available, the panel shows the exact command to run.
The check works by querying the GitHub Releases API from inside the running container. It is read-only — no changes are made during the check.
Applying an update
Section titled “Applying an update”SSH into your server and run:
sudo nexus-updateThis script was installed to /usr/local/bin/nexus-update by the original install script. It requires root because it writes to /opt/nexus, manages Docker containers, and reloads Caddy.
What nexus-update does
Section titled “What nexus-update does”In order:
- Fetches the latest tagged release from the GitHub Releases API
- Downloads the release tarball to
/tmp - Extracts it and rsyncs it over
/opt/nexus, skipping.env,Caddyfile,docker-compose.yml, anddocker-compose.prod.yml— your configuration, Caddyfile, and compose files are never overwritten - Rebuilds and restarts the Docker containers with
docker compose -f docker-compose.prod.yml up -d --build - Copies
/opt/nexus/Caddyfileto/etc/caddy/Caddyfileand reloads Caddy - Cleans up the temporary tarball and extracted directory
Database migrations
Section titled “Database migrations”Migrations run automatically when the container starts, before the application boot. This is handled by the container’s startup command:
bin/nexus eval 'Nexus.Release.migrate()' && bin/nexus startYou do not need to run migrations manually.
What is preserved
Section titled “What is preserved”| Preserved | Overwritten |
|---|---|
/opt/nexus/.env | Application code |
/opt/nexus/Caddyfile | Static assets |
/opt/nexus/docker-compose.yml | |
/opt/nexus/docker-compose.prod.yml | |
/opt/nexus-data (all database and upload data) |
Downtime during an upgrade
Section titled “Downtime during an upgrade”The forum is briefly unavailable during the container rebuild step. The rebuild compiles Elixir and builds assets from scratch, which typically takes a few minutes on a standard VPS. Once the new container starts, Nexus is available again immediately.
Preventing concurrent updates
Section titled “Preventing concurrent updates”nexus-update uses a lock file at /var/lock/nexus-update.lock to prevent two simultaneous invocations from racing. If you run it twice at the same time, the second invocation will exit immediately with an error.