> For the complete documentation index, see [llms.txt](https://platform9.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platform9.com/kb/pmk/solutions/persist-docker-registry-mirrors.md).

# Persist Docker Registry Mirrors

## Problem

We would like to use local registry-mirrors and if we add it to */etc/docker/daemon.json* it will get overwritten after the restart ***pf9-kube***. Is there way to persist it?

## Environment

* Platform9 Managed Kubernetes - All Versions

## Procedure

Add the registry-mirrors information to the template */opt/pf9/pf9-kube/conf/daemon.json* and replace the *\[your-registry-mirror]* with endpoint of your registry.

{% tabs %}
{% tab title="None" %}

```none
"registry-mirrors": ["https://[your-registry-mirror]/"]
```

{% endtab %}
{% endtabs %}

Restart the pf9-kube service.

{% tabs %}
{% tab title="None" %}

```none
$ sudo /etc/init.d/pf9-kube restart
```

{% endtab %}
{% endtabs %}

Make sure the ***pf9-kube*** service is running.

{% tabs %}
{% tab title="None" %}

```none
$ sudo /etc/init.d/pf9-kube status
```

{% endtab %}
{% endtabs %}

Validate the registry change in *daemon.json* file.

{% tabs %}
{% tab title="None" %}

```none
$ cat /etc/docker/daemon.json
```

{% endtab %}
{% endtabs %}

## Additional Information

This change will persist if there is reboot of node or restart of ***pf9-kube*** service, but will not be persistent across upgrades.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://platform9.com/kb/pmk/solutions/persist-docker-registry-mirrors.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
