Docker registry: Harbor or Nexus?

Mahdi Mallaki
4 min readMay 14


Photo by Timelab on Unsplash


In this article, I intend to share my experience of migrating from Nexus docker registry to Harbor and the steps involved. Additionally, I will compare some of the most useful features of Harbor to those of Nexus and provide reasons why you should consider using it.

There are some cloud options like ECR (Elastic container registry from Amazon) and ACR (Azure container registry) but if you’re in an air-gapped environment, you need to have your own Docker registry.

Harbor V.S. Nexus

If you require a professional Docker registry, you need a tool that offers a wide range of features for managing Docker images. Here, I have made a comparison between some features that are available in Harbor but not in Nexus:

  • Generality: Nexus is a universal repository manager that can handle different types of technologies, such as Maven, NPM, Ruby Gems, Python Eggs, etc. Harbor is a pure Docker registry that only manages Docker images.
  • Image scanning: harbor has some features that Nexus does not have, such as image vulnerability scanning, image replication, image signing, and project quotas
  • Replication: You can pull or push Docker images from/to a Docker registry based on rules. It can be useful in cases where you want to have multiple Docker registries in different zones and keep them synchronized with each other. It’s also useful for migrating from an old Docker registry to a new one.
  • Garbage Collection: in Harbor You can define a rule to automatically garbage collect the orphaned Docker image layers that are not used by any Docker tag.
  • Project quota: in Harbor You can define a quota on any project to be able to manage your disk usage.

What are the steps to migrate from Nexus (or other docker registries) to Harbor?

To begin with, you need to install both Nexus and Harbor. While it might be a bit challenging to install both on one server due to disk space constraints, you can install them on separate servers and transfer Docker images between them. The good news is that you don’t have to write any scripts to transfer images from Nexus to Harbor. Harbor comes with a built-in functionality called “replication” that allows you to copy images between Docker registries and Harbor. Here’s how it works:

Start by creating a registry endpoint in your Harbor admin panel. Go to Registriesand select New Registry Endpointas illustrated in the image below:

Then, you need to click on the Administratortab and navigate to the Replicationspage. From there, click on New Replication Rule:

After creating the replication rule, you can initiate the replication process by clicking on the REPLICATE button. You can monitor the execution log and view the details of the process by clicking on the replication, as demonstrated below:

Wrapping up

In this article, I share my experience of migrating from Nexus Docker registry to Harbor, as well as the steps involved in the process. Additionally, I compare some of the features available in Harbor with those in Nexus, such as Replication, Auto GC, and Project Quota.

To migrate from Nexus to Harbor, one must install both tools at the same time. Although it may be difficult to install them on the same server due to disk space constraints, it’s possible to install them on separate servers and transfer Docker images between them. Users can use Harbor’s built-in functionality called “replication” to transfer images between Docker registries and Harbor.

The article includes a step-by-step guide on creating a registry endpoint and replication rule, as well as starting the replication process. Finally, the execution log is also explained to help users understand the details of the process.


If you have any feedback or suggestions for improving my code, please leave a comment on this posts. I would greatly appreciate your contributions to help make my code even better.

If you enjoyed this post, be sure to follow me to stay updated on my latest articles.