How to fix Error response from daemon: client version X.XX is too new. Maximum supported API version is X.XX in Docker

DockerINTERMEDIATEMEDIUMUpdated May 28, 2026· 518 views

This error occurs when your Docker client uses a newer API version than the daemon it is talking to can support. The fix is to lower the client's API version with DOCKER_API_VERSION, rely on API negotiation, or upgrade the daemon to match the client.

Quick fix

Fixes Error response from daemon: client version X.XX is too new. Maximum supported API version is X.XX

docker version
  1. Check current Docker versions
  2. Set DOCKER_API_VERSION environment variable
  3. Upgrade Docker Engine/daemon (recommended)
  4. Downgrade Docker CLI (if daemon upgrade is not possible)
docker — error
docker version
Error response from daemon: client version X.XX is too new. Maximum supported API version is X.XX

What this error means

The Docker CLI and Docker Engine (daemon) communicate through a versioned HTTP API. When you run a Docker command, the client attempts to use a specific API version to talk to the daemon. This error appears when the client's API version is higher than the maximum version the daemon can handle — in other words, the daemon is too old for the client. This situation commonly occurs after upgrading the Docker CLI without updating the Docker Engine, when connecting to a remote Docker host running an older version, or when using newer tools (like docker-compose or Traefik) that target a newer API than your older daemon exposes. The API version is tied to specific Docker Engine releases; for example, API v1.44 corresponds to Docker Engine v25.0. The direction matters: "client version is too new" means you must point the client at a lower API version (or upgrade the daemon). It is the opposite of "client version is too old", which is about a client falling below the daemon's minimum supported API version.

Typical symptoms

  • Docker commands fail with 'client version X.XX is too new' error
  • docker-compose commands fail after upgrading Docker CLI
  • CI/CD pipelines fail with API version mismatch errors
  • Tools like Traefik, Portainer, or Watchtower fail to connect to Docker
  • 'docker version' shows a higher API version for Client than for Server
  • Remote Docker connections fail from a newer local machine
  • Python docker SDK or other Docker libraries throw version errors

Common causes

  1. Docker CLI version is newer than the Docker Engine/daemon version
  2. Connecting to a remote Docker host running an older Docker version
  3. Docker Desktop or Engine was not updated after a CLI upgrade
  4. Using a newer docker-compose with an older Docker daemon
  5. Docker SDK/library version mismatch with the target daemon
  6. Third-party tools compiled against newer Docker API versions
  7. Docker Machine pointing to an outdated Docker host
  8. Container orchestration tools using incompatible API versions

How to fix "Error response from daemon: client version X.XX is too new. Maximum supported API version is X.XX"

1Check current Docker versions

First, identify the version mismatch by checking both client and server API versions:

bash
docker version

This displays both the Client and Server sections. Look for the "API version" lines:

bash
Client:
 Version:           24.0.7
 API version:       1.43

Server:
 Version:           20.10.21
 API version:       1.41 (minimum version 1.12)

In this example, the client uses API 1.43 but the server only supports up to 1.41, so the client is too new for the daemon. Note the server's maximum supported version for the next step.

2Set DOCKER_API_VERSION environment variable

The quickest fix is to tell the client to use an older API version by setting the DOCKER_API_VERSION environment variable to the daemon's maximum supported version:

Linux/macOS (temporary):

bash
export DOCKER_API_VERSION=1.41
docker ps  # Should work now

Linux/macOS (permanent):
Add to your shell profile (~/.bashrc, ~/.zshrc, etc.):

bash
echo 'export DOCKER_API_VERSION=1.41' >> ~/.bashrc
source ~/.bashrc

Windows PowerShell (temporary):

powershell
$env:DOCKER_API_VERSION="1.41"
docker ps

Windows PowerShell (permanent):

powershell
[Environment]::SetEnvironmentVariable("DOCKER_API_VERSION", "1.41", "User")

Replace "1.41" with the maximum API version your server supports (from docker version).

3Upgrade Docker Engine/daemon (recommended)

The best long-term solution is to upgrade your Docker Engine so its supported API version meets or exceeds the client's:

Linux (using apt):

bash
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Linux (using yum/dnf):

bash
sudo yum update docker-ce docker-ce-cli containerd.io

Docker Desktop (Windows/macOS):
1. Open Docker Desktop
2. Click the gear icon (Settings)
3. Go to "Software Updates"
4. Click "Check for updates" and install any available updates

Verify after upgrade:

bash
docker version

The Server API version should now be at least as high as the Client API version.

4Downgrade Docker CLI (if daemon upgrade is not possible)

If you cannot upgrade the daemon (e.g., shared infrastructure, production constraints), you can downgrade the CLI to match the daemon:

Using Docker's version-specific packages (Linux):

bash
# List available versions
apt-cache madison docker-ce-cli

# Install specific version
sudo apt-get install docker-ce-cli=5:20.10.21~3-0~ubuntu-jammy

Using Docker binaries directly:
1. Visit https://download.docker.com/linux/static/stable/
2. Download the version matching your daemon
3. Extract and replace the docker binary

Note: Downgrading means losing access to newer features. Prefer setting DOCKER_API_VERSION or upgrading the daemon when possible.

5Fix docker-compose version mismatch

If the error occurs with docker-compose, set the API version before running compose commands:

bash
export DOCKER_API_VERSION=1.41
docker-compose up -d

For docker-compose v2 (Docker Compose plugin):

bash
export DOCKER_API_VERSION=1.41
docker compose up -d

Using an .env file:
You cannot set the API version directly in the compose YAML, but you can keep it in an .env file:

bash
# .env file in same directory as docker-compose.yml
DOCKER_API_VERSION=1.41

Then run:

bash
docker-compose --env-file .env up -d
6Configure remote Docker connections

When connecting to remote Docker hosts running older versions:

Using DOCKER_HOST with API version:

bash
export DOCKER_HOST=tcp://remote-host:2375
export DOCKER_API_VERSION=1.40
docker ps

Using Docker context:

bash
# Create a context for the remote host
docker context create remote-server --docker "host=tcp://remote-host:2375"

# Set API version when using the context
export DOCKER_API_VERSION=1.40
docker --context remote-server ps

Docker Machine (if applicable):

bash
# Upgrade the Docker Machine instance
docker-machine upgrade <machine-name>

# Or regenerate certificates
docker-machine regenerate-certs <machine-name>
7Fix third-party tools and SDKs

For tools like Traefik, Portainer, Watchtower, or Docker SDKs, prefer API version negotiation, and fall back to pinning a version the daemon supports:

Traefik:
Add to your Traefik configuration:

yaml
providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    # Force a specific API version (check Traefik docs for syntax)

Or upgrade Traefik to a version compatible with your Docker daemon.

Python docker SDK:

python
import docker

# Recommended: let the client auto-negotiate a compatible API version
client = docker.from_env()

# Or pin a version the daemon supports, passed at construction time
client = docker.from_env(version='1.41')

# Equivalent, when building the client explicitly
client = docker.DockerClient(
    base_url='unix://var/run/docker.sock',
    version='1.41',
)

Note: pass version when constructing the client. Assigning client.api.version after construction is not the supported way to set the API version.

Go SDK:

go
cli, err := client.NewClientWithOpts(
    client.FromEnv,
    client.WithAPIVersionNegotiation(),  // Auto-negotiate
)

General approach:
Check if the tool supports setting DOCKER_API_VERSION via environment variable or has a configuration option for API version.

8Handle CI/CD pipeline failures

In CI/CD environments, set the API version in your pipeline configuration:

GitLab CI (.gitlab-ci.yml):

yaml
variables:
  DOCKER_API_VERSION: "1.41"

build:
  image: docker:latest
  services:
    - docker:dind
  script:
    - docker build -t myapp .

GitHub Actions:

yaml
jobs:
  build:
    runs-on: ubuntu-latest
    env:
      DOCKER_API_VERSION: "1.41"
    steps:
      - uses: actions/checkout@v4
      - name: Build
        run: docker build -t myapp .

Jenkins:

groovy
pipeline {
    environment {
        DOCKER_API_VERSION = '1.41'
    }
    stages {
        stage('Build') {
            steps {
                sh 'docker build -t myapp .'
            }
        }
    }
}

Best practice: Pin Docker versions in CI to avoid unexpected version mismatches.

Advanced notes

Understanding Docker API versioning:
Each Docker Engine release supports a range of API versions. The API is backward-compatible, meaning newer engines also support older API versions. The docker version command shows both the negotiated API version and the minimum supported version. API version negotiation was introduced in Docker v1.12.0 (API 1.24).

Which direction this error points:
This is the "client too new" error: the daemon is older than the client and rejects the client's higher API version. The fix is to lower the client's API version (via DOCKER_API_VERSION or negotiation) or upgrade the daemon. This is distinct from the "client too old" error, where a client falls below the daemon's *minimum* supported API version; raising a daemon's minimum (as some newer Engine releases do) affects that opposite case, not this one.

API version to Docker Engine version mapping (recent versions):
- API 1.48 = Docker Engine 27.4
- API 1.47 = Docker Engine 27.0 / 27.1
- API 1.46 = Docker Engine 26.1
- API 1.45 = Docker Engine 26.0
- API 1.44 = Docker Engine 25.0
- API 1.43 = Docker Engine 24.x
- API 1.42 = Docker Engine 23.x
- API 1.41 = Docker Engine 20.10.x

API version negotiation in SDKs:
Modern Docker SDKs support automatic API version negotiation, letting the client downgrade to a version the daemon supports. In Go: client.WithAPIVersionNegotiation(). In Python: use docker.from_env(), which negotiates automatically in recent versions. This is the most robust fix because it adapts to whatever daemon you connect to.

When DOCKER_API_VERSION won't work:
Setting a lower API version means some newer features won't be available. If your workflow requires features from a newer API version, you must upgrade the daemon. Note that setting DOCKER_API_VERSION *higher* than the daemon supports will not help — it only makes the mismatch worse; pin it at or below the daemon's maximum.

Troubleshooting persistent issues:
If the error persists after setting DOCKER_API_VERSION:
1. Ensure the environment variable is exported in the correct shell/context
2. For systemd services, set the variable in the service file's Environment section
3. For containers, pass it via -e DOCKER_API_VERSION=1.41
4. Check if multiple Docker installations exist on the system

Forgetting to unset DOCKER_API_VERSION:
If you set DOCKER_API_VERSION to work with an older host, remember to unset it when connecting to newer hosts, or you may unnecessarily limit the API features available.

Frequently asked questions

What does "Error response from daemon: client version X.XX is too new. Maximum su" mean?
The Docker CLI and Docker Engine (daemon) communicate through a versioned HTTP API. When you run a Docker command, the client attempts to use a specific API version to talk to the daemon. This error appears when the client's API version is higher than the maximum version the daemon can handle — in other words, the daemon is too old for the client.
How do I fix "Error response from daemon: client version X.XX is too new. Maximum su"?
This error occurs when your Docker client uses a newer API version than the daemon it is talking to can support. The fix is to lower the client's API version with DOCKER_API_VERSION, rely on API negotiation, or upgrade the daemon to match the client.
What causes "Error response from daemon: client version X.XX is too new. Maximum su"?
Docker CLI version is newer than the Docker Engine/daemon version Connecting to a remote Docker host running an older Docker version Docker Desktop or Engine was not updated after a CLI upgrade
Is the "Error response from daemon: client version X.XX is too new. Maximum su" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading