How to fix Error response from daemon: unknown logging driver: mydriver in Docker

DockerINTERMEDIATEMEDIUMUpdated Dec 6, 2025ยท 143 views

This error occurs when Docker cannot find the specified logging driver. The driver may not be installed, may require a plugin installation, or may not be available on your Docker version.

Quick fix

Fixes Error response from daemon: unknown logging driver: mydriver

docker info | grep -i logging
  1. Check available logging drivers
  2. Verify driver name spelling
  3. Install plugin-based logging drivers
  4. Restart Docker daemon
docker โ€” error
docker info | grep -i logging
Error response from daemon: unknown logging driver: mydriver

What this error means

When you configure a container or the Docker daemon to use a specific logging driver, Docker needs to recognize and load that driver before it can route container logs. If Docker encounters a driver name it doesn't recognize, it fails with "unknown logging driver." Docker supports several built-in logging drivers out of the box: `json-file` (the default), `local`, `syslog`, `journald`, `gelf`, `fluentd`, `awslogs`, `splunk`, and `gcplogs`. However, some drivers like `loki` require installing a plugin first, and others may not be available on all platforms. This error commonly appears when: - Using a third-party logging driver without installing its plugin - Referencing a misspelled driver name in daemon.json or docker-compose.yml - After a Docker upgrade where the daemon state becomes inconsistent - Running containers with `--live-restore` enabled and the daemon was restarted

Typical symptoms

  • Docker containers fail to start with 'unknown logging driver' error
  • Docker Compose up fails when a service specifies a logging driver
  • Error appears immediately after configuring a new logging driver
  • Error appears after Docker daemon upgrade with --live-restore enabled
  • Error mentions a specific driver name like 'loki', 'fluentd', or a custom driver

Common causes

  1. The logging driver plugin is not installed (e.g., Loki, custom drivers)
  2. The driver name is misspelled in configuration
  3. Docker daemon was upgraded with --live-restore enabled, causing driver state mismatch
  4. The logging driver is not available on your platform or Docker version
  5. Required dependencies for the driver are missing (e.g., journald requires systemd)
  6. The driver configuration in daemon.json has syntax errors
  7. Race condition on system boot where the logging plugin hasn't started yet

How to fix "Error response from daemon: unknown logging driver: mydriver"

1Check available logging drivers

First, verify which logging drivers are available on your system:

bash
docker info | grep -i logging

This shows the default driver and lists supported drivers. You should see something like:

bash
Logging Driver: json-file
 Supported Logging Drivers: awslogs, fluentd, gcplogs, gelf, journald, json-file, local, splunk, syslog

If the driver you need isn't listed, it either requires a plugin or isn't supported on your system.

2Verify driver name spelling

Check your configuration for typos. The driver name must exactly match one of the supported drivers.

In daemon.json (/etc/docker/daemon.json):

json
{
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
  }
}

In docker-compose.yml:

yaml
services:
  app:
    image: myapp
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"

Common built-in drivers: json-file, local, syslog, journald, gelf, fluentd, awslogs, splunk, gcplogs, none

3Install plugin-based logging drivers

Some logging drivers require installing a Docker plugin first.

For Loki logging driver:

bash
docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions

For Splunk Connect:

bash
docker plugin install splunk/docker-logging-plugin:latest --alias splunk-logging-plugin

For Docker Desktop:
Go to Settings > Plugins and enable the logging plugin you need.

After installing, verify the plugin is active:

bash
docker plugin ls
4Restart Docker daemon

If you recently upgraded Docker or changed the daemon configuration, restart the Docker service:

On Linux (systemd):

bash
sudo systemctl restart docker

On macOS/Windows:
Restart Docker Desktop from the system tray/menu bar.

Important: If you're using --live-restore, containers will keep running during restart, but they may have issues with the new logging driver configuration. You may need to restart the affected containers:

bash
docker-compose down && docker-compose up -d
5Fix daemon.json syntax errors

Invalid JSON in daemon.json can cause logging driver issues. Validate your configuration:

bash
cat /etc/docker/daemon.json | python3 -m json.tool

Common mistakes:
- Missing quotes around option values (all values must be strings)
- Trailing commas after the last item
- Missing commas between items

Correct format:

json
{
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
  }
}

Note: All log-opts values must be strings, even numbers like "3".

6Fall back to default driver

If you need containers running immediately while troubleshooting, switch to the default json-file driver:

Remove custom driver from daemon.json or set:

json
{
  "log-driver": "json-file"
}

Override at container level:

bash
docker run --log-driver=json-file myimage

In docker-compose.yml:

yaml
services:
  app:
    image: myapp
    logging:
      driver: "json-file"

This allows you to run containers while you resolve the logging driver issue.

Advanced notes

### Platform-Specific Driver Support

Not all logging drivers work on all platforms:

| Driver | Linux | Windows | macOS (Docker Desktop) |
|--------|-------|---------|------------------------|
| json-file | Yes | Yes | Yes |
| local | Yes | Yes | Yes |
| syslog | Yes | No | Yes |
| journald | Yes (systemd) | No | No |
| gelf | Yes | Yes | Yes |
| fluentd | Yes | Yes | Yes |
| awslogs | Yes | Yes | Yes |
| splunk | Yes | Yes | Yes |
| gcplogs | Yes | Yes | Yes |

### Live Restore Considerations

When running Docker with --live-restore enabled, upgrading Docker can cause "unknown logging driver" errors because:

1. The old daemon used in-process logging driver management
2. After restart, the new daemon doesn't know about the old driver state
3. Existing containers reference a driver the new daemon can't recognize

Solution: After a Docker upgrade with live-restore, restart affected containers:

bash
docker restart $(docker ps -q)

### Journald on Alpine Linux

If using journald on Alpine, you need additional packages:

dockerfile
RUN apk add --no-cache libc6-compat libintl

Without these, journald logging silently fails or reports "unknown driver."

### Boot Race Conditions

If using a plugin-based driver (like Loki) and seeing errors only at system boot, it's likely a race condition where Docker starts before the plugin initializes.

Fix for systemd:

Create /etc/systemd/system/docker-logging-plugin.service:

ini
[Unit]
Description=Ensure Docker logging plugin is ready
After=docker.service
Requires=docker.service

[Service]
Type=oneshot
ExecStart=/usr/bin/docker plugin enable loki
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Or add a delay in your container start scripts to allow the plugin to initialize.

### Debugging Plugin Issues

To debug plugin problems:

bash
# Check plugin status
docker plugin inspect loki

# View plugin logs (if available)
journalctl -u docker | grep -i plugin

# Reinstall plugin
docker plugin disable loki
docker plugin rm loki
docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions

Frequently asked questions

What does "Error response from daemon: unknown logging driver: mydriver" mean?
When you configure a container or the Docker daemon to use a specific logging driver, Docker needs to recognize and load that driver before it can route container logs. " Docker supports several built-in logging drivers out of the box: json-file (the default), local, syslog, journald, gelf, fluentd, awslogs, splunk, and gcplogs. However, some drivers like loki require installing a plugin first, and others may not be available on all platforms.
How do I fix "Error response from daemon: unknown logging driver: mydriver"?
This error occurs when Docker cannot find the specified logging driver. The driver may not be installed, may require a plugin installation, or may not be available on your Docker version.
What causes "Error response from daemon: unknown logging driver: mydriver"?
The logging driver plugin is not installed (e.g., Loki, custom drivers) The driver name is misspelled in configuration Docker daemon was upgraded with --live-restore enabled, causing driver state mismatch
Is the "Error response from daemon: unknown logging driver: mydriver" error serious?
It is a medium-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading