Introduction

When installing the rclone Docker volume plugin, you may encounter the following error:

Error response from daemon: dial unix /run/docker/plugins/.../rclone.sock: connect: no such file or directory

This error means that Docker cannot communicate with the rclone plugin because the plugin socket was never created.
In most cases, the plugin itself failed to start due to a corrupted state file.

This article explains why this happens and how to fix it permanently, based on official documentation and real-world troubleshooting.

Root Cause

The plugin state file is corrupted

The rclone Docker plugin stores its internal state in:

/var/lib/docker-plugins/rclone/cache/docker-plugin.state

If this file remains from a previous failed installation, Docker may think the plugin is installed correctly while rclone never actually starts, so the Unix socket (rclone.sock) is not created.

This behavior has been reported by multiple users in the rclone community.

Solution (Step-by-Step with Reasons)

1. Create required directories

sudo mkdir -p /var/lib/docker-plugins/rclone/config
sudo mkdir -p /var/lib/docker-plugins/rclone/cache

Why this is required
The rclone plugin does not automatically create these directories.
If they are missing, the plugin may fail silently during startup.

2. Remove the corrupted plugin state file

sudo rm /var/lib/docker-plugins/rclone/cache/docker-plugin.state

Why this works
This forces Docker to treat the plugin as a fresh installation and allows rclone to initialize correctly and create its socket.

⚠️ This may reset existing rclone Docker volumes.

3. Reinstall the plugin with explicit args

docker plugin rm -f rclone
docker plugin install rclone/docker-volume-rclone:arm64 \
  --alias rclone \
  --grant-all-permissions \
  args="-v"

Why args are required
According to the official rclone documentation, Docker may fail to start the plugin if args is empty. Passing -v avoids this issue.

4. Enable the plugin

docker plugin enable rclone

Verification

docker plugin ls
docker plugin inspect rclone

Confirm that:

  • The plugin is ENABLED
  • No socket errors occur

Conclusion

If you see a rclone.sock: no such file or directory error,
the most important fix is deleting docker-plugin.state before reinstalling the plugin.

This single step resolves the issue in most cases.