Skip to content
Live $100 credit at signup, up to $300 total Offer ends December 31, 2026 Get started →

Nexus

Sonatype Nexus Repository is an artifact and package repository manager for storing and proxying binaries such as Maven, npm, NuGet, Docker, and PyPI components. It gives your build pipelines a single, reliable source for dependencies and release artifacts. The web UI runs on port 8081.

ComponentVersion
Nexus Repository3.94.0
Ubuntu24.04 LTS

Set these optionally when you deploy from the marketplace. Leave a field blank to have a secure value generated.

VariableDescription
NEXUS_ADMIN_PASSWORDNexus admin password
ssh ubuntu@<your-vm-ip>

Nexus starts from its pre-installed Docker image and generates a unique initial admin password. Initialization can take several minutes. Track progress with:

sudo journalctl -u nexus-first-boot.service -f

Then verify the container:

cd /opt/nexus && docker compose ps

Open a browser and navigate to:

http://<your-vm-ip>:8081

Read the generated login details:

sudo cat /etc/nexus/credentials.txt
FieldValue
Usernameadmin
PasswordFrom /etc/nexus/credentials.txt

Complete the setup wizard, change the admin password, and choose your anonymous-access policy.

Nexus runs as a Docker Compose stack in /opt/nexus.

# Check status
cd /opt/nexus && docker compose ps
# Restart
cd /opt/nexus && docker compose restart
# View logs
cd /opt/nexus && docker compose logs -f
PathPurpose
/opt/nexus/docker-compose.ymlCompose stack
/var/lib/nexus/Persistent repository data
/var/lib/nexus/admin.passwordInitial password generated by Nexus
/etc/nexus/credentials.txtFirst-login details

Port 8081 is open on the VM’s network interface. UFW is enabled and allows Nexus (port 8081) and SSH (port 22).

To restrict the UI and repository API to a specific IP:

sudo ufw delete allow 8081/tcp
sudo ufw allow from <trusted-ip> to any port 8081

To access Nexus without leaving port 8081 open, use an SSH tunnel:

First close the public port on the VM, since it is open by default:

sudo ufw delete allow 8081/tcp
# Run this on your local machine
ssh -L 8081:localhost:8081 ubuntu@<your-vm-ip>
# Then open in a browser
http://localhost:8081

For production use, place Nexus behind a reverse proxy with a trusted TLS certificate and restrict direct access to administrator and CI/CD networks.

Last updated: