You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/install-config/configure-https.md
+23-14Lines changed: 23 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,10 @@ title: Configure HTTPS Access to Harbor
3
3
weight: 30
4
4
---
5
5
6
+
**Important: Using Existing Third-Party Certificates**
7
+
8
+
If you already have a TLS certificate and key from a trusted authority (e.g., Let's Encrypt, DigiCert, GoDaddy), you can skip the self-signed certificate generation steps on this page. Simply place your certificate and key files on the Harbor host and provide their paths in the `harbor.yml` file, as described in ./configure-yml-file.md. This is the recommended approach for all production environments.
9
+
6
10
By default, Harbor does not ship with certificates. It is possible to deploy Harbor without security, so that you can connect to it over HTTP. However, using HTTP is acceptable only in air-gapped test or development environments that do not have a connection to the external internet. Using HTTP in environments that are not air-gapped exposes you to man-in-the-middle attacks. In production environments, always use HTTPS.
7
11
8
12
To configure HTTPS, you must create SSL certificates. You can use certificates that are signed by a trusted third-party CA, or you can use self-signed certificates. This section describes how to use [OpenSSL](https://www.openssl.org/) to create a CA, and how to use your CA to sign a server certificate and a client certificate. You can use other CA providers, for example [Let's Encrypt](https://letsencrypt.org/).
@@ -84,33 +88,38 @@ The certificate usually contains a `.crt` file and a `.key` file, for example, `
84
88
85
89
## Provide the Certificates to Harbor and Docker
86
90
87
-
After generating the `ca.crt`, `yourdomain.com.crt`, and `yourdomain.com.key` files, you must provide them to Harbor and to Docker, and reconfigure Harbor to use them.
91
+
After generating the `ca.crt`, `yourdomain.com.crt`, and `yourdomain.com.key` files for your self-signed certificate, you must provide them to Harbor and to the Docker daemon.
92
+
93
+
1. Create the Certificate Directory for Harbor.
94
+
95
+
The `/data/cert/` directory is the default location where Harbor looks for its certificates, but this directory does not exist by default. You must create it first.
88
96
89
-
1. Copy the server certificate and key into the certficates folder on your Harbor host.
97
+
```sh
98
+
sudo mkdir -p /data/cert/
99
+
100
+
1. Copy the Server Certificate and Key to the Harbor Directory
90
101
91
102
```sh
92
103
cp yourdomain.com.crt /data/cert/
93
-
cp yourdomain.com.key /data/cert/
104
+
sudo cp yourdomain.com.key /data/cert/
94
105
```
95
106
96
-
1. Convert `yourdomain.com.crt` to `yourdomain.com.cert`, for use by Docker.
107
+
1. Configure the Docker Daemon to Trust the Certificate
97
108
98
-
The Docker daemon interprets `.crt` files as CA certificates and `.cert` files as client certificates.
109
+
To allow the Docker client to push and pull images, the Docker daemon must also trust the certificate so ,convert your server certificate from .crt to .cert, as the Docker daemon requires this extension.
1. Copy the server certificate, key and CA files into the Docker certificates folder on the Harbor host. You must create the appropriate folders first.
114
+
Next, create a dedicated directory for your Harbor domain and copy all three certificate files into it.
If you mapped the default `nginx` port 443 to a different port, create the folder `/etc/docker/certs.d/yourdomain.com:port`, or `/etc/docker/certs.d/harbor_IP:port`.
113
-
114
123
1. Restart Docker Engine.
115
124
116
125
```sh
@@ -119,14 +128,14 @@ After generating the `ca.crt`, `yourdomain.com.crt`, and `yourdomain.com.key` fi
119
128
120
129
You might also need to trust the certificate at the OS level. See [Troubleshooting Harbor Installation](troubleshoot-installation.md#https) for more information.
121
130
122
-
The following example illustrates a configuration that uses custom certificates.
131
+
The following example illustrates the final directory structure for Docker, which uses your custom certificates.
123
132
124
133
```
125
134
/etc/docker/certs.d/
126
135
└── yourdomain.com:port
127
-
├── yourdomain.com.cert <-- Server certificate signed by CA
128
-
├── yourdomain.com.key <-- Server key signed by CA
129
-
└── ca.crt <-- Certificate authority that signed the registry certificate
Copy file name to clipboardExpand all lines: docs/install-config/download-installer.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,3 +73,9 @@ The installation processes are almost the same for the online and offline instal
73
73
74
74
- To secure the connections to Harbor, see [Configure HTTPS Access to Harbor](configure-https.md).
75
75
- To configure your Harbor installation, see [Configure the Harbor YML File](configure-yml-file.md).
76
+
77
+
### Notes on the Installer Directory
78
+
79
+
You can extract the Harbor installer in any location. The user running the installation script must have permissions to execute Docker commands (usually by being in the `docker` group).
80
+
81
+
This directory is used only for installation and configuration. It is not where Harbor's permanent data is stored. All Harbor services run inside Docker containers, and their data is stored in Docker volumes. You should keep this directory so you can manage your Harbor instance later (e.g., for upgrades or configuration changes).
Copy file name to clipboardExpand all lines: docs/working-with-projects/working-with-images/pulling-pushing-images.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,16 @@ Push the image:
62
62
```sh
63
63
docker push <harbor_address>/demo/ubuntu:14.04
64
64
```
65
+
**Understanding the Image Name Structure**
66
+
67
+
In Harbor, a fully qualified image name has three main parts: <project_name>/<repository_name>:<tag>. This is a critical concept for pushing images and configuring deployment tools.
68
+
69
+
Using the example <harbor_address>/demo/ubuntu:14.04:
70
+
demo: This is the Project you created in the Harbor UI.
71
+
ubuntu: This is the Repository name inside the demo project. A repository holds all the tags for a single image.
72
+
14.04: This is the Tag, which usually represents a specific version of the image.
73
+
74
+
When configuring deployment tools (like Kubernetes or Kamal), ensure your target image name is set to the format <project_name>/<repository_name>
0 commit comments