{"id":50689,"date":"2025-02-11T14:03:46","date_gmt":"2025-02-11T14:03:46","guid":{"rendered":"https:\/\/accuweb.cloud\/resource\/?post_type=faq&#038;p=50689"},"modified":"2026-02-17T13:22:59","modified_gmt":"2026-02-17T13:22:59","slug":"set-up-private-docker-registry-on-ubuntu","status":"publish","type":"faq","link":"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu","title":{"rendered":"How To Set Up a Private Docker Registry on Ubuntu?"},"content":{"rendered":"<h12class=\"ack-h2\">How To Set Up a Private Docker Registry on Ubuntu?<\/h2>\n<h2 class=\"ack-h2\">Introduction<\/h2>\n<p>Private Docker registries make it easy to share and distribute Docker images between containers. Setting up a private registry helps speed up deployments and ensures smooth CI\/CD workflows with Docker.<\/p>\n<p>In this guide, we\u2019ll learn how to set up and configure a private Docker registry that can be accessed externally.<\/p>\n<h2 class=\"ack-h2\">Requirements:<\/h2>\n<p>&#8211; A server or VPS running Ubuntu.<\/p>\n<p>&#8211; Root access to the server, or a user with sudo permissions to install packages and modify configurations.<\/p>\n<h2 class=\"ack-h2\">What is a Private Docker Registry?<\/h2>\n<p>A private Docker registry is a <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/storage\" target=\"_blank\" rel=\"noopener\">storage system<\/a> for Docker images hosted on a private server and accessible only to authorized users. It acts as a central repository for images, allowing authenticated Docker hosts to pull and push them.<\/p>\n<p>When configured on a server, the private registry interacts with Docker Hub over the internet to pull or push images. It then stores these images locally and shares them securely with other authorized Docker hosts. Docker hosts can connect to the private registry, pull the required images, and use them to build containers.<\/p>\n<h2 class=\"ack-h2\">Steps to Set Up a Private Docker Registry on Ubuntu<\/h2>\n<p>Follow these simple steps to set up a private Docker registry on an Ubuntu server.<\/p>\n<h3 class=\"ack-h3\">Install Docker on Ubuntu<\/h3>\n<p>Docker is a platform that lets you package and run <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/applications\" target=\"_blank\" rel=\"noopener\">applications<\/a> in lightweight, isolated containers. Containers are like virtual machines but more efficient and portable. Docker uses a client-server model, where the Docker daemon manages the containers.<\/p>\n<p><b>Before You Begin<\/b><\/p>\n<p>Remove old versions of Docker to avoid conflicts. This won&#8217;t delete your existing images, containers, or networks. Run:<\/p>\n<pre><code class=\"language-javascript\"><b># apt-get remove docker docker-engine docker.io containerd runc<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/first.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50690 size-full\" title=\"Remove old versions of Docker\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/first.png\" alt=\"Remove old versions of Docker\" width=\"903\" height=\"297\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/first.png 903w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/first-300x99.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/first-768x253.png 768w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/first-900x297.png 900w\" sizes=\"(max-width: 903px) 100vw, 903px\" \/><\/a><\/p>\n<p>If you get the error message &#8220;<b>E: Unable to locate package docker-engine<\/b>&#8220;. It means that the Docker is not installed on your Ubuntu system.<\/p>\n<h4 class=\"ack-h4\">Install Docker from the Official Repository<\/h4>\n<p>To get the latest stable version of Docker, install it from the official Docker repository. Here\u2019s how:<\/p>\n<p><b>Step 1:<\/b>\u00a0Update the Package Repository<\/p>\n<p>Run the following command to update the system and install the necessary updates:<\/p>\n<pre><code class=\"language-javascript\"><b># apt update<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1.png\"><img decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50691 size-full\" title=\"Update the Package Repository\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1.png\" alt=\"Update the Package Repository\" width=\"915\" height=\"459\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1.png 915w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1-300x150.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1-768x385.png 768w\" sizes=\"(max-width: 915px) 100vw, 915px\" \/><\/a><\/p>\n<p><b>Step 2:\u00a0<\/b>Install Required Packages<\/p>\n<p>Install packages needed to securely download and manage Docker repositories:<\/p>\n<pre><code class=\"language-javascript\"><b># apt install apt-transport-https ca-certificates curl software-properties-common -y<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2.png\"><img decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50692 size-full\" title=\"Install Required Packages\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2.png\" alt=\"Install Required Packages\" width=\"916\" height=\"493\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2.png 916w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-300x161.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-768x413.png 768w\" sizes=\"(max-width: 916px) 100vw, 916px\" \/><\/a><\/p>\n<p>This command:<\/p>\n<p>&#8211; Enables apt to download packages over HTTPS.<\/p>\n<p>&#8211; Installs curl for data transfers.<\/p>\n<p>&#8211; Sets up tools for managing software.<\/p>\n<div class=\"cta-btn-top-space ack-extra-image-space\"><\/div>\n\t\t<div data-elementor-type=\"section\" data-elementor-id=\"38668\" class=\"elementor elementor-38668\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\" data-elementor-post-type=\"elementor_library\">\n\t\t\t        <section class=\"elementor-section elementor-top-section elementor-element elementor-element-882321f elementor-section-boxed elementor-section-height-default elementor-section-height-default ct-header-fixed-none ct-row-max-none\" data-id=\"882321f\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n            \n                        <div class=\"elementor-container elementor-column-gap-default \">\n                    <div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7cc79cc\" data-id=\"7cc79cc\" data-element_type=\"column\">\n        <div class=\"elementor-widget-wrap elementor-element-populated\">\n                    \n        \t\t<div class=\"elementor-element elementor-element-e31b40f elementor-widget elementor-widget-shortcode\" data-id=\"e31b40f\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t            <\/div>\n        <\/div>\n                    <\/div>\n        <\/section>\n        \t\t<\/div>\n\t\t\n<div class=\"article-space\"><\/div>\n<p><b>Step 3:<\/b>\u00a0Add Docker&#8217;s GPG Key<\/p>\n<p>A GPG key ensures the software is authentic. Add Docker\u2019s GPG key by running:<\/p>\n<pre><code class=\"language-javascript\"><b># curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo apt-key add -<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50693 size-full\" title=\"Add Docker's GPG Key\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3.png\" alt=\"Add Docker's GPG Key\" width=\"913\" height=\"234\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3.png 913w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-300x77.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-768x197.png 768w\" sizes=\"(max-width: 913px) 100vw, 913px\" \/><\/a><\/p>\n<p>If successful, the output will display OK.<\/p>\n<p><b>Step 4:\u00a0<\/b>Add the Docker Repository<\/p>\n<p>Add Docker&#8217;s official repository to your system:<\/p>\n<pre><code class=\"language-javascript\"><b># add-apt-repository \"deb [arch=amd64] https:\/\/download.docker.com\/linux\/ubuntu $(lsb_release -cs) stable\"<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50694 size-full\" title=\"Add the Docker Repository\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-4.png\" alt=\"Add the Docker Repository\" width=\"916\" height=\"512\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-4.png 916w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-4-300x168.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-4-768x429.png 768w\" sizes=\"(max-width: 916px) 100vw, 916px\" \/><\/a><\/p>\n<p>This updates the system to use the official <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/application\/docker-swarm-hosting\" target=\"_blank\" rel=\"noopener\">Docker<\/a> repository for installation.<\/p>\n<p><b>Step 5:<\/b>\u00a0Verify the Installation Source<\/p>\n<p>To confirm Docker will be installed from the correct repository:<\/p>\n<pre><code class=\"language-javascript\"><b># apt-cache policy docker-ce<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50695 size-full\" title=\"Verify the Installation Source\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-5.png\" alt=\"Verify the Installation Source\" width=\"917\" height=\"623\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-5.png 917w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-5-300x204.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-5-768x522.png 768w\" sizes=\"(max-width: 917px) 100vw, 917px\" \/><\/a><\/p>\n<p>This checks that Docker will come from the official repository, not Ubuntu\u2019s default repository.<\/p>\n<p><b>Step 6:\u00a0<\/b>Install Docker<\/p>\n<p>Install Docker with the following command:<\/p>\n<pre><code class=\"language-javascript\"><b># apt install docker-ce -y<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50696 size-full\" title=\"Install Docker\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-6.png\" alt=\"Install Docker\" width=\"915\" height=\"559\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-6.png 915w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-6-300x183.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-6-768x469.png 768w\" sizes=\"(max-width: 915px) 100vw, 915px\" \/><\/a><\/p>\n<p>Wait for the installation to complete.<\/p>\n<p><b>Step 7:\u00a0<\/b>Check Docker&#8217;s Status<\/p>\n<p>Verify that Docker is installed and running:<\/p>\n<pre><code class=\"language-javascript\"><b># systemctl status docker<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50697 size-full\" title=\"Check Docker's Status\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-7.png\" alt=\"Check Docker's Status\" width=\"907\" height=\"268\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-7.png 907w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-7-300x89.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-7-768x227.png 768w\" sizes=\"(max-width: 907px) 100vw, 907px\" \/><\/a><\/p>\n<p>Suppose you are receiving an error message\u00a0<b>Inactive (dead)<\/b>. It means that the service is in the stop status. You need to start it manually.<\/p>\n<div class=\"cta-btn-top-space ack-extra-image-space\"><\/div>\n\t\t<div data-elementor-type=\"section\" data-elementor-id=\"38668\" class=\"elementor elementor-38668\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\" data-elementor-post-type=\"elementor_library\">\n\t\t\t        <section class=\"elementor-section elementor-top-section elementor-element elementor-element-882321f elementor-section-boxed elementor-section-height-default elementor-section-height-default ct-header-fixed-none ct-row-max-none\" data-id=\"882321f\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n            \n                        <div class=\"elementor-container elementor-column-gap-default \">\n                    <div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7cc79cc\" data-id=\"7cc79cc\" data-element_type=\"column\">\n        <div class=\"elementor-widget-wrap elementor-element-populated\">\n                    \n        \t\t<div class=\"elementor-element elementor-element-e31b40f elementor-widget elementor-widget-shortcode\" data-id=\"e31b40f\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t            <\/div>\n        <\/div>\n                    <\/div>\n        <\/section>\n        \t\t<\/div>\n\t\t\n<div class=\"article-space\"><\/div>\n<p><b>Step 8:<\/b>\u00a0Run the following command in the terminal to start the Docker service.<\/p>\n<pre><code class=\"language-javascript\"><b># systemctl start docker<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50698 size-full\" title=\"Start the Docker service\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-8.png\" alt=\"Start the Docker service\" width=\"915\" height=\"136\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-8.png 915w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-8-300x45.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-8-768x114.png 768w\" sizes=\"(max-width: 915px) 100vw, 915px\" \/><\/a><\/p>\n<p><b>Step 9:<\/b>\u00a0To start the Docker service automatically on boot, run the following command in the terminal.<\/p>\n<pre><code class=\"language-javascript\"><b># systemctl enable docker<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50699 size-full\" title=\"Start the Docker service automatically\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-9.png\" alt=\"Start the Docker service automatically\" width=\"913\" height=\"216\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-9.png 913w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-9-300x71.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-9-768x182.png 768w\" sizes=\"(max-width: 913px) 100vw, 913px\" \/><\/a><\/p>\n<p>The output will confirm that the Docker service is active and set to start automatically on boot.<\/p>\n<p>You\u2019re now ready to use Docker and proceed to set up your private Docker registry!<\/p>\n<h3 class=\"ack-h3\">Install Docker Compose on Ubuntu<\/h3>\n<p>Docker Compose is a tool that lets you manage multiple containers with a single command. It helps you define and run applications that rely on multiple services, such as caches, databases, or APIs.<\/p>\n<div class=\"ack-formula\"><b>Note:<\/b> This guide explains how to install <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/application\/docker-swarm-hosting\" target=\"_blank\" rel=\"noopener\">Docker<\/a> Compose V2, which uses the docker-compose command. The older docker-compose command (V1) is no longer supported.<\/div>\n<div class=\"article-space\"><\/div>\n<p>If you already have Docker installed on Linux, the recommended way to install Docker Compose is through the official Docker repository. Here\u2019s how to do it.<\/p>\n<h4 class=\"ack-h4\">Install Necessary Packages<\/h4>\n<p>Before adding the Docker repository, install some required packages:<\/p>\n<p><b>Step 1:<\/b>\u00a0Update the package list:<\/p>\n<pre><code class=\"language-javascript\"><b># apt update<\/b><\/code><\/pre>\n<p><b>Step 2:<\/b>\u00a0Install certificate tools and curl:<\/p>\n<pre><code class=\"language-javascript\"><b># apt install ca-certificates curl<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50700 size-full\" title=\"Install certificate tools and curl\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-1.png\" alt=\"Install certificate tools and curl\" width=\"912\" height=\"329\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-1.png 912w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-1-300x108.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-1-768x277.png 768w\" sizes=\"(max-width: 912px) 100vw, 912px\" \/><\/a><\/p>\n<h4 class=\"ack-h4\">Add Docker Repository<\/h4>\n<p>To get Docker Compose from the official Docker repository, follow these steps:<\/p>\n<p><b>Step 1:\u00a0<\/b>Create the \/etc\/apt\/keyrings directory and set proper permissions:<\/p>\n<pre><code class=\"language-javascript\"><b># install -m 0755 -d \/etc\/apt\/keyrings<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50701 size-full\" title=\"Set permissions\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1-1.png\" alt=\"Set permissions\" width=\"913\" height=\"174\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1-1.png 913w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1-1-300x57.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1-1-768x146.png 768w\" sizes=\"(max-width: 913px) 100vw, 913px\" \/><\/a><\/p>\n<p><b>Step 2:\u00a0<\/b>Download the Docker GPG key:<\/p>\n<pre><code class=\"language-javascript\"><b># curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg -o \/etc\/apt\/keyrings\/docker.asc<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50702 size-full\" title=\"Download the Docker GPG key\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-2.png\" alt=\"Download the Docker GPG key\" width=\"915\" height=\"166\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-2.png 915w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-2-300x54.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-2-768x139.png 768w\" sizes=\"(max-width: 915px) 100vw, 915px\" \/><\/a><\/p>\n<p><b>Step 3:<\/b>\u00a0Set read permissions for the key:<\/p>\n<pre><code class=\"language-javascript\"><b># chmod a+r \/etc\/apt\/keyrings\/docker.asc<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50703 size-full\" title=\"Set read permissions\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-1.png\" alt=\"Set read permissions\" width=\"916\" height=\"146\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-1.png 916w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-1-300x48.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-1-768x122.png 768w\" sizes=\"(max-width: 916px) 100vw, 916px\" \/><\/a><\/p>\n<p><b>Step 4:<\/b>\u00a0Add the Docker repository to your system:<\/p>\n<pre><code class=\"language-javascript\"><b># echo \"deb [arch=$(dpkg --print-architecture) signed-by=\/etc\/apt\/keyrings\/docker.asc] \\<\/b><\/code><\/pre>\n<pre><code class=\"language-javascript\"><b>https:\/\/download.docker.com\/linux\/ubuntu $(. \/etc\/os-release &amp;&amp; echo \"$VERSION_CODENAME\") stable\" | \\<\/b><\/code><\/pre>\n<pre><code class=\"language-javascript\"><b>sudo tee \/etc\/apt\/sources.list.d\/docker.list &gt; \/dev\/null<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-4-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50704 size-full\" title=\"Add the Docker repository\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-4-1.png\" alt=\"Add the Docker repository\" width=\"915\" height=\"266\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-4-1.png 915w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-4-1-300x87.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-4-1-768x223.png 768w\" sizes=\"(max-width: 915px) 100vw, 915px\" \/><\/a><\/p>\n<h4 class=\"ack-h4\">Install Docker Compose Plugin<\/h4>\n<p>Now that the Docker repository has been added, follow these steps to install Docker Compose:<\/p>\n<p><b>Step 1:\u00a0<\/b>Update the package list again:<\/p>\n<pre><code class=\"language-javascript\"><b># apt update<\/b><\/code><\/pre>\n<p><b>Step 2:\u00a0<\/b>Install the Docker Compose plugin:<\/p>\n<pre><code class=\"language-javascript\"><b># apt install docker-compose-plugin -y<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50705 size-full\" title=\"Install the Docker Compose plugin\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-3.png\" alt=\"Install the Docker Compose plugin\" width=\"913\" height=\"395\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-3.png 913w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-3-300x130.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2-3-768x332.png 768w\" sizes=\"(max-width: 913px) 100vw, 913px\" \/><\/a><\/p>\n<p>If it is already installed, then you will get a message that docker-compose-plugin is already the newest version.<\/p>\n<div class=\"cta-btn-top-space ack-extra-image-space\"><\/div>\n\t\t<div data-elementor-type=\"section\" data-elementor-id=\"38668\" class=\"elementor elementor-38668\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\" data-elementor-post-type=\"elementor_library\">\n\t\t\t        <section class=\"elementor-section elementor-top-section elementor-element elementor-element-882321f elementor-section-boxed elementor-section-height-default elementor-section-height-default ct-header-fixed-none ct-row-max-none\" data-id=\"882321f\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n            \n                        <div class=\"elementor-container elementor-column-gap-default \">\n                    <div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7cc79cc\" data-id=\"7cc79cc\" data-element_type=\"column\">\n        <div class=\"elementor-widget-wrap elementor-element-populated\">\n                    \n        \t\t<div class=\"elementor-element elementor-element-e31b40f elementor-widget elementor-widget-shortcode\" data-id=\"e31b40f\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t            <\/div>\n        <\/div>\n                    <\/div>\n        <\/section>\n        \t\t<\/div>\n\t\t\n<div class=\"article-space\"><\/div>\n<p><b>Step 3:<\/b>\u00a0Verify the installation:<\/p>\n<pre><code class=\"language-javascript\"><b># docker compose version<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50706 size-full\" title=\"Verify the installation\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-2.png\" alt=\"Verify the installation\" width=\"912\" height=\"179\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-2.png 912w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-2-300x59.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-2-768x151.png 768w\" sizes=\"(max-width: 912px) 100vw, 912px\" \/><\/a><\/p>\n<p>This will show the installed version of Docker Compose.<\/p>\n<p>Docker Compose is now installed and ready to use for managing multi-container applications.<\/p>\n<h4 class=\"ack-h4\">Install Nginx on Ubuntu<\/h4>\n<p>Nginx (pronounced \u201cEngine X\u201d) is an open-source web server. It works as a reverse proxy, directing client requests to the right server. Over time, it has added features like load balancing, scaling, and handling static files faster than Apache. These features <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/performance-new\" target=\"_blank\" rel=\"noopener\">improve performance<\/a> and resource usage.<\/p>\n<p><b>Steps to Install Nginx on Ubuntu<\/b><\/p>\n<p><b>Step 1:\u00a0<\/b>Log in to your server using SSH with the root user:<\/p>\n<p><b>Step 2:\u00a0<\/b>Before installing any software, update the package list to ensure you download the latest version. Run:<\/p>\n<pre><code class=\"language-javascript\"><b># apt update<\/b><\/code><\/pre>\n<p>Let the update process finish.<\/p>\n<p><b>Step 3:\u00a0<\/b>Install Nginx by running:<\/p>\n<pre><code class=\"language-javascript\"><b># apt install nginx<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50707 size-full\" title=\"Install Nginx\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-3.png\" alt=\"Install Nginx\" width=\"917\" height=\"725\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-3.png 917w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-3-300x237.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-3-768x607.png 768w\" sizes=\"(max-width: 917px) 100vw, 917px\" \/><\/a><\/p>\n<p>Wait for the system to download and install Nginx. Once done, you\u2019re ready to use it.<\/p>\n<p>Nginx is now installed and can be configured as needed!<\/p>\n<h3 class=\"ack-h3\">Install and Set Up a Private Docker Registry<\/h3>\n<p>To host a private Docker registry, you need to set up the registry service, configure an Nginx server, and create security certificates. Follow these steps to set up the private registry.<\/p>\n<p><b>Step 1:<\/b>\u00a0Create Registry Directories<\/p>\n<p>Start by organizing your files in a proper directory structure. Here\u2019s how:<\/p>\n<p>1. Create the main directory for the registry and subdirectories for Nginx and authentication:<\/p>\n<pre><code class=\"language-javascript\"><b># mkdir -p registry\/{nginx,auth}<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50708 size-full\" title=\"Create the main directory\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/1.png\" alt=\"Create the main directory\" width=\"914\" height=\"157\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/1.png 914w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/1-300x52.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/1-768x132.png 768w\" sizes=\"(max-width: 914px) 100vw, 914px\" \/><\/a><\/p>\n<p>2. Inside the nginx folder, create additional directories for configuration and SSL certificates:<\/p>\n<pre><code class=\"language-javascript\"><b># mkdir -p registry\/nginx\/{conf.d,ssl}<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50709 size-full\" title=\"Create additional directories\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2.png\" alt=\"Create additional directories\" width=\"909\" height=\"163\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2.png 909w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-300x54.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-768x138.png 768w\" sizes=\"(max-width: 909px) 100vw, 909px\" \/><\/a><\/p>\n<p>3. Navigate to the registry directory and check the folder structure:<\/p>\n<pre><code class=\"language-javascript\"><b># cd registry &amp;&amp; tree<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50710 size-full\" title=\"Registry directory\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/3.png\" alt=\"Registry directory\" width=\"908\" height=\"172\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/3.png 908w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/3-300x57.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/3-768x145.png 768w\" sizes=\"(max-width: 908px) 100vw, 908px\" \/><\/a><\/p>\n<div class=\"cta-btn-top-space ack-extra-image-space\"><\/div>\n\t\t<div data-elementor-type=\"section\" data-elementor-id=\"38668\" class=\"elementor elementor-38668\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\" data-elementor-post-type=\"elementor_library\">\n\t\t\t        <section class=\"elementor-section elementor-top-section elementor-element elementor-element-882321f elementor-section-boxed elementor-section-height-default elementor-section-height-default ct-header-fixed-none ct-row-max-none\" data-id=\"882321f\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n            \n                        <div class=\"elementor-container elementor-column-gap-default \">\n                    <div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7cc79cc\" data-id=\"7cc79cc\" data-element_type=\"column\">\n        <div class=\"elementor-widget-wrap elementor-element-populated\">\n                    \n        \t\t<div class=\"elementor-element elementor-element-e31b40f elementor-widget elementor-widget-shortcode\" data-id=\"e31b40f\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t            <\/div>\n        <\/div>\n                    <\/div>\n        <\/section>\n        \t\t<\/div>\n\t\t\n<div class=\"article-space\"><\/div>\n<p><b>Note:<\/b> If the tree command is not installed, you can receive an error message &#8220;-bash: tree: command not found&#8221;. You can install it with:<\/p>\n<pre><code class=\"language-javascript\"><b># apt install tree<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/3.1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50711 size-full\" title=\"Tree command\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/3.1.png\" alt=\"Tree command\" width=\"914\" height=\"705\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/3.1.png 914w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/3.1-300x231.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/3.1-768x592.png 768w\" sizes=\"(max-width: 914px) 100vw, 914px\" \/><\/a><\/p>\n<p>The output will show the complete directory structure for your private Docker registry.<\/p>\n<p><b>Step 2:<\/b>\u00a0Create Docker Compose File and Define Services<\/p>\n<p>To set up a private Docker registry, you&#8217;ll need a compose.yaml file to define the required services and configurations. Follow these steps to create and configure the file:<\/p>\n<p>1. Create the compose.yaml file<\/p>\n<p>Use a text editor to create a new file in the registry directory. For example, use Nano:<\/p>\n<pre><code class=\"language-javascript\"><b># nano compose.yaml<\/b><\/code><\/pre>\n<p>2. Add the Docker Compose Configuration<\/p>\n<p>Paste the following content into the file:<\/p>\n<pre><code class=\"language-javascript\"><b>version: '3'<\/b>\r\n<b>services:<\/b>\r\n<b>\u00a0 registry:<\/b>\r\n<b>\u00a0 \u00a0 image: registry:2<\/b>\r\n<b>\u00a0 \u00a0 restart: always<\/b>\r\n<b>\u00a0 \u00a0 ports:<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 - \"5000:5000\"<\/b>\r\n<b>\u00a0 \u00a0 environment:<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 REGISTRY_AUTH: htpasswd<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 REGISTRY_AUTH_HTPASSWD_REALM: Registry-Realm<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 REGISTRY_AUTH_HTPASSWD_PATH: \/auth\/registry.passwd<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: \/data<\/b>\r\n<b>\u00a0 \u00a0 volumes:<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 - registrydata:\/data<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 - .\/auth:\/auth<\/b>\r\n<b>\u00a0 \u00a0 networks:<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 - mynet<\/b>\r\n<b>\u00a0 nginx:<\/b>\r\n<b>\u00a0 \u00a0 image: nginx:alpine<\/b>\r\n<b>\u00a0 \u00a0 container_name: nginx<\/b>\r\n<b>\u00a0 \u00a0 restart: unless-stopped<\/b>\r\n<b>\u00a0 \u00a0 tty: true<\/b>\r\n<b>\u00a0 \u00a0 ports:<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 - \"80:80\"<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 - \"443:443\"<\/b>\r\n<b>\u00a0 \u00a0 volumes:<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 - .\/nginx\/conf.d\/:\/etc\/nginx\/conf.d\/<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 - .\/nginx\/ssl\/:\/etc\/nginx\/ssl\/<\/b>\r\n<b>\u00a0 \u00a0 networks:<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 - mynet<\/b>\r\n<b>networks:<\/b>\r\n<b>\u00a0 mynet:<\/b>\r\n<b>\u00a0 \u00a0 driver: bridge<\/b>\r\n<b>volumes:<\/b>\r\n<b>\u00a0 registrydata:<\/b>\r\n<b>\u00a0 \u00a0 driver: local<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50712 size-full\" title=\"Add the Docker Compose Configuration\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-1.png\" alt=\"Add the Docker Compose Configuration\" width=\"916\" height=\"1027\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-1.png 916w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-1-268x300.png 268w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-1-913x1024.png 913w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-1-768x861.png 768w\" sizes=\"(max-width: 916px) 100vw, 916px\" \/><\/a><\/p>\n<p><b>Explanation of the Configuration<\/b><\/p>\n<p><b>Registry Service<\/b><\/p>\n<p>&#8211;\u00a0<b>Image:<\/b>\u00a0Uses the Docker Registry image (registry:2).<\/p>\n<p>&#8211;\u00a0<b>Restart Policy:<\/b>\u00a0restart: always ensures the service restarts automatically after a system reboot.<\/p>\n<p>&#8211;\u00a0<b>Ports:\u00a0<\/b>Maps port 5000 inside the container to port 5000 on the host.<\/p>\n<p><b>Environment Variables:<\/b><\/p>\n<p>&#8211; Enables authentication (REGISTRY_AUTH) using the registry.passwd file.<\/p>\n<p>Specifies the location for data storage.<\/p>\n<p>&#8211; Volumes:<\/p>\n<p>registrydata volume stores registry data.<\/p>\n<p>Local auth directory holds the authentication file.<\/p>\n<p>&#8211;\u00a0<b>Networks:<\/b>\u00a0Runs on the mynet Docker network.<\/p>\n<p><b>Nginx Service<\/b><\/p>\n<p>&#8211;\u00a0<b>Image:<\/b>\u00a0Uses the lightweight nginx:alpine image.<\/p>\n<p>&#8211;\u00a0<b>Container Name:<\/b>\u00a0Named nginx for easy identification.<\/p>\n<p><b>Ports:<\/b><\/p>\n<p>Maps port 80 for HTTP.<\/p>\n<p>Maps port 443 for HTTPS.<\/p>\n<p><b>Volumes:<\/b><\/p>\n<p>&#8211; Local conf.d directory for Nginx configuration files.<\/p>\n<p>&#8211; Local ssl directory for SSL certificates.<\/p>\n<p><b>Networks:<\/b>\u00a0Runs on the same mynet network as the registry service.<\/p>\n<div class=\"cta-btn-top-space ack-extra-image-space\"><\/div>\n\t\t<div data-elementor-type=\"section\" data-elementor-id=\"38668\" class=\"elementor elementor-38668\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\" data-elementor-post-type=\"elementor_library\">\n\t\t\t        <section class=\"elementor-section elementor-top-section elementor-element elementor-element-882321f elementor-section-boxed elementor-section-height-default elementor-section-height-default ct-header-fixed-none ct-row-max-none\" data-id=\"882321f\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n            \n                        <div class=\"elementor-container elementor-column-gap-default \">\n                    <div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7cc79cc\" data-id=\"7cc79cc\" data-element_type=\"column\">\n        <div class=\"elementor-widget-wrap elementor-element-populated\">\n                    \n        \t\t<div class=\"elementor-element elementor-element-e31b40f elementor-widget elementor-widget-shortcode\" data-id=\"e31b40f\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t            <\/div>\n        <\/div>\n                    <\/div>\n        <\/section>\n        \t\t<\/div>\n\t\t\n<div class=\"article-space\"><\/div>\n<p><b>Networks and Volumes<\/b><\/p>\n<p>&#8211;\u00a0<b>Network:<\/b>\u00a0mynet uses the bridge driver for service communication.<\/p>\n<p>&#8211;\u00a0<b>Volume:<\/b>\u00a0registrydata uses the local driver to store registry data.<\/p>\n<p>3. Save and Close the File<\/p>\n<p>After adding the configuration, save the file (e.g., press Ctrl+O and Enter in Nano) and close it (e.g., press Ctrl+X).<\/p>\n<p>Your Docker Compose file is now ready to set up the private registry and Nginx services.<\/p>\n<p><b>Step 3:<\/b>\u00a0Set Up Nginx Port Forwarding<\/p>\n<p>To configure Nginx for your Docker registry, you&#8217;ll need to set up a virtual host with specific server settings. Follow these steps:<\/p>\n<p>1. Create a Virtual Host File<\/p>\n<p>Create a new file called registry.conf in the nginx\/conf.d directory:<\/p>\n<pre><code class=\"language-javascript\"><b># nano nginx\/conf.d\/registry.conf<\/b><\/code><\/pre>\n<p>2. Add the Configuration<\/p>\n<p>Paste the following configuration into the file, replacing [domain] with your registry&#8217;s domain name (e.g., example.com):<\/p>\n<pre><code class=\"language-javascript\"><b>upstream docker-registry {<\/b>\r\n<b>\u00a0 \u00a0 server registry:5000;<\/b>\r\n<b>}<\/b>\r\n<b>server {<\/b>\r\n<b>\u00a0 \u00a0 listen 80;<\/b>\r\n<b>\u00a0 \u00a0 server_name registry.[domain];<\/b>\r\n<b>\u00a0 \u00a0 return 301 https:\/\/registry.[domain]$request_uri;<\/b>\r\n<b>}<\/b>\r\n<b>server {<\/b>\r\n<b>\u00a0 \u00a0 listen 443 ssl http2;<\/b>\r\n<b>\u00a0 \u00a0 server_name registry.[domain];<\/b>\r\n<b>\u00a0 \u00a0 ssl_certificate \/etc\/nginx\/ssl\/fullchain.pem;<\/b>\r\n<b>\u00a0 \u00a0 ssl_certificate_key \/etc\/nginx\/ssl\/privkey.pem;<\/b>\r\n<b>\u00a0 \u00a0 error_log\u00a0 \/var\/log\/nginx\/error.log;<\/b>\r\n<b>\u00a0 \u00a0 access_log \/var\/log\/nginx\/access.log;<\/b>\r\n<b>\u00a0 \u00a0 location \/ {<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 \u00a0 if ($http_user_agent ~ \"^(docker\\\/1\\.(3|4|5(?!\\.[0-9]-dev))|Go ).*$\" )\u00a0 {<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 return 404;<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 \u00a0 }<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 \u00a0 proxy_pass\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 http:\/\/docker-registry;<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 \u00a0 proxy_set_header\u00a0 Host\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 $http_host;<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 \u00a0 proxy_set_header\u00a0 X-Real-IP\u00a0 \u00a0 \u00a0 \u00a0 \u00a0$remote_addr;<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 \u00a0 proxy_set_header\u00a0 X-Forwarded-For\u00a0 \u00a0$proxy_add_x_forwarded_for;<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 \u00a0 proxy_set_header\u00a0 X-Forwarded-Proto $scheme;<\/b>\r\n<b>\u00a0 \u00a0 \u00a0 \u00a0 proxy_read_timeout\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 900;<\/b>\r\n<b>\u00a0 \u00a0 }<\/b>\r\n<b>}<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50713 size-full\" title=\"Add the Configuration\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-2.png\" alt=\"Add the Configuration\" width=\"915\" height=\"1023\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-2.png 915w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-2-268x300.png 268w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-2-768x859.png 768w\" sizes=\"(max-width: 915px) 100vw, 915px\" \/><\/a><\/p>\n<p>3. Save and Exit<\/p>\n<p>Save the file (e.g., press Ctrl+O and then Enter in Nano).<\/p>\n<p>Exit the editor (e.g., press Ctrl+X).<\/p>\n<p><b>Configuration Details:<\/b><\/p>\n<p>1. Nginx to Registry Connection:<\/p>\n<p>&#8211; Nginx connects to the Docker registry on port 5000 using the docker-registry upstream.<\/p>\n<p>2. HTTP to HTTPS Redirection:<\/p>\n<p>The first server block listens on port 80 and redirects all traffic to HTTPS.<\/p>\n<p>3. Secure Connection:<\/p>\n<p>&#8211; The second server block listens on port 443 and uses SSL certificates for secure communication.<\/p>\n<p>&#8211; Specifies certificate files: \/etc\/nginx\/ssl\/fullchain.pem and \/etc\/nginx\/ssl\/privkey.pem.<\/p>\n<p>4. User Agent Restriction:<\/p>\n<p>&#8211; Blocks requests from older Docker clients (versions 1.5 and below) due to known issues.<\/p>\n<p>5. Proxy Configuration:<\/p>\n<p>&#8211; Passes client requests to the registry service.<\/p>\n<p>&#8211; Adds headers like Host, X-Real-IP, and X-Forwarded-For for better request tracking.<\/p>\n<p>Once this configuration is saved, Nginx will handle secure traffic for your private Docker registry.<\/p>\n<div class=\"cta-btn-top-space ack-extra-image-space\"><\/div>\n\t\t<div data-elementor-type=\"section\" data-elementor-id=\"38668\" class=\"elementor elementor-38668\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\" data-elementor-post-type=\"elementor_library\">\n\t\t\t        <section class=\"elementor-section elementor-top-section elementor-element elementor-element-882321f elementor-section-boxed elementor-section-height-default elementor-section-height-default ct-header-fixed-none ct-row-max-none\" data-id=\"882321f\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n            \n                        <div class=\"elementor-container elementor-column-gap-default \">\n                    <div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7cc79cc\" data-id=\"7cc79cc\" data-element_type=\"column\">\n        <div class=\"elementor-widget-wrap elementor-element-populated\">\n                    \n        \t\t<div class=\"elementor-element elementor-element-e31b40f elementor-widget elementor-widget-shortcode\" data-id=\"e31b40f\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t            <\/div>\n        <\/div>\n                    <\/div>\n        <\/section>\n        \t\t<\/div>\n\t\t\n<div class=\"article-space\"><\/div>\n<p><b>Step 4:\u00a0<\/b>Increase Nginx File Upload Size<\/p>\n<p>Nginx has a default file upload size limit of 1MB. Since Docker images are often larger, you\u2019ll need to increase this limit. Follow these steps to raise the upload size to 2GB:<\/p>\n<p>1. Create a New Configuration File<\/p>\n<p>Open a new Nginx configuration file:<\/p>\n<pre><code class=\"language-javascript\"><b># nano nginx\/conf.d\/additional.conf<\/b><\/code><\/pre>\n<p>2. Set the Upload Limit<\/p>\n<p>Add the following line to the file:<\/p>\n<pre><code class=\"language-javascript\"><b>client_max_body_size 2G;<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50714 size-full\" title=\"Set the Upload Limit\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-3.png\" alt=\"Set the Upload Limit\" width=\"909\" height=\"169\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-3.png 909w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-3-300x56.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-3-768x143.png 768w\" sizes=\"(max-width: 909px) 100vw, 909px\" \/><\/a><\/p>\n<p>3. Save and Exit<\/p>\n<p>&#8211; Save the file (e.g., press Ctrl+O and then Enter in Nano).<\/p>\n<p>&#8211; Exit the editor (e.g., press Ctrl+X).<\/p>\n<p>This will allow Nginx to accept files up to 2GB in size.<\/p>\n<p><b>Step 5:\u00a0<\/b>Set Up Basic Authentication<\/p>\n<p>Follow these steps to set up basic authentication:<\/p>\n<p>1. Create the Authentication File<\/p>\n<p>Navigate to the auth directory:<\/p>\n<pre><code class=\"language-javascript\"><b># cd auth<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/1-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50715 size-full\" title=\"Create the Authentication File\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/1-1.png\" alt=\"Create the Authentication File\" width=\"909\" height=\"172\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/1-1.png 909w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/1-1-300x57.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/1-1-768x145.png 768w\" sizes=\"(max-width: 909px) 100vw, 909px\" \/><\/a><\/p>\n<p>2. Create a new password file named registry.passwd for your user:<\/p>\n<pre><code class=\"language-javascript\"><b># htpasswd -Bc registry.passwd [username]<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50716 size-full\" title=\"Create a new password file\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-4.png\" alt=\"Create a new password file\" width=\"914\" height=\"258\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-4.png 914w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-4-300x85.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/2-4-768x217.png 768w\" sizes=\"(max-width: 914px) 100vw, 914px\" \/><\/a><\/p>\n<p>3. Set a Password<\/p>\n<p>&#8211; Enter a strong password when prompted and confirm it by typing it again.<\/p>\n<p>&#8211; The system will confirm the operation was successful.<\/p>\n<p>Now, your basic authentication is configured for added <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/resource\/user-guide\/cloud-security-report\" target=\"_blank\" rel=\"noopener\">security<\/a>.<\/p>\n<p><b>Step 6:<\/b>\u00a0Start Docker Registry<\/p>\n<p>Now that everything is set up, follow these steps to run the Docker Registry and Nginx containers:<\/p>\n<p>1. Start the Containers<\/p>\n<p>Run the following command to launch the containers in the background (detached mode):<\/p>\n<pre><code class=\"language-javascript\"><b># docker compose up -d<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/1-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50717 size-full\" title=\"Start the Containers\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/1-2.png\" alt=\"Start the Containers\" width=\"917\" height=\"694\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/1-2.png 917w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/1-2-300x227.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/1-2-768x581.png 768w\" sizes=\"(max-width: 917px) 100vw, 917px\" \/><\/a><\/p>\n<p>2. Verify the Services<\/p>\n<p>Check if the registry and Nginx services are running by typing:<\/p>\n<pre><code class=\"language-javascript\"><b># docker compose ps<\/b><\/code><\/pre>\n<p>The output will display the running services and their assigned ports.<\/p>\n<h3 class=\"ack-h3\">Push Docker Image to Private Registry<\/h3>\n<p>Follow these steps to upload a Docker image to your private registry:<\/p>\n<p><b>Step 1:<\/b>\u00a0Log in to the Registry<\/p>\n<p>Run the following command to log in to your private Docker registry:<\/p>\n<pre><code class=\"language-javascript\"><b># docker login https:\/\/registry.[domain]\/v2\/<\/b><\/code><\/pre>\n<p>For example, if your registry is at accucloudsupport.com, use:<\/p>\n<pre><code class=\"language-javascript\"><b># docker login https:\/\/registry.accucloudsupport.com\/v2\/<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50719 size-full\" title=\"Log in to the Registry\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1-2.png\" alt=\"Log in to the Registry\" width=\"915\" height=\"149\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1-2.png 915w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1-2-300x49.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1-2-768x125.png 768w\" sizes=\"(max-width: 915px) 100vw, 915px\" \/><\/a><\/p>\n<p><b>Step 2:<\/b>\u00a0Enter Credentials<\/p>\n<p>Provide the username and password you created earlier during setup.<\/p>\n<p><b>Step 3:\u00a0<\/b>Push the Image<\/p>\n<p>Use the following command to push an image to the private registry:<\/p>\n<pre><code class=\"language-javascript\"><b># docker push registry.[domain]\/[new-image-name]<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50718 size-full\" title=\"Push the Image\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-4.png\" alt=\"Push the Image\" width=\"917\" height=\"265\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-4.png 917w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-4-300x87.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3-4-768x222.png 768w\" sizes=\"(max-width: 917px) 100vw, 917px\" \/><\/a><\/p>\n<h3 class=\"ack-h3\">Pull Image from Docker Hub to Private Registry<\/h3>\n<p>Follow these steps to download an image from Docker Hub and store it in your private registry:<\/p>\n<p><b>Step 1:\u00a0<\/b>Pull the Image<\/p>\n<p>Use the docker pull command to download the image from Docker Hub:<\/p>\n<pre><code class=\"language-javascript\"><b># docker pull [image]<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1p.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50720 size-full\" title=\"Pull the Image\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1p.png\" alt=\"Pull the Image\" width=\"912\" height=\"287\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1p.png 912w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1p-300x94.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-1p-768x242.png 768w\" sizes=\"(max-width: 912px) 100vw, 912px\" \/><\/a><\/p>\n<p><b>Step 2:<\/b>\u00a0Tag the Image<\/p>\n<p>Add a tag to the image to label it for your private registry:<\/p>\n<pre><code class=\"language-javascript\"><b># docker image tag [image] registry.[domain]\/[new-image-name]<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2p.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50721 size-full\" title=\"Tag the Image\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2p.png\" alt=\"Tag the Image\" width=\"916\" height=\"175\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2p.png 916w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2p-300x57.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-2p-768x147.png 768w\" sizes=\"(max-width: 916px) 100vw, 916px\" \/><\/a><\/p>\n<p><b>Step 3:<\/b>\u00a0Verify the Image Locally<\/p>\n<p>Check if the image is stored locally by listing all images:<\/p>\n<pre><code class=\"language-javascript\"><b># docker images<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3p.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50722 size-full\" title=\"Verify the Image Locally\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3p.png\" alt=\"Verify the Image Locally\" width=\"915\" height=\"383\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3p.png 915w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3p-300x126.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2025\/02\/Step-3p-768x321.png 768w\" sizes=\"(max-width: 915px) 100vw, 915px\" \/><\/a><\/p>\n<h2 class=\"ack-h2\">Conclusion<\/h2>\n<p>By following this guide, you&#8217;ve set up a private Docker registry on Ubuntu, configured Nginx, and added basic authentication. Now you can use it to manage Docker images and build containers on remote Docker hosts.<\/p>\n<div class=\"cta-btn-top-space ack-extra-image-space\"><\/div>\n\t\t<div data-elementor-type=\"section\" data-elementor-id=\"38668\" class=\"elementor elementor-38668\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\" data-elementor-post-type=\"elementor_library\">\n\t\t\t        <section class=\"elementor-section elementor-top-section elementor-element elementor-element-882321f elementor-section-boxed elementor-section-height-default elementor-section-height-default ct-header-fixed-none ct-row-max-none\" data-id=\"882321f\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n            \n                        <div class=\"elementor-container elementor-column-gap-default \">\n                    <div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7cc79cc\" data-id=\"7cc79cc\" data-element_type=\"column\">\n        <div class=\"elementor-widget-wrap elementor-element-populated\">\n                    \n        \t\t<div class=\"elementor-element elementor-element-e31b40f elementor-widget elementor-widget-shortcode\" data-id=\"e31b40f\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t            <\/div>\n        <\/div>\n                    <\/div>\n        <\/section>\n        \t\t<\/div>\n\t\t\n<div class=\"cta-btn-mob-space\"><\/div>\n","protected":false},"author":1,"featured_media":52879,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","class_list":["post-50689","faq","type-faq","status-publish","has-post-thumbnail","hentry","faq_topics-kb","faq_topics-product-documentation","faq_topics-set-up-private-docker-registry","faq_topics-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.10 (Yoast SEO v24.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Set Up a Private Docker Registry on Ubuntu | Step-by-Step<\/title>\n<meta name=\"description\" content=\"Learn how to set up a secure private Docker registry on Ubuntu. Follow this simple guide for a seamless configuration.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Set Up a Private Docker Registry on Ubuntu?\" \/>\n<meta property=\"og:description\" content=\"Learn how to set up a secure private Docker registry on Ubuntu. Follow this simple guide for a seamless configuration.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu\" \/>\n<meta property=\"og:site_name\" content=\"AccuWeb Cloud\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-17T13:22:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"16 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu#article\",\"isPartOf\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu\"},\"author\":{\"name\":\"Jilesh Patadiya\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/a7a4cbe8405202b537509c757b588c58\"},\"headline\":\"How To Set Up a Private Docker Registry on Ubuntu?\",\"datePublished\":\"2025-02-11T14:03:46+00:00\",\"dateModified\":\"2026-02-17T13:22:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu\"},\"wordCount\":1989,\"publisher\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/#organization\"},\"image\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu#primaryimage\"},\"thumbnailUrl\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg\",\"inLanguage\":\"en-US\"},{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu\",\"url\":\"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu\",\"name\":\"Set Up a Private Docker Registry on Ubuntu | Step-by-Step\",\"isPartOf\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu#primaryimage\"},\"image\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu#primaryimage\"},\"thumbnailUrl\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg\",\"datePublished\":\"2025-02-11T14:03:46+00:00\",\"dateModified\":\"2026-02-17T13:22:59+00:00\",\"description\":\"Learn how to set up a secure private Docker registry on Ubuntu. Follow this simple guide for a seamless configuration.\",\"breadcrumb\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu#primaryimage\",\"url\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg\",\"contentUrl\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/accuweb.cloud\/resource\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Set Up a Private Docker Registry on Ubuntu?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#website\",\"url\":\"https:\/\/accuweb.cloud\/resource\/\",\"name\":\"AccuWeb Cloud\",\"description\":\"Cutting Edge Cloud Computing\",\"publisher\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/accuweb.cloud\/resource\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#organization\",\"name\":\"AccuWeb.Cloud\",\"url\":\"https:\/\/accuweb.cloud\/resource\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/04\/accuwebcloud_logo_black_tagline.jpg\",\"contentUrl\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/04\/accuwebcloud_logo_black_tagline.jpg\",\"width\":156,\"height\":87,\"caption\":\"AccuWeb.Cloud\"},\"image\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/a7a4cbe8405202b537509c757b588c58\",\"name\":\"Jilesh Patadiya\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2cea2bdb5bbabb771ee67e96acad7396f25cb1a0c360b9bc4a9ac40cea9cd8b2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2cea2bdb5bbabb771ee67e96acad7396f25cb1a0c360b9bc4a9ac40cea9cd8b2?s=96&d=mm&r=g\",\"caption\":\"Jilesh Patadiya\"},\"description\":\"Jilesh Patadiya, the visionary Co-Founder and Chief Technology Officer (CTO) behind AccuWeb.Cloud. Founder &amp; CTO at AccuWebHosting.com. He shares his web hosting insights on the AccuWeb.Cloud blog. He mostly writes on the latest web hosting trends, WordPress, storage technologies, and Windows and Linux hosting platforms.\",\"sameAs\":[\"https:\/\/accuweb.cloud\/resource\",\"https:\/\/www.facebook.com\/accuwebhosting\",\"https:\/\/www.instagram.com\/accuwebhosting\/\",\"https:\/\/www.linkedin.com\/company\/accuwebhosting\/\",\"https:\/\/x.com\/accuwebhosting\",\"https:\/\/www.youtube.com\/c\/Accuwebhosting\"],\"url\":\"https:\/\/accuweb.cloud\/resource\/author\/accuwebadmin\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Set Up a Private Docker Registry on Ubuntu | Step-by-Step","description":"Learn how to set up a secure private Docker registry on Ubuntu. Follow this simple guide for a seamless configuration.","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:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu","og_locale":"en_US","og_type":"article","og_title":"How To Set Up a Private Docker Registry on Ubuntu?","og_description":"Learn how to set up a secure private Docker registry on Ubuntu. Follow this simple guide for a seamless configuration.","og_url":"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu","og_site_name":"AccuWeb Cloud","article_modified_time":"2026-02-17T13:22:59+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu#article","isPartOf":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu"},"author":{"name":"Jilesh Patadiya","@id":"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/a7a4cbe8405202b537509c757b588c58"},"headline":"How To Set Up a Private Docker Registry on Ubuntu?","datePublished":"2025-02-11T14:03:46+00:00","dateModified":"2026-02-17T13:22:59+00:00","mainEntityOfPage":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu"},"wordCount":1989,"publisher":{"@id":"https:\/\/accuweb.cloud\/resource\/#organization"},"image":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu#primaryimage"},"thumbnailUrl":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg","inLanguage":"en-US"},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu","url":"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu","name":"Set Up a Private Docker Registry on Ubuntu | Step-by-Step","isPartOf":{"@id":"https:\/\/accuweb.cloud\/resource\/#website"},"primaryImageOfPage":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu#primaryimage"},"image":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu#primaryimage"},"thumbnailUrl":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg","datePublished":"2025-02-11T14:03:46+00:00","dateModified":"2026-02-17T13:22:59+00:00","description":"Learn how to set up a secure private Docker registry on Ubuntu. Follow this simple guide for a seamless configuration.","breadcrumb":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu#primaryimage","url":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg","contentUrl":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/accuweb.cloud\/resource\/articles\/set-up-private-docker-registry-on-ubuntu#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/accuweb.cloud\/resource\/"},{"@type":"ListItem","position":2,"name":"How To Set Up a Private Docker Registry on Ubuntu?"}]},{"@type":"WebSite","@id":"https:\/\/accuweb.cloud\/resource\/#website","url":"https:\/\/accuweb.cloud\/resource\/","name":"AccuWeb Cloud","description":"Cutting Edge Cloud Computing","publisher":{"@id":"https:\/\/accuweb.cloud\/resource\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/accuweb.cloud\/resource\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/accuweb.cloud\/resource\/#organization","name":"AccuWeb.Cloud","url":"https:\/\/accuweb.cloud\/resource\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/accuweb.cloud\/resource\/#\/schema\/logo\/image\/","url":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/04\/accuwebcloud_logo_black_tagline.jpg","contentUrl":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/04\/accuwebcloud_logo_black_tagline.jpg","width":156,"height":87,"caption":"AccuWeb.Cloud"},"image":{"@id":"https:\/\/accuweb.cloud\/resource\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/a7a4cbe8405202b537509c757b588c58","name":"Jilesh Patadiya","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2cea2bdb5bbabb771ee67e96acad7396f25cb1a0c360b9bc4a9ac40cea9cd8b2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2cea2bdb5bbabb771ee67e96acad7396f25cb1a0c360b9bc4a9ac40cea9cd8b2?s=96&d=mm&r=g","caption":"Jilesh Patadiya"},"description":"Jilesh Patadiya, the visionary Co-Founder and Chief Technology Officer (CTO) behind AccuWeb.Cloud. Founder &amp; CTO at AccuWebHosting.com. He shares his web hosting insights on the AccuWeb.Cloud blog. He mostly writes on the latest web hosting trends, WordPress, storage technologies, and Windows and Linux hosting platforms.","sameAs":["https:\/\/accuweb.cloud\/resource","https:\/\/www.facebook.com\/accuwebhosting","https:\/\/www.instagram.com\/accuwebhosting\/","https:\/\/www.linkedin.com\/company\/accuwebhosting\/","https:\/\/x.com\/accuwebhosting","https:\/\/www.youtube.com\/c\/Accuwebhosting"],"url":"https:\/\/accuweb.cloud\/resource\/author\/accuwebadmin"}]}},"_links":{"self":[{"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/faq\/50689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/comments?post=50689"}],"version-history":[{"count":13,"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/faq\/50689\/revisions"}],"predecessor-version":[{"id":52945,"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/faq\/50689\/revisions\/52945"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/media\/52879"}],"wp:attachment":[{"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/media?parent=50689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}