{"id":5559,"date":"2023-06-09T16:19:06","date_gmt":"2023-06-09T16:19:06","guid":{"rendered":"https:\/\/www.webhi.com\/how-to\/?p=5559"},"modified":"2023-12-07T16:08:39","modified_gmt":"2023-12-07T16:08:39","slug":"install-private-docker-registry-on-ubuntu-debian","status":"publish","type":"post","link":"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/","title":{"rendered":"How to setup a Private Docker Registry on Ubuntu \/ Debian"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/docker_reg_en-1.jpg\" alt=\"Set Up a Private Docker Registry on Ubuntu 22.04 \/ debian\" class=\"wp-image-5709\" srcset=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/docker_reg_en-1.jpg 1200w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/docker_reg_en-1-300x169.jpg 300w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/docker_reg_en-1-1024x576.jpg 1024w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/docker_reg_en-1-768x432.jpg 768w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/docker_reg_en-1-150x84.jpg 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"introduction\">Introduction<\/h2>\n\n\n\n<p><strong>Docker Registry<\/strong> is a powerful tool that helps manage the storage and distribution of Docker container images. While Docker Hub provides a free public registry for hosting custom Docker images, there are scenarios where it is necessary to have a private registry to keep sensitive or proprietary images secure. By setting up a private Docker Registry, developers can have full control over their container images and restrict access to authorized users.<\/p>\n\n\n\n<p>In this tutorial, we will walk you through the process of setting up and securing your own private Docker Registry on an <strong>Ubuntu 22.04 \/ 20.04 \/ 18.04 server<\/strong>. You will learn how to configure Docker Compose to define the registry&#8217;s settings and use Nginx to forward traffic from the internet to the running Docker container. By the end of this tutorial, you will be able to push and pull Docker images securely from your private registry.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"prerequisites\">Prerequisites<\/h2>\n\n\n\n<p>To follow along with this tutorial, you will need the following:<\/p>\n\n\n\n<ul>\n<li>Two Ubuntu \/ Debian servers: one will act as the&nbsp;<strong>host<\/strong>&nbsp;server for your private Docker Registry, and the other will serve as the&nbsp;<strong>client<\/strong>&nbsp;server.<\/li>\n\n\n\n<li>Docker installed on both servers. You can refer to the tutorial on <a href=\"https:\/\/www.webhi.com\/how-to\/how-to-install-and-use-docker-on-ubuntu-lts\/\">How To Install and Use Docker on Ubuntu 18.04\/20.04\/22.04 LTS<\/a> for detailed instructions on setting up Docker.<\/li>\n\n\n\n<li>Docker Compose installed on the&nbsp;<strong>host<\/strong>&nbsp;server. <\/li>\n\n\n\n<li>Nginx installed on the&nbsp;<strong>host<\/strong>&nbsp;server. <\/li>\n\n\n\n<li>Nginx secured with Let&#8217;s Encrypt on the&nbsp;<strong>host<\/strong>&nbsp;server. <\/li>\n\n\n\n<li>A registered domain name that resolves to the server hosting your private Docker Registry. You will set this up as part of the Let&#8217;s Encrypt prerequisite. For the purposes of this tutorial, we will refer to this domain as&nbsp;<code>your_domain<\/code>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-1-installing-and-configuring-the-docker-registry\">Step 1: Installing and Configuring the Docker Registry<\/h2>\n\n\n\n<p>To start, we need to set up the Docker Registry using Docker Compose. Docker Compose allows you to define and manage the configuration of your Docker containers easily.<\/p>\n\n\n\n<ul>\n<li>Connect to your&nbsp;<strong>host<\/strong>&nbsp;server via SSH.<\/li>\n\n\n\n<li>Create a directory called&nbsp;<code>docker-registry<\/code>&nbsp;to store the configuration files by running the following command:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ mkdir ~\/docker-registry<\/code><\/pre>\n\n\n\n<ul>\n<li>Navigate to the newly created directory:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">cd ~\/docker-registry<\/code><\/pre>\n\n\n\n<ul>\n<li>Create a subdirectory called&nbsp;<code>data<\/code>&nbsp;to store the Docker Registry&#8217;s images:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ mkdir data<\/code><\/pre>\n\n\n\n<ul>\n<li>Create a&nbsp;<code>docker-compose.yml<\/code>&nbsp;file and open it for editing:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ nano docker-compose.yml<\/code><\/pre>\n\n\n\n<ul>\n<li>Add the following content to the&nbsp;<code>docker-compose.yml<\/code>&nbsp;file to define a basic instance of the Docker Registry:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"yaml\" class=\"language-yaml\">version: '3'\n\nservices:\n  registry:\n    image: registry:latest\n    ports:\n      - \"5000:5000\"\n    environment:\n      REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: \/data\n    volumes:\n      - .\/data:\/data<\/code><\/pre>\n\n\n\n<p>This configuration sets up a Docker Registry service called&nbsp;<code>registry<\/code>, using the&nbsp;<code>registry:latest<\/code>&nbsp;image. It maps port&nbsp;<code>5000<\/code>&nbsp;on the host to port&nbsp;<code>5000<\/code>&nbsp;in the container. The&nbsp;<code>REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY<\/code>&nbsp;environment variable specifies the directory where the images will be stored within the container. Finally, it mounts the&nbsp;<code>.\/data<\/code>&nbsp;directory on the host to the&nbsp;<code>\/data<\/code>&nbsp;directory in the container to persist the image data.<\/p>\n\n\n\n<ul>\n<li>Save and close the file by pressing&nbsp;<code>Ctrl + X<\/code>, followed by&nbsp;<code>Y<\/code>, and then&nbsp;<code>Enter<\/code>.<\/li>\n\n\n\n<li>Start the Docker Registry service by running the following command:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ docker-compose up -d<\/code><\/pre>\n\n\n\n<p>The&nbsp;<code>-d<\/code>&nbsp;flag runs the containers in the background.<\/p>\n\n\n\n<p>At this point, your private Docker Registry is up and running on your host server. The registry is accessible via the domain name or IP address of your server on port 5000.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-2-configuring-nginx-as-a-reverse-proxy\">Step 2: Configuring Nginx as a Reverse Proxy<\/h2>\n\n\n\n<p>To securely access the Docker Registry over HTTPS and route traffic from the internet to the registry container, we&#8217;ll use Nginx as a reverse proxy. The reverse proxy will handle SSL termination and forward requests to the Docker Registry service.<\/p>\n\n\n\n<ul>\n<li>Connect to your&nbsp;<strong>host<\/strong>&nbsp;server via SSH.<\/li>\n\n\n\n<li>Open the Nginx configuration file for your domain using the following command (replace&nbsp;<code>your_domain<\/code>&nbsp;with your registered domain name):<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo nano \/etc\/nginx\/sites-available\/your_domain<\/code><\/pre>\n\n\n\n<ul>\n<li>Remove the existing contents and add the following configuration:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"nginx\" class=\"language-nginx\">server {\n    listen 80;\n    listen [::]:80;\n    server_name your_domain;\n\n    return 301 https:\/\/$host$request_uri;\n}\n\nserver {\n    listen 443 ssl http2;\n    listen [::]:443 ssl http2;\n    server_name your_domain;\n\n    ssl_certificate \/etc\/letsencrypt\/live\/your_domain\/fullchain.pem;\n    ssl_certificate_key \/etc\/letsencrypt\/live\/your_domain\/privkey.pem;\n\n    location \/ {\n        proxy_pass http:\/\/localhost:5000;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n    }\n}<\/code><\/pre>\n\n\n\n<p>Replace&nbsp;<code>your_domain<\/code>&nbsp;with your registered domain name. This configuration sets up Nginx to redirect HTTP requests to HTTPS and listens for incoming HTTPS requests. It specifies the SSL certificate and key locations provided by Let&#8217;s Encrypt. The&nbsp;<code>location \/<\/code>&nbsp;block proxies requests to&nbsp;<code>http:\/\/localhost:5000<\/code>, which corresponds to the Docker Registry service running on the host.<\/p>\n\n\n\n<ul>\n<li>Save and close the file by pressing&nbsp;<code>Ctrl + X<\/code>, followed by&nbsp;<code>Y<\/code>, and then&nbsp;<code>Enter<\/code>.<\/li>\n\n\n\n<li>Enable the Nginx configuration by creating a symbolic link:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ln -s \/etc\/nginx\/sites-available\/your_domain \/etc\/nginx\/sites-enabled\/<\/code><\/pre>\n\n\n\n<ul>\n<li>Test the Nginx configuration for syntax errors:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo nginx -t<\/code><\/pre>\n\n\n\n<p>If the configuration file has no syntax errors, you will see&nbsp;<code>syntax is ok<\/code>&nbsp;and&nbsp;<code>test is successful<\/code>&nbsp;messages.<\/p>\n\n\n\n<ul>\n<li>Restart Nginx to apply the changes:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo systemctl restart nginx<\/code><\/pre>\n\n\n\n<p>Nginx is now configured as a reverse proxy for your Docker Registry, handling SSL termination and forwarding requests to the registry service.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-3-pushing-and-pulling-images-from-the-private-docker-registry\">Step 3: Pushing and Pulling Images from the Private Docker Registry<\/h2>\n\n\n\n<p>Now that your private Docker Registry is set up and accessible via your domain name over HTTPS, you can push and pull Docker images to and from the registry.<\/p>\n\n\n\n<p>To push an image to the registry, use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ docker push your_domain\/image_name:tag<\/code><\/pre>\n\n\n\n<p>Replace&nbsp;<code>your_domain<\/code>&nbsp;with your registered domain name,&nbsp;<code>image_name<\/code>&nbsp;with the name of your image, and&nbsp;<code>tag<\/code>&nbsp;with a specific version or tag for the image.<\/p>\n\n\n\n<p>To pull an image from the registry, use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ docker pull your_domain\/image_name:tag<\/code><\/pre>\n\n\n\n<p>Again, replace&nbsp;<code>your_domain<\/code>,&nbsp;<code>image_name<\/code>, and&nbsp;<code>tag<\/code>&nbsp;with the appropriate values.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-4-enable-authentication\">Step 4: Enable Authentication<\/h2>\n\n\n\n<p>By default, the Docker Registry we set up does not require authentication for pushing and pulling images. However, enabling authentication adds an extra layer of security to your private Docker Registry. With authentication enabled, only authorized users will be able to access and interact with the registry.<\/p>\n\n\n\n<p>To enable authentication, you can choose from several authentication methods depending on your requirements. One common method is to use a username and password-based authentication system. Docker Registry supports a basic authentication mechanism using an htpasswd file. Here&#8217;s how you can enable authentication:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"create-an-htpasswd-file\">Create an htpasswd file:<\/h3>\n\n\n\n<ul>\n<li>Install the&nbsp;<code>apache2-utils<\/code>&nbsp;package if not already installed:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo apt-get install apache2-utils<\/code><\/pre>\n\n\n\n<ul>\n<li>Generate an htpasswd file with a username and password:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo htpasswd -Bc \/path\/to\/htpasswd &lt;username&gt;<\/code><\/pre>\n\n\n\n<ul>\n<li>You will be prompted to enter and confirm the password for the specified username. Repeat this step for each user you want to add.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-docker-registry-to-use-authentication\">Configure Docker Registry to use authentication:<\/h3>\n\n\n\n<ul>\n<li>Open your&nbsp;<code>docker-compose.yml<\/code>&nbsp;file.<\/li>\n\n\n\n<li>Add the following environment variable to the&nbsp;<code>registry<\/code>&nbsp;service:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"yaml\" class=\"language-yaml\">environment:\n  - REGISTRY_AUTH=htpasswd\n  - REGISTRY_AUTH_HTPASSWD_PATH=\/path\/to\/htpasswd\n  - REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm<\/code><\/pre>\n\n\n\n<ul>\n<li>Replace&nbsp;<code>\/path\/to\/htpasswd<\/code>&nbsp;with the actual path to your htpasswd file.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"save-the-changes-and-restart-the-docker-registry\">Save the changes and restart the Docker Registry:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ docker-compose down\n$ docker-compose up -d<\/code><\/pre>\n\n\n\n<p>Once authentication is enabled, users will need to provide valid credentials (username and password) to push and pull images from the registry.<\/p>\n\n\n\n<p>Remember to manage user accounts and passwords securely. Regularly review and update user access as necessary. You can also explore other authentication methods such as token-based authentication or integrating with external authentication providers like LDAP or OAuth.<\/p>\n\n\n\n<p>That&#8217;s it! You now have your own private Docker Registry set up with SSL encryption and accessible via a domain name. You can use this registry to securely store and manage your Docker images.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion:<\/h2>\n\n\n\n<p>In this article, we discussed the process of setting up a private Docker Registry. We covered the installation of Docker , creating a Docker Compose file, enabling SSL\/TLS encryption, and enabling authentication for authorized access. By following these steps, you can establish a secure Docker Registry to manage and distribute your containerized applications within your organization. Remember to stay updated on security best practices and regularly review your registry&#8217;s configuration. Enjoy the benefits of a well-secured Docker Registry for streamlined application deployment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Docker Registry is a powerful tool that helps manage the storage and distribution of Docker container images. While Docker Hub provides a free public registry for hosting custom Docker images, there are scenarios where it is necessary to have a private registry to keep sensitive or proprietary images secure. By setting up a private ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[69,182],"tags":[],"yoast_head":"\n<title>How to setup a Private Docker Registry on Ubuntu \/ Debian - WebHi Tutorials &amp; Documentations<\/title>\n<meta name=\"description\" content=\"Learn how to securely set up a private Docker Registry in this step-by-step guide. Install Docker, configure SSL\/TLS encryption, enable authentication, and ensure the safety of your containerized applications.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to setup a Private Docker Registry on Ubuntu \/ Debian - WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"og:description\" content=\"Learn how to securely set up a private Docker Registry in this step-by-step guide. Install Docker, configure SSL\/TLS encryption, enable authentication, and ensure the safety of your containerized applications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/\" \/>\n<meta property=\"og:site_name\" content=\"WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webhi.technology\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-09T16:19:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-07T16:08:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/docker_reg_en-1.jpg\" \/>\n<meta name=\"author\" content=\"webhi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:site\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webhi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/\"},\"author\":{\"name\":\"webhi\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\"},\"headline\":\"How to setup a Private Docker Registry on Ubuntu \/ Debian\",\"datePublished\":\"2023-06-09T16:19:06+00:00\",\"dateModified\":\"2023-12-07T16:08:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/\"},\"wordCount\":1203,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"articleSection\":[\"Linux system administration\",\"Virtualization &amp; Cloud computing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/\",\"name\":\"How to setup a Private Docker Registry on Ubuntu \/ Debian - WebHi Tutorials &amp; Documentations\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\"},\"datePublished\":\"2023-06-09T16:19:06+00:00\",\"dateModified\":\"2023-12-07T16:08:39+00:00\",\"description\":\"Learn how to securely set up a private Docker Registry in this step-by-step guide. Install Docker, configure SSL\/TLS encryption, enable authentication, and ensure the safety of your containerized applications.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webhi.com\/how-to\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to setup a Private Docker Registry on Ubuntu \/ Debian\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"name\":\"WebHi Tutorials &amp; Documentations\",\"description\":\"System administration and knowledge base\",\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\",\"name\":\"WebHi Technology\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"width\":288,\"height\":95,\"caption\":\"WebHi Technology\"},\"image\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webhi.technology\",\"https:\/\/twitter.com\/WebHiTechnology\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\",\"name\":\"webhi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1780005063\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1780005063\",\"caption\":\"webhi\"},\"sameAs\":[\"https:\/\/www.webhi.com\/how-to\"],\"url\":\"https:\/\/www.webhi.com\/how-to\/author\/webhi\/\"}]}<\/script>\n","yoast_head_json":{"title":"How to setup a Private Docker Registry on Ubuntu \/ Debian - WebHi Tutorials &amp; Documentations","description":"Learn how to securely set up a private Docker Registry in this step-by-step guide. Install Docker, configure SSL\/TLS encryption, enable authentication, and ensure the safety of your containerized applications.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/","og_locale":"en_US","og_type":"article","og_title":"How to setup a Private Docker Registry on Ubuntu \/ Debian - WebHi Tutorials &amp; Documentations","og_description":"Learn how to securely set up a private Docker Registry in this step-by-step guide. Install Docker, configure SSL\/TLS encryption, enable authentication, and ensure the safety of your containerized applications.","og_url":"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/","og_site_name":"WebHi Tutorials &amp; Documentations","article_publisher":"https:\/\/www.facebook.com\/webhi.technology","article_published_time":"2023-06-09T16:19:06+00:00","article_modified_time":"2023-12-07T16:08:39+00:00","og_image":[{"url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/06\/docker_reg_en-1.jpg"}],"author":"webhi","twitter_card":"summary_large_image","twitter_creator":"@WebHiTechnology","twitter_site":"@WebHiTechnology","twitter_misc":{"Written by":"webhi","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/#article","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/"},"author":{"name":"webhi","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54"},"headline":"How to setup a Private Docker Registry on Ubuntu \/ Debian","datePublished":"2023-06-09T16:19:06+00:00","dateModified":"2023-12-07T16:08:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/"},"wordCount":1203,"commentCount":0,"publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"articleSection":["Linux system administration","Virtualization &amp; Cloud computing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/","url":"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/","name":"How to setup a Private Docker Registry on Ubuntu \/ Debian - WebHi Tutorials &amp; Documentations","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/#website"},"datePublished":"2023-06-09T16:19:06+00:00","dateModified":"2023-12-07T16:08:39+00:00","description":"Learn how to securely set up a private Docker Registry in this step-by-step guide. Install Docker, configure SSL\/TLS encryption, enable authentication, and ensure the safety of your containerized applications.","breadcrumb":{"@id":"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.webhi.com\/how-to\/install-private-docker-registry-on-ubuntu-debian\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webhi.com\/how-to\/"},{"@type":"ListItem","position":2,"name":"How to setup a Private Docker Registry on Ubuntu \/ Debian"}]},{"@type":"WebSite","@id":"https:\/\/www.webhi.com\/how-to\/#website","url":"https:\/\/www.webhi.com\/how-to\/","name":"WebHi Tutorials &amp; Documentations","description":"System administration and knowledge base","publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webhi.com\/how-to\/#organization","name":"WebHi Technology","url":"https:\/\/www.webhi.com\/how-to\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/","url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","contentUrl":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","width":288,"height":95,"caption":"WebHi Technology"},"image":{"@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webhi.technology","https:\/\/twitter.com\/WebHiTechnology"]},{"@type":"Person","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54","name":"webhi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/","url":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1780005063","contentUrl":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1780005063","caption":"webhi"},"sameAs":["https:\/\/www.webhi.com\/how-to"],"url":"https:\/\/www.webhi.com\/how-to\/author\/webhi\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/5559"}],"collection":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/comments?post=5559"}],"version-history":[{"count":18,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/5559\/revisions"}],"predecessor-version":[{"id":7353,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/5559\/revisions\/7353"}],"wp:attachment":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/media?parent=5559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/categories?post=5559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/tags?post=5559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}