Skip to content

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.

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.

SSH into your server and run:

Terminal window
sudo nexus-update

This 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.

In order:

  1. Fetches the latest tagged release from the GitHub Releases API
  2. Downloads the release tarball to /tmp
  3. Extracts it and rsyncs it over /opt/nexus, skipping .env, Caddyfile, docker-compose.yml, and docker-compose.prod.yml — your configuration, Caddyfile, and compose files are never overwritten
  4. Rebuilds and restarts the Docker containers with docker compose -f docker-compose.prod.yml up -d --build
  5. Copies /opt/nexus/Caddyfile to /etc/caddy/Caddyfile and reloads Caddy
  6. Cleans up the temporary tarball and extracted directory

Migrations run automatically when the container starts, before the application boot. This is handled by the container’s startup command:

Terminal window
bin/nexus eval 'Nexus.Release.migrate()' && bin/nexus start

You do not need to run migrations manually.

PreservedOverwritten
/opt/nexus/.envApplication code
/opt/nexus/CaddyfileStatic assets
/opt/nexus/docker-compose.yml
/opt/nexus/docker-compose.prod.yml
/opt/nexus-data (all database and upload data)

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.

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.