How to Change Docker Storage \ Data Folder on Windows Server 2016

In this blog post, I will show you how I change the storage location of Docker and windows Containers on Windows Server 2016.

My Container Host Is running Docker Enterprise Edition version on Windows Server 2016.

Docker Configuration File

By default, Docker stores Images and other configuration files In the location below:


Which also mean that Images, volumes, etc will be stored In the same location.

To change the storage location I’ll need to create a configuration file called Daemon.json and specify the new storage location.

By default, the file doesn’t exist and we need to create it under the path below:


As you can see I created the file

Before, making any changes I must stop the Docker service

Add Configuration

Now, that the Docker service Is stopped, I’ll add the code below that will change my storage location for docker.

In my case, I created a new folder on my C drive.

"data-root": "c:\\dockerdata"

After saving the configuration file, I’ll restart the docker service using the code below:

Restart-Service Docker

After restart, docker will move the configuration files and new Images will be saved In the new location

Below, I’ll download a new Image

Docker pull microsoft/dotnet

And as you can see below, content will be saved to the new location

Categorized as Docker


  1. So, to keep the image/container before the move, I should manually copy the file from old location to new one?

  2. Doesn’t work. daemon.json is deleted after docker restart. Also there is no service “docker”. There is one called “com.docker.service”.

    Changing data-root from the settings panel (in the daemon section) doesn’t change the root too. docker info always prints C:\ProgramData\docker

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.