Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
Self-host Nexus Repository
updated Nov 2026deployed by usprices checked · Jul 2026Install verified on Ubuntu 26.04 · Nov 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →
Sonatype's artifact repository manager. Community Edition, the free build in the sonatype/nexus3 image, hosts and proxies Docker images alongside Maven, npm, PyPI, NuGet, Helm, Go and many other formats behind one web UI and one set of users and permissions. It is not open source: the image is covered by Sonatype's Community Edition terms, and use is capped at 40,000 components or 100,000 requests per day, after which new components are refused. The EPL-1.0 open codebase on GitHub is a smaller core without the Docker format. Runs on the JVM with an embedded H2 database by default.
Pick Nexus Repository when one server has to hold your Docker images and also your Maven, npm, PyPI, NuGet, Helm and other packages, with proxying of public registries and a single set of users and permissions. This is the free Community Edition in the `sonatype/nexus3` image, which includes the Docker format with hosted, proxy and group repositories. It is not open source: the docker-nexus3 README says its use is governed by Sonatype's Community Edition terms, while the EPL-1.0 code in the public repository is a smaller core with Maven, raw and APT formats. Our snippet is the docker-nexus3 Compose file with the image pinned to 3.98.1 (released 2026-11-05) and a named volume for `/nexus-data`; it prints the generated admin password once Nexus reports ready. Sonatype gives no single RAM minimum, so our 4096 MB floor is an estimate. In the catalog, Distribution and zot are registries for container images and other OCI artifacts, and Harbor adds projects, replication and scanning for container images; Nexus is the choice when images are only part of what you store.
What you need
Any VPS with at least 4096 MB of RAM
A domain you control — most self-hosted setups need HTTPS in front of them
About an afternoon — budget time for troubleshooting
Paid link — we earn a commission if you shop through it.
Install
Run these commands on your server:
# Nexus Repository Community Edition — artifact and registry manager — based on the docker-nexus3 Compose file, pinned to sonatype/nexus3 3.98.1 (released 2026-11-05)cat > docker-compose.yml <<'EOF'services: nexus: image: sonatype/nexus3:3.98.1 restart: unless-stopped ports: - "8081:8081" volumes: - nexus-data:/nexus-datavolumes: nexus-data:EOFdocker compose up -dtimeout 600 bash -c 'until curl -fsS -o /dev/null http://localhost:8081/service/rest/v1/status; do sleep 5; done'docker compose exec -T nexus cat /nexus-data/admin.password; echo# → http://SERVER_IP:8081 (sign in as admin with the one-time password printed above; Community Edition is free only under 40,000 components and 100,000 requests per day)
Sonatype's licence terms, Community Edition documentation and Docker README flag these before you rely on it:
non-negotiableCommunity Edition is capped at 40,000 total components or 100,000 requests per day. Above either limit users cannot add new components until usage drops back under both. The terms allow use for internal business purposes and prohibit disabling or tampering with the usage-reporting telemetry, so read them before adopting it for a company.
non-negotiableSonatype's system requirements say the embedded H2 database, which a new install uses by default and which our snippet keeps, supports up to 200,000 requests per day or 100,000 components and that container-based deployments are not supported with H2. They recommend an external PostgreSQL database; treat our snippet as a trial or small-team setup.
non-negotiableDocker repositories need extra network plumbing: the documentation describes port connectors, a subdomain connector and reverse proxy strategies for exposing a Docker registry. Our snippet publishes only the web interface on port 8081 and plain HTTP, so create a Docker repository and put TLS in front before pushing from other machines.
non-negotiableStart-up takes a few minutes (the README says 2-3 minutes) and the JVM wants real memory: Sonatype advises giving Nexus up to two-thirds of the machine's RAM, and its README shows -Xms2703m -Xmx2703m with the same direct-memory limit as an example. Stop it with docker stop --time=120 so the databases shut down cleanly.
non-negotiableThe first admin password is generated into /nexus-data/admin.password, and /nexus-data must be writable by UID 200, which the named volume satisfies. Back up the whole volume: it holds configuration, the database and the stored blobs.
Nexus Repository used 2269 MB of RAM at idle on GCP e2-standard-2 · Ubuntu 26.04 LTS · Docker 29.9.3 (first boot, measured Nov 2026). We list a minimum of 4096 MB.
Is the Nexus Repository install snippet verified?
The Nexus Repository install snippet is marked verified on Ubuntu 26.04 (Nov 2026).